diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fb467c1ddd6..dc9f65a7d22 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -21,5 +21,5 @@ /jans-client-api/ @duttarnab @yuriyz /jans-config-api/ @pujavs @yuriyz /jans-cli/ @mbaser -/jans-ce-setup/ @mbaser @smansoft @yuriyz -/jans-ce-setup/static/scripts/admin_ui_plugin.py @mbaser @duttarnab \ No newline at end of file +/jans-linux-setup/ @mbaser @smansoft @yuriyz +/jans-linux-setup/static/scripts/admin_ui_plugin.py @mbaser @duttarnab \ No newline at end of file diff --git a/.github/workflows/central_code_quality_check.yml b/.github/workflows/central_code_quality_check.yml index ca50650ddf1..ba2798263b4 100644 --- a/.github/workflows/central_code_quality_check.yml +++ b/.github/workflows/central_code_quality_check.yml @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: - module: [jans-auth-server, jans-config-api, jans-core, jans-ce-setup, jans-cli, jans-client-api, jans-fido2, jans-notify, jans-orm, jans-scim, jans-eleven, jans-pycloudlib] + module: [jans-auth-server, jans-config-api, jans-core, jans-linux-setup, jans-cli, jans-client-api, jans-fido2, jans-notify, jans-orm, jans-scim, jans-eleven, jans-pycloudlib] env: JVM_PROJECTS: | jans-auth-server @@ -49,7 +49,7 @@ jobs: jans-fido2 jans-eleven NON_JVM_PROJECTS: | - jans-ce-setup + jans-linux-setup jans-cli jans-pycloudlib diff --git a/jans-ce-setup/static/auth/lib/duo_web.py b/jans-ce-setup/static/auth/lib/duo_web.py deleted file mode 100644 index 2bef248889c..00000000000 --- a/jans-ce-setup/static/auth/lib/duo_web.py +++ /dev/null @@ -1,114 +0,0 @@ -# -# duo_web.py -# -# Copyright (c) 2011 Duo Security -# All rights reserved, all wrongs reversed. -# - -import base64 -import hashlib -import hmac -import time - -DUO_PREFIX = 'TX' -APP_PREFIX = 'APP' -AUTH_PREFIX = 'AUTH' - -DUO_EXPIRE = 300 -APP_EXPIRE = 3600 - -IKEY_LEN = 20 -SKEY_LEN = 40 -AKEY_LEN = 40 - -ERR_USER = 'ERR|The username passed to sign_request() is invalid.' -ERR_IKEY = 'ERR|The Duo integration key passed to sign_request() is invalid.' -ERR_SKEY = 'ERR|The Duo secret key passed to sign_request() is invalid.' -ERR_AKEY = 'ERR|The application secret key passed to sign_request() must be at least %s characters.' % AKEY_LEN -ERR_UNKNOWN = 'ERR|An unknown error has occurred.' - -def _hmac_sha1(key, msg): - ctx = hmac.new(key, msg, hashlib.sha1) - return ctx.hexdigest() - -def _sign_vals(key, vals, prefix, expire): - exp = str(int(time.time()) + expire) - - val = '|'.join(vals + [ exp ]) - b64 = base64.b64encode(val) - cookie = '%s|%s' % (prefix, b64) - - sig = _hmac_sha1(key, cookie) - return '%s|%s' % (cookie, sig) - -def _parse_vals(key, val, prefix): - ts = int(time.time()) - u_prefix, u_b64, u_sig = val.split('|') - - sig = _hmac_sha1(key, '%s|%s' % (u_prefix, u_b64)) - if _hmac_sha1(key, sig) != _hmac_sha1(key, u_sig): - return None - - if u_prefix != prefix: - return None - - user, ikey, exp = base64.b64decode(u_b64).split('|') - - if ts >= int(exp): - return None - - return user - -def sign_request(ikey, skey, akey, username): - """Generate a signed request for Duo authentication. - The returned value should be passed into the Duo.init() call - in the rendered web page used for Duo authentication. - - Arguments: - - ikey -- Duo integration key - skey -- Duo secret key - akey -- Application secret key - username -- Primary-authenticated username - """ - if not username: - return ERR_USER - if not ikey or len(ikey) != IKEY_LEN: - return ERR_IKEY - if not skey or len(skey) != SKEY_LEN: - return ERR_SKEY - if not akey or len(akey) < AKEY_LEN: - return ERR_AKEY - - vals = [ username, ikey ] - - try: - duo_sig = _sign_vals(skey, vals, DUO_PREFIX, DUO_EXPIRE) - app_sig = _sign_vals(akey, vals, APP_PREFIX, APP_EXPIRE) - except: - return ERR_UNKNOWN - - return '%s:%s' % (duo_sig, app_sig) - -def verify_response(ikey, skey, akey, sig_response): - """Validate the signed response returned from Duo. - Returns the username of the authenticated user, or None. - - Arguments: - - ikey -- Duo integration key - skey -- Duo secret key - akey -- Application secret key - sig_response -- The signed response POST'ed to the server - """ - try: - auth_sig, app_sig = sig_response.split(':') - auth_user = _parse_vals(skey, auth_sig, AUTH_PREFIX) - app_user = _parse_vals(akey, app_sig, APP_PREFIX) - except: - return None - - if auth_user != app_user: - return None - - return auth_user diff --git a/jans-ce-setup/.gitignore b/jans-linux-setup/.gitignore similarity index 100% rename from jans-ce-setup/.gitignore rename to jans-linux-setup/.gitignore diff --git a/jans-ce-setup/LICENSE b/jans-linux-setup/LICENSE similarity index 100% rename from jans-ce-setup/LICENSE rename to jans-linux-setup/LICENSE diff --git a/jans-ce-setup/README.md b/jans-linux-setup/README.md similarity index 100% rename from jans-ce-setup/README.md rename to jans-linux-setup/README.md diff --git a/jans-ce-setup/configuration.json b/jans-linux-setup/configuration.json similarity index 100% rename from jans-ce-setup/configuration.json rename to jans-linux-setup/configuration.json diff --git a/jans-ce-setup/configuration.ldif b/jans-linux-setup/configuration.ldif similarity index 100% rename from jans-ce-setup/configuration.ldif rename to jans-linux-setup/configuration.ldif diff --git a/jans-ce-setup/convert.sh b/jans-linux-setup/convert.sh similarity index 100% rename from jans-ce-setup/convert.sh rename to jans-linux-setup/convert.sh diff --git a/jans-ce-setup/convert_lif.py b/jans-linux-setup/convert_lif.py similarity index 100% rename from jans-ce-setup/convert_lif.py rename to jans-linux-setup/convert_lif.py diff --git a/jans-ce-setup/docs/README.md b/jans-linux-setup/docs/README.md similarity index 100% rename from jans-ce-setup/docs/README.md rename to jans-linux-setup/docs/README.md diff --git a/jans-ce-setup/install.py b/jans-linux-setup/install.py similarity index 99% rename from jans-ce-setup/install.py rename to jans-linux-setup/install.py index 8911d3ec040..89cb8f7f993 100644 --- a/jans-ce-setup/install.py +++ b/jans-linux-setup/install.py @@ -362,7 +362,7 @@ def profile_setup(): print("Extracting jans-setup package") - extract_subdir(jans_zip_file, 'jans-ce-setup', setup_dir) + extract_subdir(jans_zip_file, 'jans-linux-setup', setup_dir) extract_subdir(sqlalchemy_zip_file, 'lib/sqlalchemy', os.path.join(setup_dir, 'setup_app/pylib/sqlalchemy')) extract_file(jans_zip_file, 'jans-config-api/docs/jans-config-api-swagger.yaml', os.path.join(setup_dir, 'setup_app/data')) diff --git a/jans-ce-setup/json2ldif.py b/jans-linux-setup/json2ldif.py similarity index 100% rename from jans-ce-setup/json2ldif.py rename to jans-linux-setup/json2ldif.py diff --git a/jans-ce-setup/logs/README b/jans-linux-setup/logs/README similarity index 100% rename from jans-ce-setup/logs/README rename to jans-linux-setup/logs/README diff --git a/jans-ce-setup/openbanking/.profiledirs b/jans-linux-setup/openbanking/.profiledirs similarity index 100% rename from jans-ce-setup/openbanking/.profiledirs rename to jans-linux-setup/openbanking/.profiledirs diff --git a/jans-ce-setup/openbanking/setup_app/config.py b/jans-linux-setup/openbanking/setup_app/config.py similarity index 100% rename from jans-ce-setup/openbanking/setup_app/config.py rename to jans-linux-setup/openbanking/setup_app/config.py diff --git a/jans-ce-setup/openbanking/setup_app/data/jetty_app_configuration.json b/jans-linux-setup/openbanking/setup_app/data/jetty_app_configuration.json similarity index 100% rename from jans-ce-setup/openbanking/setup_app/data/jetty_app_configuration.json rename to jans-linux-setup/openbanking/setup_app/data/jetty_app_configuration.json diff --git a/jans-ce-setup/openbanking/setup_app/utils/arg_parser.py b/jans-linux-setup/openbanking/setup_app/utils/arg_parser.py similarity index 100% rename from jans-ce-setup/openbanking/setup_app/utils/arg_parser.py rename to jans-linux-setup/openbanking/setup_app/utils/arg_parser.py diff --git a/jans-ce-setup/openbanking/static/extension/client_registration/Registration.py b/jans-linux-setup/openbanking/static/extension/client_registration/Registration.py similarity index 100% rename from jans-ce-setup/openbanking/static/extension/client_registration/Registration.py rename to jans-linux-setup/openbanking/static/extension/client_registration/Registration.py diff --git a/jans-ce-setup/openbanking/static/extension/client_registration/clientregistration.json b/jans-linux-setup/openbanking/static/extension/client_registration/clientregistration.json similarity index 100% rename from jans-ce-setup/openbanking/static/extension/client_registration/clientregistration.json rename to jans-linux-setup/openbanking/static/extension/client_registration/clientregistration.json diff --git a/jans-ce-setup/openbanking/static/extension/introspection/IntrospectionScript.py b/jans-linux-setup/openbanking/static/extension/introspection/IntrospectionScript.py similarity index 97% rename from jans-ce-setup/openbanking/static/extension/introspection/IntrospectionScript.py rename to jans-linux-setup/openbanking/static/extension/introspection/IntrospectionScript.py index f639bb98986..d07a47022d7 100644 --- a/jans-ce-setup/openbanking/static/extension/introspection/IntrospectionScript.py +++ b/jans-linux-setup/openbanking/static/extension/introspection/IntrospectionScript.py @@ -1,54 +1,54 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2021, Gluu -# -# Author: Yuriy Zabrovarnyy -# -# - -from io.jans.model.custom.script.type.introspection import IntrospectionType -from java.lang import String -from io.jans.as.server.model.common import AuthorizationGrantList -from io.jans.service.cdi.util import CdiUtil -from io.jans.as.server.service import GrantService -from io.jans.as.model.common import TokenType -from io.jans.as.server.model.ldap import TokenEntity -from io.jans.as.server.service import SessionIdService - -class Introspection(IntrospectionType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "Introspection script (retain claims). Initializing ..." - print "Introspection script (retain claims). Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "Introspection script (retain claims). Destroying ..." - print "Introspection script (retain claims). Destroyed successfully" - return True - - def getApiVersion(self): - return 11 - - # Returns boolean, true - apply introspection method, false - ignore it. - # This method is called after introspection response is ready. This method can modify introspection response. - # Note : - # responseAsJsonObject - is org.codehaus.jettison.json.JSONObject, you can use any method to manipulate json - # context is reference of org.gluu.oxauth.service.external.context.ExternalIntrospectionContext (in https://github.com/GluuFederation/oxauth project, ) - def modifyResponse(self, responseAsJsonObject, context): - print "modifyResponse invoked" - - sessionIdService = CdiUtil.bean(SessionIdService) - - if context.getTokenGrant().getSessionDn() is not None: - print "session id from context - %s" % context.getTokenGrant().getSessionDn() - sessionId = sessionIdService.getSessionByDn(context.getTokenGrant().getSessionDn()) # fetch from persistence - openbanking_intent_id = sessionId.getSessionAttributes().get("openbanking_intent_id") - print "openbanking_intent_id from session : "+openbanking_intent_id - responseAsJsonObject.accumulate("openbanking_intent_id", openbanking_intent_id) - - return True - +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2021, Gluu +# +# Author: Yuriy Zabrovarnyy +# +# + +from io.jans.model.custom.script.type.introspection import IntrospectionType +from java.lang import String +from io.jans.as.server.model.common import AuthorizationGrantList +from io.jans.service.cdi.util import CdiUtil +from io.jans.as.server.service import GrantService +from io.jans.as.model.common import TokenType +from io.jans.as.server.model.ldap import TokenEntity +from io.jans.as.server.service import SessionIdService + +class Introspection(IntrospectionType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "Introspection script (retain claims). Initializing ..." + print "Introspection script (retain claims). Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "Introspection script (retain claims). Destroying ..." + print "Introspection script (retain claims). Destroyed successfully" + return True + + def getApiVersion(self): + return 11 + + # Returns boolean, true - apply introspection method, false - ignore it. + # This method is called after introspection response is ready. This method can modify introspection response. + # Note : + # responseAsJsonObject - is org.codehaus.jettison.json.JSONObject, you can use any method to manipulate json + # context is reference of org.gluu.oxauth.service.external.context.ExternalIntrospectionContext (in https://github.com/GluuFederation/oxauth project, ) + def modifyResponse(self, responseAsJsonObject, context): + print "modifyResponse invoked" + + sessionIdService = CdiUtil.bean(SessionIdService) + + if context.getTokenGrant().getSessionDn() is not None: + print "session id from context - %s" % context.getTokenGrant().getSessionDn() + sessionId = sessionIdService.getSessionByDn(context.getTokenGrant().getSessionDn()) # fetch from persistence + openbanking_intent_id = sessionId.getSessionAttributes().get("openbanking_intent_id") + print "openbanking_intent_id from session : "+openbanking_intent_id + responseAsJsonObject.accumulate("openbanking_intent_id", openbanking_intent_id) + + return True + \ No newline at end of file diff --git a/jans-ce-setup/openbanking/static/extension/introspection/introspection.json b/jans-linux-setup/openbanking/static/extension/introspection/introspection.json similarity index 100% rename from jans-ce-setup/openbanking/static/extension/introspection/introspection.json rename to jans-linux-setup/openbanking/static/extension/introspection/introspection.json diff --git a/jans-ce-setup/openbanking/static/extension/person_authentication/OpenBanking.py b/jans-linux-setup/openbanking/static/extension/person_authentication/OpenBanking.py similarity index 100% rename from jans-ce-setup/openbanking/static/extension/person_authentication/OpenBanking.py rename to jans-linux-setup/openbanking/static/extension/person_authentication/OpenBanking.py diff --git a/jans-ce-setup/openbanking/static/extension/person_authentication/personauthentication.json b/jans-linux-setup/openbanking/static/extension/person_authentication/personauthentication.json similarity index 100% rename from jans-ce-setup/openbanking/static/extension/person_authentication/personauthentication.json rename to jans-linux-setup/openbanking/static/extension/person_authentication/personauthentication.json diff --git a/jans-ce-setup/openbanking/static/extension/update_token/UpdateToken.py b/jans-linux-setup/openbanking/static/extension/update_token/UpdateToken.py similarity index 100% rename from jans-ce-setup/openbanking/static/extension/update_token/UpdateToken.py rename to jans-linux-setup/openbanking/static/extension/update_token/UpdateToken.py diff --git a/jans-ce-setup/openbanking/static/extension/update_token/updatetoken.json b/jans-linux-setup/openbanking/static/extension/update_token/updatetoken.json similarity index 100% rename from jans-ce-setup/openbanking/static/extension/update_token/updatetoken.json rename to jans-linux-setup/openbanking/static/extension/update_token/updatetoken.json diff --git a/jans-ce-setup/openbanking/templates/apache/https_jans.conf b/jans-linux-setup/openbanking/templates/apache/https_jans.conf similarity index 100% rename from jans-ce-setup/openbanking/templates/apache/https_jans.conf rename to jans-linux-setup/openbanking/templates/apache/https_jans.conf diff --git a/jans-ce-setup/openbanking/templates/attributes.ldif b/jans-linux-setup/openbanking/templates/attributes.ldif similarity index 100% rename from jans-ce-setup/openbanking/templates/attributes.ldif rename to jans-linux-setup/openbanking/templates/attributes.ldif diff --git a/jans-ce-setup/openbanking/templates/configuration.ldif b/jans-linux-setup/openbanking/templates/configuration.ldif similarity index 100% rename from jans-ce-setup/openbanking/templates/configuration.ldif rename to jans-linux-setup/openbanking/templates/configuration.ldif diff --git a/jans-ce-setup/openbanking/templates/jans-auth/configuration.ldif b/jans-linux-setup/openbanking/templates/jans-auth/configuration.ldif similarity index 100% rename from jans-ce-setup/openbanking/templates/jans-auth/configuration.ldif rename to jans-linux-setup/openbanking/templates/jans-auth/configuration.ldif diff --git a/jans-ce-setup/openbanking/templates/jans-auth/jans-auth-config.json b/jans-linux-setup/openbanking/templates/jans-auth/jans-auth-config.json similarity index 100% rename from jans-ce-setup/openbanking/templates/jans-auth/jans-auth-config.json rename to jans-linux-setup/openbanking/templates/jans-auth/jans-auth-config.json diff --git a/jans-ce-setup/openbanking/templates/scopes.ldif b/jans-linux-setup/openbanking/templates/scopes.ldif similarity index 100% rename from jans-ce-setup/openbanking/templates/scopes.ldif rename to jans-linux-setup/openbanking/templates/scopes.ldif diff --git a/jans-ce-setup/openbanking/templates/scripts.ldif b/jans-linux-setup/openbanking/templates/scripts.ldif similarity index 100% rename from jans-ce-setup/openbanking/templates/scripts.ldif rename to jans-linux-setup/openbanking/templates/scripts.ldif diff --git a/jans-ce-setup/openbanking/templates/system_profile_systemd b/jans-linux-setup/openbanking/templates/system_profile_systemd similarity index 100% rename from jans-ce-setup/openbanking/templates/system_profile_systemd rename to jans-linux-setup/openbanking/templates/system_profile_systemd diff --git a/jans-ce-setup/requirements.txt b/jans-linux-setup/requirements.txt similarity index 100% rename from jans-ce-setup/requirements.txt rename to jans-linux-setup/requirements.txt diff --git a/jans-ce-setup/schema/README.md b/jans-linux-setup/schema/README.md similarity index 100% rename from jans-ce-setup/schema/README.md rename to jans-linux-setup/schema/README.md diff --git a/jans-ce-setup/schema/convert.py b/jans-linux-setup/schema/convert.py similarity index 100% rename from jans-ce-setup/schema/convert.py rename to jans-linux-setup/schema/convert.py diff --git a/jans-ce-setup/schema/custom_schema.json b/jans-linux-setup/schema/custom_schema.json similarity index 100% rename from jans-ce-setup/schema/custom_schema.json rename to jans-linux-setup/schema/custom_schema.json diff --git a/jans-ce-setup/schema/custom_schema_gluu.json b/jans-linux-setup/schema/custom_schema_gluu.json similarity index 100% rename from jans-ce-setup/schema/custom_schema_gluu.json rename to jans-linux-setup/schema/custom_schema_gluu.json diff --git a/jans-ce-setup/schema/detect_data_types.py b/jans-linux-setup/schema/detect_data_types.py similarity index 100% rename from jans-ce-setup/schema/detect_data_types.py rename to jans-linux-setup/schema/detect_data_types.py diff --git a/jans-ce-setup/schema/generator.py b/jans-linux-setup/schema/generator.py similarity index 100% rename from jans-ce-setup/schema/generator.py rename to jans-linux-setup/schema/generator.py diff --git a/jans-ce-setup/schema/jans_schema.json b/jans-linux-setup/schema/jans_schema.json similarity index 100% rename from jans-ce-setup/schema/jans_schema.json rename to jans-linux-setup/schema/jans_schema.json diff --git a/jans-ce-setup/schema/jans_schema_mappings.json b/jans-linux-setup/schema/jans_schema_mappings.json similarity index 100% rename from jans-ce-setup/schema/jans_schema_mappings.json rename to jans-linux-setup/schema/jans_schema_mappings.json diff --git a/jans-ce-setup/schema/manager.py b/jans-linux-setup/schema/manager.py similarity index 100% rename from jans-ce-setup/schema/manager.py rename to jans-linux-setup/schema/manager.py diff --git a/jans-ce-setup/schema/mapping.json b/jans-linux-setup/schema/mapping.json similarity index 100% rename from jans-ce-setup/schema/mapping.json rename to jans-linux-setup/schema/mapping.json diff --git a/jans-ce-setup/schema/opendj_types.json b/jans-linux-setup/schema/opendj_types.json similarity index 100% rename from jans-ce-setup/schema/opendj_types.json rename to jans-linux-setup/schema/opendj_types.json diff --git a/jans-ce-setup/schema/schema_parser.py b/jans-linux-setup/schema/schema_parser.py similarity index 100% rename from jans-ce-setup/schema/schema_parser.py rename to jans-linux-setup/schema/schema_parser.py diff --git a/jans-ce-setup/setup.properties.sample b/jans-linux-setup/setup.properties.sample similarity index 100% rename from jans-ce-setup/setup.properties.sample rename to jans-linux-setup/setup.properties.sample diff --git a/jans-ce-setup/setup.py b/jans-linux-setup/setup.py similarity index 100% rename from jans-ce-setup/setup.py rename to jans-linux-setup/setup.py diff --git a/jans-ce-setup/setup_app/__init__.py b/jans-linux-setup/setup_app/__init__.py similarity index 100% rename from jans-ce-setup/setup_app/__init__.py rename to jans-linux-setup/setup_app/__init__.py diff --git a/jans-ce-setup/setup_app/config.py b/jans-linux-setup/setup_app/config.py similarity index 100% rename from jans-ce-setup/setup_app/config.py rename to jans-linux-setup/setup_app/config.py diff --git a/jans-ce-setup/setup_app/data/jetty_app_configuration.json b/jans-linux-setup/setup_app/data/jetty_app_configuration.json similarity index 100% rename from jans-ce-setup/setup_app/data/jetty_app_configuration.json rename to jans-linux-setup/setup_app/data/jetty_app_configuration.json diff --git a/jans-ce-setup/setup_app/data/package_list.json b/jans-linux-setup/setup_app/data/package_list.json similarity index 100% rename from jans-ce-setup/setup_app/data/package_list.json rename to jans-linux-setup/setup_app/data/package_list.json diff --git a/jans-ce-setup/setup_app/installers/__init__.py b/jans-linux-setup/setup_app/installers/__init__.py similarity index 100% rename from jans-ce-setup/setup_app/installers/__init__.py rename to jans-linux-setup/setup_app/installers/__init__.py diff --git a/jans-ce-setup/setup_app/installers/base.py b/jans-linux-setup/setup_app/installers/base.py similarity index 100% rename from jans-ce-setup/setup_app/installers/base.py rename to jans-linux-setup/setup_app/installers/base.py diff --git a/jans-ce-setup/setup_app/installers/config_api.py b/jans-linux-setup/setup_app/installers/config_api.py similarity index 100% rename from jans-ce-setup/setup_app/installers/config_api.py rename to jans-linux-setup/setup_app/installers/config_api.py diff --git a/jans-ce-setup/setup_app/installers/couchbase.py b/jans-linux-setup/setup_app/installers/couchbase.py similarity index 100% rename from jans-ce-setup/setup_app/installers/couchbase.py rename to jans-linux-setup/setup_app/installers/couchbase.py diff --git a/jans-ce-setup/setup_app/installers/eleven.py b/jans-linux-setup/setup_app/installers/eleven.py similarity index 100% rename from jans-ce-setup/setup_app/installers/eleven.py rename to jans-linux-setup/setup_app/installers/eleven.py diff --git a/jans-ce-setup/setup_app/installers/fido.py b/jans-linux-setup/setup_app/installers/fido.py similarity index 100% rename from jans-ce-setup/setup_app/installers/fido.py rename to jans-linux-setup/setup_app/installers/fido.py diff --git a/jans-ce-setup/setup_app/installers/httpd.py b/jans-linux-setup/setup_app/installers/httpd.py similarity index 100% rename from jans-ce-setup/setup_app/installers/httpd.py rename to jans-linux-setup/setup_app/installers/httpd.py diff --git a/jans-ce-setup/setup_app/installers/jans.py b/jans-linux-setup/setup_app/installers/jans.py similarity index 100% rename from jans-ce-setup/setup_app/installers/jans.py rename to jans-linux-setup/setup_app/installers/jans.py diff --git a/jans-ce-setup/setup_app/installers/jans_auth.py b/jans-linux-setup/setup_app/installers/jans_auth.py similarity index 100% rename from jans-ce-setup/setup_app/installers/jans_auth.py rename to jans-linux-setup/setup_app/installers/jans_auth.py diff --git a/jans-ce-setup/setup_app/installers/jans_cli.py b/jans-linux-setup/setup_app/installers/jans_cli.py similarity index 100% rename from jans-ce-setup/setup_app/installers/jans_cli.py rename to jans-linux-setup/setup_app/installers/jans_cli.py diff --git a/jans-ce-setup/setup_app/installers/jetty.py b/jans-linux-setup/setup_app/installers/jetty.py similarity index 100% rename from jans-ce-setup/setup_app/installers/jetty.py rename to jans-linux-setup/setup_app/installers/jetty.py diff --git a/jans-ce-setup/setup_app/installers/jre.py b/jans-linux-setup/setup_app/installers/jre.py similarity index 100% rename from jans-ce-setup/setup_app/installers/jre.py rename to jans-linux-setup/setup_app/installers/jre.py diff --git a/jans-ce-setup/setup_app/installers/jython.py b/jans-linux-setup/setup_app/installers/jython.py similarity index 100% rename from jans-ce-setup/setup_app/installers/jython.py rename to jans-linux-setup/setup_app/installers/jython.py diff --git a/jans-ce-setup/setup_app/installers/opendj.py b/jans-linux-setup/setup_app/installers/opendj.py similarity index 100% rename from jans-ce-setup/setup_app/installers/opendj.py rename to jans-linux-setup/setup_app/installers/opendj.py diff --git a/jans-ce-setup/setup_app/installers/oxd.py b/jans-linux-setup/setup_app/installers/oxd.py similarity index 100% rename from jans-ce-setup/setup_app/installers/oxd.py rename to jans-linux-setup/setup_app/installers/oxd.py diff --git a/jans-ce-setup/setup_app/installers/rdbm.py b/jans-linux-setup/setup_app/installers/rdbm.py similarity index 100% rename from jans-ce-setup/setup_app/installers/rdbm.py rename to jans-linux-setup/setup_app/installers/rdbm.py diff --git a/jans-ce-setup/setup_app/installers/scim.py b/jans-linux-setup/setup_app/installers/scim.py similarity index 100% rename from jans-ce-setup/setup_app/installers/scim.py rename to jans-linux-setup/setup_app/installers/scim.py diff --git a/jans-ce-setup/setup_app/messages.py b/jans-linux-setup/setup_app/messages.py similarity index 100% rename from jans-ce-setup/setup_app/messages.py rename to jans-linux-setup/setup_app/messages.py diff --git a/jans-ce-setup/setup_app/paths.py b/jans-linux-setup/setup_app/paths.py similarity index 100% rename from jans-ce-setup/setup_app/paths.py rename to jans-linux-setup/setup_app/paths.py diff --git a/jans-ce-setup/setup_app/pylib/Properties.py b/jans-linux-setup/setup_app/pylib/Properties.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/Properties.py rename to jans-linux-setup/setup_app/pylib/Properties.py diff --git a/jans-ce-setup/setup_app/pylib/__init__.py b/jans-linux-setup/setup_app/pylib/__init__.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/__init__.py rename to jans-linux-setup/setup_app/pylib/__init__.py diff --git a/jans-ce-setup/setup_app/pylib/compat.py b/jans-linux-setup/setup_app/pylib/compat.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/compat.py rename to jans-linux-setup/setup_app/pylib/compat.py diff --git a/jans-ce-setup/setup_app/pylib/jproperties.py b/jans-linux-setup/setup_app/pylib/jproperties.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/jproperties.py rename to jans-linux-setup/setup_app/pylib/jproperties.py diff --git a/jans-ce-setup/setup_app/pylib/ldif4/LICENSE b/jans-linux-setup/setup_app/pylib/ldif4/LICENSE similarity index 100% rename from jans-ce-setup/setup_app/pylib/ldif4/LICENSE rename to jans-linux-setup/setup_app/pylib/ldif4/LICENSE diff --git a/jans-ce-setup/setup_app/pylib/ldif4/__init__.py b/jans-linux-setup/setup_app/pylib/ldif4/__init__.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/ldif4/__init__.py rename to jans-linux-setup/setup_app/pylib/ldif4/__init__.py diff --git a/jans-ce-setup/setup_app/pylib/ldif4/ldif.py b/jans-linux-setup/setup_app/pylib/ldif4/ldif.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/ldif4/ldif.py rename to jans-linux-setup/setup_app/pylib/ldif4/ldif.py diff --git a/jans-ce-setup/setup_app/pylib/pyDes.py b/jans-linux-setup/setup_app/pylib/pyDes.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/pyDes.py rename to jans-linux-setup/setup_app/pylib/pyDes.py diff --git a/jans-ce-setup/setup_app/pylib/schema.py b/jans-linux-setup/setup_app/pylib/schema.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/schema.py rename to jans-linux-setup/setup_app/pylib/schema.py diff --git a/jans-ce-setup/setup_app/pylib/six.py b/jans-linux-setup/setup_app/pylib/six.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/six.py rename to jans-linux-setup/setup_app/pylib/six.py diff --git a/jans-ce-setup/setup_app/pylib/tokenizer.py b/jans-linux-setup/setup_app/pylib/tokenizer.py similarity index 100% rename from jans-ce-setup/setup_app/pylib/tokenizer.py rename to jans-linux-setup/setup_app/pylib/tokenizer.py diff --git a/jans-ce-setup/setup_app/setup_options.py b/jans-linux-setup/setup_app/setup_options.py similarity index 100% rename from jans-ce-setup/setup_app/setup_options.py rename to jans-linux-setup/setup_app/setup_options.py diff --git a/jans-ce-setup/setup_app/static.py b/jans-linux-setup/setup_app/static.py similarity index 100% rename from jans-ce-setup/setup_app/static.py rename to jans-linux-setup/setup_app/static.py diff --git a/jans-ce-setup/setup_app/test_data_loader.py b/jans-linux-setup/setup_app/test_data_loader.py similarity index 100% rename from jans-ce-setup/setup_app/test_data_loader.py rename to jans-linux-setup/setup_app/test_data_loader.py diff --git a/jans-ce-setup/setup_app/utils/__init__.py b/jans-linux-setup/setup_app/utils/__init__.py similarity index 100% rename from jans-ce-setup/setup_app/utils/__init__.py rename to jans-linux-setup/setup_app/utils/__init__.py diff --git a/jans-ce-setup/setup_app/utils/arg_parser.py b/jans-linux-setup/setup_app/utils/arg_parser.py similarity index 100% rename from jans-ce-setup/setup_app/utils/arg_parser.py rename to jans-linux-setup/setup_app/utils/arg_parser.py diff --git a/jans-ce-setup/setup_app/utils/attributes.py b/jans-linux-setup/setup_app/utils/attributes.py similarity index 100% rename from jans-ce-setup/setup_app/utils/attributes.py rename to jans-linux-setup/setup_app/utils/attributes.py diff --git a/jans-ce-setup/setup_app/utils/base.py b/jans-linux-setup/setup_app/utils/base.py similarity index 100% rename from jans-ce-setup/setup_app/utils/base.py rename to jans-linux-setup/setup_app/utils/base.py diff --git a/jans-ce-setup/setup_app/utils/cbm.py b/jans-linux-setup/setup_app/utils/cbm.py similarity index 100% rename from jans-ce-setup/setup_app/utils/cbm.py rename to jans-linux-setup/setup_app/utils/cbm.py diff --git a/jans-ce-setup/setup_app/utils/collect_properties.py b/jans-linux-setup/setup_app/utils/collect_properties.py similarity index 100% rename from jans-ce-setup/setup_app/utils/collect_properties.py rename to jans-linux-setup/setup_app/utils/collect_properties.py diff --git a/jans-ce-setup/setup_app/utils/config_property.py b/jans-linux-setup/setup_app/utils/config_property.py similarity index 100% rename from jans-ce-setup/setup_app/utils/config_property.py rename to jans-linux-setup/setup_app/utils/config_property.py diff --git a/jans-ce-setup/setup_app/utils/crypto64.py b/jans-linux-setup/setup_app/utils/crypto64.py similarity index 100% rename from jans-ce-setup/setup_app/utils/crypto64.py rename to jans-linux-setup/setup_app/utils/crypto64.py diff --git a/jans-ce-setup/setup_app/utils/db_utils.py b/jans-linux-setup/setup_app/utils/db_utils.py similarity index 100% rename from jans-ce-setup/setup_app/utils/db_utils.py rename to jans-linux-setup/setup_app/utils/db_utils.py diff --git a/jans-ce-setup/setup_app/utils/dbutils.py b/jans-linux-setup/setup_app/utils/dbutils.py similarity index 100% rename from jans-ce-setup/setup_app/utils/dbutils.py rename to jans-linux-setup/setup_app/utils/dbutils.py diff --git a/jans-ce-setup/setup_app/utils/ldif_utils.py b/jans-linux-setup/setup_app/utils/ldif_utils.py similarity index 100% rename from jans-ce-setup/setup_app/utils/ldif_utils.py rename to jans-linux-setup/setup_app/utils/ldif_utils.py diff --git a/jans-ce-setup/setup_app/utils/package_utils.py b/jans-linux-setup/setup_app/utils/package_utils.py similarity index 100% rename from jans-ce-setup/setup_app/utils/package_utils.py rename to jans-linux-setup/setup_app/utils/package_utils.py diff --git a/jans-ce-setup/setup_app/utils/printVersion.py b/jans-linux-setup/setup_app/utils/printVersion.py similarity index 100% rename from jans-ce-setup/setup_app/utils/printVersion.py rename to jans-linux-setup/setup_app/utils/printVersion.py diff --git a/jans-ce-setup/setup_app/utils/progress.py b/jans-linux-setup/setup_app/utils/progress.py similarity index 100% rename from jans-ce-setup/setup_app/utils/progress.py rename to jans-linux-setup/setup_app/utils/progress.py diff --git a/jans-ce-setup/setup_app/utils/properties_utils.py b/jans-linux-setup/setup_app/utils/properties_utils.py similarity index 100% rename from jans-ce-setup/setup_app/utils/properties_utils.py rename to jans-linux-setup/setup_app/utils/properties_utils.py diff --git a/jans-ce-setup/setup_app/utils/setup_utils.py b/jans-linux-setup/setup_app/utils/setup_utils.py similarity index 100% rename from jans-ce-setup/setup_app/utils/setup_utils.py rename to jans-linux-setup/setup_app/utils/setup_utils.py diff --git a/jans-ce-setup/setup_app/utils/spanner.py b/jans-linux-setup/setup_app/utils/spanner.py similarity index 100% rename from jans-ce-setup/setup_app/utils/spanner.py rename to jans-linux-setup/setup_app/utils/spanner.py diff --git a/jans-ce-setup/static/auth/conf/cert_creds.json b/jans-linux-setup/static/auth/conf/cert_creds.json similarity index 100% rename from jans-ce-setup/static/auth/conf/cert_creds.json rename to jans-linux-setup/static/auth/conf/cert_creds.json diff --git a/jans-ce-setup/static/auth/conf/duo_creds.json b/jans-linux-setup/static/auth/conf/duo_creds.json similarity index 100% rename from jans-ce-setup/static/auth/conf/duo_creds.json rename to jans-linux-setup/static/auth/conf/duo_creds.json diff --git a/jans-ce-setup/static/auth/conf/gplus_client_secrets.json b/jans-linux-setup/static/auth/conf/gplus_client_secrets.json similarity index 100% rename from jans-ce-setup/static/auth/conf/gplus_client_secrets.json rename to jans-linux-setup/static/auth/conf/gplus_client_secrets.json diff --git a/jans-ce-setup/static/auth/conf/otp_configuration.json b/jans-linux-setup/static/auth/conf/otp_configuration.json similarity index 94% rename from jans-ce-setup/static/auth/conf/otp_configuration.json rename to jans-linux-setup/static/auth/conf/otp_configuration.json index 26f3594aa2b..53767c74839 100644 --- a/jans-ce-setup/static/auth/conf/otp_configuration.json +++ b/jans-linux-setup/static/auth/conf/otp_configuration.json @@ -1,13 +1,13 @@ -{ - "hotp":{ - "keyLength":20, - "digits":6, - "lookAheadWindow":10 - }, - "totp":{ - "keyLength":20, - "digits":6, - "timeStep":30, - "hmacShaAlgorithm": "sha1" - } -} +{ + "hotp":{ + "keyLength":20, + "digits":6, + "lookAheadWindow":10 + }, + "totp":{ + "keyLength":20, + "digits":6, + "timeStep":30, + "hmacShaAlgorithm": "sha1" + } +} diff --git a/jans-ce-setup/static/auth/conf/super_gluu_creds.json b/jans-linux-setup/static/auth/conf/super_gluu_creds.json similarity index 95% rename from jans-ce-setup/static/auth/conf/super_gluu_creds.json rename to jans-linux-setup/static/auth/conf/super_gluu_creds.json index 9a692788225..cf85bb5453c 100644 --- a/jans-ce-setup/static/auth/conf/super_gluu_creds.json +++ b/jans-linux-setup/static/auth/conf/super_gluu_creds.json @@ -1,19 +1,19 @@ -{ - "android":{ - "jans":{ - "enabled":true, - "access_key":"36WH2JiexBOoAIBP", - "secret_access_key":"ueqsU2Dc7m3r4HmLz4M79DpzzCNqTfek" - } - }, - "ios":{ - "jans":{ - "enabled":true, - "access_key":"auONAdePWoYFBX6V", - "secret_access_key":"f050aW0nnihym0GwktWd7O15jGSQcoei" - } - }, - "jans":{ - "server_uri":"https://api.jans.io" - } -} +{ + "android":{ + "jans":{ + "enabled":true, + "access_key":"36WH2JiexBOoAIBP", + "secret_access_key":"ueqsU2Dc7m3r4HmLz4M79DpzzCNqTfek" + } + }, + "ios":{ + "jans":{ + "enabled":true, + "access_key":"auONAdePWoYFBX6V", + "secret_access_key":"f050aW0nnihym0GwktWd7O15jGSQcoei" + } + }, + "jans":{ + "server_uri":"https://api.jans.io" + } +} diff --git a/jans-ce-setup/static/auth/conf/vericloud_jans_creds.json b/jans-linux-setup/static/auth/conf/vericloud_jans_creds.json similarity index 100% rename from jans-ce-setup/static/auth/conf/vericloud_jans_creds.json rename to jans-linux-setup/static/auth/conf/vericloud_jans_creds.json diff --git a/jans-ce-setup/static/auth/fido2/server_metadata/.dontdelete b/jans-linux-setup/static/auth/fido2/server_metadata/.dontdelete similarity index 100% rename from jans-ce-setup/static/auth/fido2/server_metadata/.dontdelete rename to jans-linux-setup/static/auth/fido2/server_metadata/.dontdelete diff --git a/jans-ce-setup/static/cache-refresh/o_site.ldif b/jans-linux-setup/static/cache-refresh/o_site.ldif similarity index 100% rename from jans-ce-setup/static/cache-refresh/o_site.ldif rename to jans-linux-setup/static/cache-refresh/o_site.ldif diff --git a/jans-ce-setup/static/couchbase/couchbase_attribute_resolver.xml b/jans-linux-setup/static/couchbase/couchbase_attribute_resolver.xml similarity index 100% rename from jans-ce-setup/static/couchbase/couchbase_attribute_resolver.xml rename to jans-linux-setup/static/couchbase/couchbase_attribute_resolver.xml diff --git a/jans-ce-setup/static/couchbase/couchbase_bean.xml b/jans-linux-setup/static/couchbase/couchbase_bean.xml similarity index 100% rename from jans-ce-setup/static/couchbase/couchbase_bean.xml rename to jans-linux-setup/static/couchbase/couchbase_bean.xml diff --git a/jans-ce-setup/static/couchbase/disable-thp.init.d b/jans-linux-setup/static/couchbase/disable-thp.init.d similarity index 100% rename from jans-ce-setup/static/couchbase/disable-thp.init.d rename to jans-linux-setup/static/couchbase/disable-thp.init.d diff --git a/jans-ce-setup/static/couchbase/get_map.py b/jans-linux-setup/static/couchbase/get_map.py similarity index 100% rename from jans-ce-setup/static/couchbase/get_map.py rename to jans-linux-setup/static/couchbase/get_map.py diff --git a/jans-ce-setup/static/couchbase/index.json b/jans-linux-setup/static/couchbase/index.json similarity index 100% rename from jans-ce-setup/static/couchbase/index.json rename to jans-linux-setup/static/couchbase/index.json diff --git a/jans-ce-setup/static/couchbase/maps.json b/jans-linux-setup/static/couchbase/maps.json similarity index 100% rename from jans-ce-setup/static/couchbase/maps.json rename to jans-linux-setup/static/couchbase/maps.json diff --git a/jans-ce-setup/static/eleven/jans-eleven-tokens.tar.gz b/jans-linux-setup/static/eleven/jans-eleven-tokens.tar.gz similarity index 100% rename from jans-ce-setup/static/eleven/jans-eleven-tokens.tar.gz rename to jans-linux-setup/static/eleven/jans-eleven-tokens.tar.gz diff --git a/jans-ce-setup/static/extension/application_session/SampleScript.py b/jans-linux-setup/static/extension/application_session/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/application_session/SampleScript.py rename to jans-linux-setup/static/extension/application_session/SampleScript.py diff --git a/jans-ce-setup/static/extension/cache_refresh/SampleScript.py b/jans-linux-setup/static/extension/cache_refresh/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/cache_refresh/SampleScript.py rename to jans-linux-setup/static/extension/cache_refresh/SampleScript.py diff --git a/jans-ce-setup/static/extension/ciba/end_user_notification.py b/jans-linux-setup/static/extension/ciba/end_user_notification.py similarity index 100% rename from jans-ce-setup/static/extension/ciba/end_user_notification.py rename to jans-linux-setup/static/extension/ciba/end_user_notification.py diff --git a/jans-ce-setup/static/extension/client_registration/Casa.py b/jans-linux-setup/static/extension/client_registration/Casa.py similarity index 100% rename from jans-ce-setup/static/extension/client_registration/Casa.py rename to jans-linux-setup/static/extension/client_registration/Casa.py diff --git a/jans-ce-setup/static/extension/client_registration/SampleScript.py b/jans-linux-setup/static/extension/client_registration/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/client_registration/SampleScript.py rename to jans-linux-setup/static/extension/client_registration/SampleScript.py diff --git a/jans-ce-setup/static/extension/consent_gathering/ConsentGatheringSample.py b/jans-linux-setup/static/extension/consent_gathering/ConsentGatheringSample.py similarity index 100% rename from jans-ce-setup/static/extension/consent_gathering/ConsentGatheringSample.py rename to jans-linux-setup/static/extension/consent_gathering/ConsentGatheringSample.py diff --git a/jans-ce-setup/static/extension/discovery/discovery.py b/jans-linux-setup/static/extension/discovery/discovery.py similarity index 100% rename from jans-ce-setup/static/extension/discovery/discovery.py rename to jans-linux-setup/static/extension/discovery/discovery.py diff --git a/jans-ce-setup/static/extension/dynamic_scope/dynamic_permission.py b/jans-linux-setup/static/extension/dynamic_scope/dynamic_permission.py similarity index 97% rename from jans-ce-setup/static/extension/dynamic_scope/dynamic_permission.py rename to jans-linux-setup/static/extension/dynamic_scope/dynamic_permission.py index 7e36cc3c1b8..f6d57d1f30b 100644 --- a/jans-ce-setup/static/extension/dynamic_scope/dynamic_permission.py +++ b/jans-linux-setup/static/extension/dynamic_scope/dynamic_permission.py @@ -1,53 +1,53 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Yuriy Movchan -# - -from io.jans.model.custom.script.type.scope import DynamicScopeType -from io.jans.service.cdi.util import CdiUtil -from io.jans.as.server.service import UserService -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList - -import java - -class DynamicScope(DynamicScopeType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "Permission dynamic scope. Initialization" - - print "Permission dynamic scope. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "Permission dynamic scope. Destroy" - print "Permission dynamic scope. Destroyed successfully" - return True - - # Update Json Web token before signing/encrypring it - # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext - # configurationAttributes is java.util.Map - def update(self, dynamicScopeContext, configurationAttributes): - print "Permission dynamic scope scope. Update method" - - authorizationGrant = dynamicScopeContext.getAuthorizationGrant() - user = dynamicScopeContext.getUser() - jsonWebResponse = dynamicScopeContext.getJsonWebResponse() - claims = jsonWebResponse.getClaims() - - userService = CdiUtil.bean(UserService) - roles = userService.getCustomAttribute(user, "role") - if roles != None: - claims.setClaim("role", roles.getValues()) - - return True - - def getSupportedClaims(self, configurationAttributes): - return Arrays.asList("role") - - def getApiVersion(self): - return 11 +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2016, Janssen +# +# Author: Yuriy Movchan +# + +from io.jans.model.custom.script.type.scope import DynamicScopeType +from io.jans.service.cdi.util import CdiUtil +from io.jans.as.server.service import UserService +from io.jans.util import StringHelper, ArrayHelper +from java.util import Arrays, ArrayList + +import java + +class DynamicScope(DynamicScopeType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "Permission dynamic scope. Initialization" + + print "Permission dynamic scope. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "Permission dynamic scope. Destroy" + print "Permission dynamic scope. Destroyed successfully" + return True + + # Update Json Web token before signing/encrypring it + # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext + # configurationAttributes is java.util.Map + def update(self, dynamicScopeContext, configurationAttributes): + print "Permission dynamic scope scope. Update method" + + authorizationGrant = dynamicScopeContext.getAuthorizationGrant() + user = dynamicScopeContext.getUser() + jsonWebResponse = dynamicScopeContext.getJsonWebResponse() + claims = jsonWebResponse.getClaims() + + userService = CdiUtil.bean(UserService) + roles = userService.getCustomAttribute(user, "role") + if roles != None: + claims.setClaim("role", roles.getValues()) + + return True + + def getSupportedClaims(self, configurationAttributes): + return Arrays.asList("role") + + def getApiVersion(self): + return 11 diff --git a/jans-ce-setup/static/extension/dynamic_scope/memberof_attribute.py b/jans-linux-setup/static/extension/dynamic_scope/memberof_attribute.py similarity index 97% rename from jans-ce-setup/static/extension/dynamic_scope/memberof_attribute.py rename to jans-linux-setup/static/extension/dynamic_scope/memberof_attribute.py index 6f0a2267fe1..62e8bca7fce 100644 --- a/jans-ce-setup/static/extension/dynamic_scope/memberof_attribute.py +++ b/jans-linux-setup/static/extension/dynamic_scope/memberof_attribute.py @@ -1,64 +1,64 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Sahil Arora -# - -from io.jans.model.custom.script.type.scope import DynamicScopeType -from io.jans.as.server.service import UserService -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList -from io.jans.service.cdi.util import CdiUtil - -import java - -class DynamicScope(DynamicScopeType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, configurationAttributes): - print "Dynamic scope. Initialization" - - print "Dynamic scope. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "Dynamic scope. Destroy" - print "Dynamic scope. Destroyed successfully" - return True - - # Update Json Web token before signing/encrypring it - # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext - # configurationAttributes is java.util.Map - def update(self, dynamicScopeContext, configurationAttributes): - print "Dynamic scope. Update method" - userService = CdiUtil.bean(UserService) - print "-->userService: " + userService.toString() - - dynamicScopes = dynamicScopeContext.getDynamicScopes() - authorizationGrant = dynamicScopeContext.getAuthorizationGrant() - user = dynamicScopeContext.getUser() - jsonWebResponse = dynamicScopeContext.getJsonWebResponse() - claims = jsonWebResponse.getClaims() - - member_of_list= userService.getCustomAttribute(user, "memberof") - if member_of_list == None: - print "-->memberOf: is null" - return None - else: - members_list = member_of_list.getValues() - membersArray = [] - for members in members_list: - group = userService.getUserByDn(members, "displayName") - membersArray.append(group.getAttribute("displayName")) - - claims.setClaim("memberof", Arrays.asList(membersArray ) ) - - return True - - def getSupportedClaims(self, configurationAttributes): - return Arrays.asList("memberof") - - def getApiVersion(self): - return 2 +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2016, Janssen +# +# Author: Sahil Arora +# + +from io.jans.model.custom.script.type.scope import DynamicScopeType +from io.jans.as.server.service import UserService +from io.jans.util import StringHelper, ArrayHelper +from java.util import Arrays, ArrayList +from io.jans.service.cdi.util import CdiUtil + +import java + +class DynamicScope(DynamicScopeType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, configurationAttributes): + print "Dynamic scope. Initialization" + + print "Dynamic scope. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "Dynamic scope. Destroy" + print "Dynamic scope. Destroyed successfully" + return True + + # Update Json Web token before signing/encrypring it + # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext + # configurationAttributes is java.util.Map + def update(self, dynamicScopeContext, configurationAttributes): + print "Dynamic scope. Update method" + userService = CdiUtil.bean(UserService) + print "-->userService: " + userService.toString() + + dynamicScopes = dynamicScopeContext.getDynamicScopes() + authorizationGrant = dynamicScopeContext.getAuthorizationGrant() + user = dynamicScopeContext.getUser() + jsonWebResponse = dynamicScopeContext.getJsonWebResponse() + claims = jsonWebResponse.getClaims() + + member_of_list= userService.getCustomAttribute(user, "memberof") + if member_of_list == None: + print "-->memberOf: is null" + return None + else: + members_list = member_of_list.getValues() + membersArray = [] + for members in members_list: + group = userService.getUserByDn(members, "displayName") + membersArray.append(group.getAttribute("displayName")) + + claims.setClaim("memberof", Arrays.asList(membersArray ) ) + + return True + + def getSupportedClaims(self, configurationAttributes): + return Arrays.asList("memberof") + + def getApiVersion(self): + return 2 diff --git a/jans-ce-setup/static/extension/dynamic_scope/org_name.py b/jans-linux-setup/static/extension/dynamic_scope/org_name.py similarity index 97% rename from jans-ce-setup/static/extension/dynamic_scope/org_name.py rename to jans-linux-setup/static/extension/dynamic_scope/org_name.py index bc3e6e8aece..0886f0a3fe0 100644 --- a/jans-ce-setup/static/extension/dynamic_scope/org_name.py +++ b/jans-linux-setup/static/extension/dynamic_scope/org_name.py @@ -1,51 +1,51 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Yuriy Movchan -# - -from io.jans.model.custom.script.type.scope import DynamicScopeType -from io.jans.as.server.service import UserService -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList - -import java - -class DynamicScope(DynamicScopeType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "Dynamic scope. Initialization" - - print "Dynamic scope. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "Dynamic scope. Destroy" - print "Dynamic scope. Destroyed successfully" - return True - - # Update Json Web token before signing/encrypring it - # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext - # configurationAttributes is java.util.Map - def update(self, dynamicScopeContext, configurationAttributes): - print "Dynamic scope. Update method" - - dynamicScopes = dynamicScopeContext.getDynamicScopes() - authorizationGrant = dynamicScopeContext.getAuthorizationGrant() - user = dynamicScopeContext.getUser() - jsonWebResponse = dynamicScopeContext.getJsonWebResponse() - claims = jsonWebResponse.getClaims() - - # Add organization name if there is scope = org_name - claims.setClaim("org_name", "Janssen, Inc.") - - return True - - def getSupportedClaims(self, configurationAttributes): - return Arrays.asList("org_name") - - def getApiVersion(self): - return 11 +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2016, Janssen +# +# Author: Yuriy Movchan +# + +from io.jans.model.custom.script.type.scope import DynamicScopeType +from io.jans.as.server.service import UserService +from io.jans.util import StringHelper, ArrayHelper +from java.util import Arrays, ArrayList + +import java + +class DynamicScope(DynamicScopeType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "Dynamic scope. Initialization" + + print "Dynamic scope. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "Dynamic scope. Destroy" + print "Dynamic scope. Destroyed successfully" + return True + + # Update Json Web token before signing/encrypring it + # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext + # configurationAttributes is java.util.Map + def update(self, dynamicScopeContext, configurationAttributes): + print "Dynamic scope. Update method" + + dynamicScopes = dynamicScopeContext.getDynamicScopes() + authorizationGrant = dynamicScopeContext.getAuthorizationGrant() + user = dynamicScopeContext.getUser() + jsonWebResponse = dynamicScopeContext.getJsonWebResponse() + claims = jsonWebResponse.getClaims() + + # Add organization name if there is scope = org_name + claims.setClaim("org_name", "Janssen, Inc.") + + return True + + def getSupportedClaims(self, configurationAttributes): + return Arrays.asList("org_name") + + def getApiVersion(self): + return 11 diff --git a/jans-ce-setup/static/extension/dynamic_scope/session_parameter.py b/jans-linux-setup/static/extension/dynamic_scope/session_parameter.py similarity index 100% rename from jans-ce-setup/static/extension/dynamic_scope/session_parameter.py rename to jans-linux-setup/static/extension/dynamic_scope/session_parameter.py diff --git a/jans-ce-setup/static/extension/dynamic_scope/work_phone.py b/jans-linux-setup/static/extension/dynamic_scope/work_phone.py similarity index 97% rename from jans-ce-setup/static/extension/dynamic_scope/work_phone.py rename to jans-linux-setup/static/extension/dynamic_scope/work_phone.py index d4e8601cc4d..dedc0f54521 100644 --- a/jans-ce-setup/static/extension/dynamic_scope/work_phone.py +++ b/jans-linux-setup/static/extension/dynamic_scope/work_phone.py @@ -1,55 +1,55 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Yuriy Movchan -# - -from io.jans.model.custom.script.type.scope import DynamicScopeType -from io.jans.service.cdi.util import CdiUtil -from io.jans.as.server.service import UserService -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList - -import java - -class DynamicScope(DynamicScopeType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "Dynamic scope. Initialization" - - print "Dynamic scope. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "Dynamic scope. Destroy" - print "Dynamic scope. Destroyed successfully" - return True - - # Update Json Web token before signing/encrypring it - # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext - # configurationAttributes is java.util.Map - def update(self, dynamicScopeContext, configurationAttributes): - print "Dynamic scope. Update method" - - dynamicScopes = dynamicScopeContext.getDynamicScopes() - authorizationGrant = dynamicScopeContext.getAuthorizationGrant() - user = dynamicScopeContext.getUser() - jsonWebResponse = dynamicScopeContext.getJsonWebResponse() - claims = jsonWebResponse.getClaims() - - # Add work phone if there is scope = work_phone - userService = CdiUtil.bean(UserService) - workPhone = userService.getCustomAttribute(user, "telephoneNumber") - if workPhone != None: - claims.setClaim("work_phone", workPhone.getValues()) - - return True - - def getSupportedClaims(self, configurationAttributes): - return Arrays.asList("work_phone") - - def getApiVersion(self): - return 11 +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2016, Janssen +# +# Author: Yuriy Movchan +# + +from io.jans.model.custom.script.type.scope import DynamicScopeType +from io.jans.service.cdi.util import CdiUtil +from io.jans.as.server.service import UserService +from io.jans.util import StringHelper, ArrayHelper +from java.util import Arrays, ArrayList + +import java + +class DynamicScope(DynamicScopeType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "Dynamic scope. Initialization" + + print "Dynamic scope. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "Dynamic scope. Destroy" + print "Dynamic scope. Destroyed successfully" + return True + + # Update Json Web token before signing/encrypring it + # dynamicScopeContext is io.jans.as.service.external.context.DynamicScopeExternalContext + # configurationAttributes is java.util.Map + def update(self, dynamicScopeContext, configurationAttributes): + print "Dynamic scope. Update method" + + dynamicScopes = dynamicScopeContext.getDynamicScopes() + authorizationGrant = dynamicScopeContext.getAuthorizationGrant() + user = dynamicScopeContext.getUser() + jsonWebResponse = dynamicScopeContext.getJsonWebResponse() + claims = jsonWebResponse.getClaims() + + # Add work phone if there is scope = work_phone + userService = CdiUtil.bean(UserService) + workPhone = userService.getCustomAttribute(user, "telephoneNumber") + if workPhone != None: + claims.setClaim("work_phone", workPhone.getValues()) + + return True + + def getSupportedClaims(self, configurationAttributes): + return Arrays.asList("work_phone") + + def getApiVersion(self): + return 11 diff --git a/jans-ce-setup/static/extension/end_session/end_session.py b/jans-linux-setup/static/extension/end_session/end_session.py similarity index 100% rename from jans-ce-setup/static/extension/end_session/end_session.py rename to jans-linux-setup/static/extension/end_session/end_session.py diff --git a/jans-ce-setup/static/extension/id_generator/SampleScript.py b/jans-linux-setup/static/extension/id_generator/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/id_generator/SampleScript.py rename to jans-linux-setup/static/extension/id_generator/SampleScript.py diff --git a/jans-ce-setup/static/extension/idp/SampleScript.py b/jans-linux-setup/static/extension/idp/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/idp/SampleScript.py rename to jans-linux-setup/static/extension/idp/SampleScript.py diff --git a/jans-ce-setup/static/extension/introspection/introspection.py b/jans-linux-setup/static/extension/introspection/introspection.py similarity index 100% rename from jans-ce-setup/static/extension/introspection/introspection.py rename to jans-linux-setup/static/extension/introspection/introspection.py diff --git a/jans-ce-setup/static/extension/introspection/introspection_custom_params.py b/jans-linux-setup/static/extension/introspection/introspection_custom_params.py similarity index 100% rename from jans-ce-setup/static/extension/introspection/introspection_custom_params.py rename to jans-linux-setup/static/extension/introspection/introspection_custom_params.py diff --git a/jans-ce-setup/static/extension/introspection/introspection_role_based_scope.py b/jans-linux-setup/static/extension/introspection/introspection_role_based_scope.py similarity index 100% rename from jans-ce-setup/static/extension/introspection/introspection_role_based_scope.py rename to jans-linux-setup/static/extension/introspection/introspection_role_based_scope.py diff --git a/jans-ce-setup/static/extension/persistence_extension/SampleScript.py b/jans-linux-setup/static/extension/persistence_extension/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/persistence_extension/SampleScript.py rename to jans-linux-setup/static/extension/persistence_extension/SampleScript.py diff --git a/jans-ce-setup/static/extension/person_authentication/BasicExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/BasicExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/BasicExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/BasicExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/BasicLockAccountExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/BasicLockAccountExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/BasicLockAccountExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/BasicLockAccountExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/Casa.py b/jans-linux-setup/static/extension/person_authentication/Casa.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/Casa.py rename to jans-linux-setup/static/extension/person_authentication/Casa.py diff --git a/jans-ce-setup/static/extension/person_authentication/DuoExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/DuoExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/DuoExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/DuoExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/Fido2ExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/Fido2ExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/Fido2ExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/Fido2ExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/OtpExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/OtpExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/OtpExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/OtpExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/SuperGluuExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/SuperGluuExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/SuperGluuExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/SuperGluuExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/ThumbSignInExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/ThumbSignInExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/ThumbSignInExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/ThumbSignInExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/U2fExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/U2fExternalAuthenticator.py similarity index 97% rename from jans-ce-setup/static/extension/person_authentication/U2fExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/U2fExternalAuthenticator.py index 2e32063a2ec..066c49d8dba 100644 --- a/jans-ce-setup/static/extension/person_authentication/U2fExternalAuthenticator.py +++ b/jans-linux-setup/static/extension/person_authentication/U2fExternalAuthenticator.py @@ -1,214 +1,214 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Yuriy Movchan -# - -import java -import sys -from javax.ws.rs.core import Response -from javax.ws.rs import WebApplicationException -from org.jboss.resteasy.client.exception import ResteasyClientException -from io.jans.model.custom.script.type.auth import PersonAuthenticationType -from io.jans.as.client.fido.u2f import FidoU2fClientFactory -from io.jans.as.model.config import Constants -from io.jans.as.server.security import Identity -from io.jans.as.server.service import AuthenticationService, SessionIdService -from io.jans.as.server.service import UserService -from io.jans.as.service.fido.u2f import DeviceRegistrationService -from io.jans.as.util import ServerUtil -from io.jans.service.cdi.util import CdiUtil -from io.jans.util import StringHelper - - -class PersonAuthentication(PersonAuthenticationType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "U2F. Initialization" - - print "U2F. Initialization. Downloading U2F metadata" - u2f_server_uri = configurationAttributes.get("u2f_server_uri").getValue2() - u2f_server_metadata_uri = u2f_server_uri + "/.well-known/fido-u2f-configuration" - - metaDataConfigurationService = FidoU2fClientFactory.instance().createMetaDataConfigurationService(u2f_server_metadata_uri) - - max_attempts = 20 - for attempt in range(1, max_attempts + 1): - try: - self.metaDataConfiguration = metaDataConfigurationService.getMetadataConfiguration() - break - except WebApplicationException, ex: - # Detect if last try or we still get Service Unavailable HTTP error - if (attempt == max_attempts) or (ex.getResponse().getStatus() != Response.Status.SERVICE_UNAVAILABLE.getStatusCode()): - raise ex - - java.lang.Thread.sleep(3000) - print "Attempting to load metadata: %d" % attempt - - print "U2F. Initialized successfully" - return True - - def destroy(self, configurationAttributes): - print "U2F. Destroy" - print "U2F. Destroyed successfully" - return True - - def getApiVersion(self): - return 11 - - def getAuthenticationMethodClaims(self, requestParameters): - return None - - def isValidAuthenticationMethod(self, usageType, configurationAttributes): - return True - - def getAlternativeAuthenticationMethod(self, usageType, configurationAttributes): - return None - - def authenticate(self, configurationAttributes, requestParameters, step): - authenticationService = CdiUtil.bean(AuthenticationService) - - identity = CdiUtil.bean(Identity) - credentials = identity.getCredentials() - - user_name = credentials.getUsername() - - if (step == 1): - print "U2F. Authenticate for step 1" - - user_password = credentials.getPassword() - logged_in = False - if (StringHelper.isNotEmptyString(user_name) and StringHelper.isNotEmptyString(user_password)): - userService = CdiUtil.bean(UserService) - logged_in = authenticationService.authenticate(user_name, user_password) - - if (not logged_in): - return False - - return True - elif (step == 2): - print "U2F. Authenticate for step 2" - - token_response = ServerUtil.getFirstValue(requestParameters, "tokenResponse") - if token_response == None: - print "U2F. Authenticate for step 2. tokenResponse is empty" - return False - - auth_method = ServerUtil.getFirstValue(requestParameters, "authMethod") - if auth_method == None: - print "U2F. Authenticate for step 2. authMethod is empty" - return False - - authenticationService = CdiUtil.bean(AuthenticationService) - user = authenticationService.getAuthenticatedUser() - if (user == None): - print "U2F. Prepare for step 2. Failed to determine user name" - return False - - if (auth_method == 'authenticate'): - print "U2F. Prepare for step 2. Call FIDO U2F in order to finish authentication workflow" - authenticationRequestService = FidoU2fClientFactory.instance().createAuthenticationRequestService(self.metaDataConfiguration) - authenticationStatus = authenticationRequestService.finishAuthentication(user.getUserId(), token_response) - - if (authenticationStatus.getStatus() != Constants.RESULT_SUCCESS): - print "U2F. Authenticate for step 2. Get invalid authentication status from FIDO U2F server" - return False - - return True - elif (auth_method == 'enroll'): - print "U2F. Prepare for step 2. Call FIDO U2F in order to finish registration workflow" - registrationRequestService = FidoU2fClientFactory.instance().createRegistrationRequestService(self.metaDataConfiguration) - registrationStatus = registrationRequestService.finishRegistration(user.getUserId(), token_response) - - if (registrationStatus.getStatus() != Constants.RESULT_SUCCESS): - print "U2F. Authenticate for step 2. Get invalid registration status from FIDO U2F server" - return False - - return True - else: - print "U2F. Prepare for step 2. Authenticatiod method is invalid" - return False - - return False - else: - return False - - def prepareForStep(self, configurationAttributes, requestParameters, step): - identity = CdiUtil.bean(Identity) - - if (step == 1): - return True - elif (step == 2): - print "U2F. Prepare for step 2" - - session = CdiUtil.bean(SessionIdService).getSessionId() - if session == None: - print "U2F. Prepare for step 2. Failed to determine session_id" - return False - - authenticationService = CdiUtil.bean(AuthenticationService) - user = authenticationService.getAuthenticatedUser() - if (user == None): - print "U2F. Prepare for step 2. Failed to determine user name" - return False - - u2f_application_id = configurationAttributes.get("u2f_application_id").getValue2() - - # Check if user have registered devices - deviceRegistrationService = CdiUtil.bean(DeviceRegistrationService) - - userInum = user.getAttribute("inum") - - registrationRequest = None - authenticationRequest = None - - deviceRegistrations = deviceRegistrationService.findUserDeviceRegistrations(userInum, u2f_application_id) - if (deviceRegistrations.size() > 0): - print "U2F. Prepare for step 2. Call FIDO U2F in order to start authentication workflow" - - try: - authenticationRequestService = FidoU2fClientFactory.instance().createAuthenticationRequestService(self.metaDataConfiguration) - authenticationRequest = authenticationRequestService.startAuthentication(user.getUserId(), None, u2f_application_id, session.getId()) - except ClientResponseFailure, ex: - if (ex.getResponse().getResponseStatus() != Response.Status.NOT_FOUND): - print "U2F. Prepare for step 2. Failed to start authentication workflow. Exception:", sys.exc_info()[1] - return False - else: - print "U2F. Prepare for step 2. Call FIDO U2F in order to start registration workflow" - registrationRequestService = FidoU2fClientFactory.instance().createRegistrationRequestService(self.metaDataConfiguration) - registrationRequest = registrationRequestService.startRegistration(user.getUserId(), u2f_application_id, session.getId()) - - identity.setWorkingParameter("fido_u2f_authentication_request", ServerUtil.asJson(authenticationRequest)) - identity.setWorkingParameter("fido_u2f_registration_request", ServerUtil.asJson(registrationRequest)) - - return True - elif (step == 3): - print "U2F. Prepare for step 3" - - return True - else: - return False - - def getExtraParametersForStep(self, configurationAttributes, step): - return None - - def getCountAuthenticationSteps(self, configurationAttributes): - return 2 - - def getPageForStep(self, configurationAttributes, step): - if (step == 2): - return "/auth/u2f/login.xhtml" - - return "" - - def getNextStep(self, configurationAttributes, requestParameters, step): - return -1 - - def getLogoutExternalUrl(self, configurationAttributes, requestParameters): - print "Get external logout URL call" - return None - - def logout(self, configurationAttributes, requestParameters): - return True +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2016, Janssen +# +# Author: Yuriy Movchan +# + +import java +import sys +from javax.ws.rs.core import Response +from javax.ws.rs import WebApplicationException +from org.jboss.resteasy.client.exception import ResteasyClientException +from io.jans.model.custom.script.type.auth import PersonAuthenticationType +from io.jans.as.client.fido.u2f import FidoU2fClientFactory +from io.jans.as.model.config import Constants +from io.jans.as.server.security import Identity +from io.jans.as.server.service import AuthenticationService, SessionIdService +from io.jans.as.server.service import UserService +from io.jans.as.service.fido.u2f import DeviceRegistrationService +from io.jans.as.util import ServerUtil +from io.jans.service.cdi.util import CdiUtil +from io.jans.util import StringHelper + + +class PersonAuthentication(PersonAuthenticationType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "U2F. Initialization" + + print "U2F. Initialization. Downloading U2F metadata" + u2f_server_uri = configurationAttributes.get("u2f_server_uri").getValue2() + u2f_server_metadata_uri = u2f_server_uri + "/.well-known/fido-u2f-configuration" + + metaDataConfigurationService = FidoU2fClientFactory.instance().createMetaDataConfigurationService(u2f_server_metadata_uri) + + max_attempts = 20 + for attempt in range(1, max_attempts + 1): + try: + self.metaDataConfiguration = metaDataConfigurationService.getMetadataConfiguration() + break + except WebApplicationException, ex: + # Detect if last try or we still get Service Unavailable HTTP error + if (attempt == max_attempts) or (ex.getResponse().getStatus() != Response.Status.SERVICE_UNAVAILABLE.getStatusCode()): + raise ex + + java.lang.Thread.sleep(3000) + print "Attempting to load metadata: %d" % attempt + + print "U2F. Initialized successfully" + return True + + def destroy(self, configurationAttributes): + print "U2F. Destroy" + print "U2F. Destroyed successfully" + return True + + def getApiVersion(self): + return 11 + + def getAuthenticationMethodClaims(self, requestParameters): + return None + + def isValidAuthenticationMethod(self, usageType, configurationAttributes): + return True + + def getAlternativeAuthenticationMethod(self, usageType, configurationAttributes): + return None + + def authenticate(self, configurationAttributes, requestParameters, step): + authenticationService = CdiUtil.bean(AuthenticationService) + + identity = CdiUtil.bean(Identity) + credentials = identity.getCredentials() + + user_name = credentials.getUsername() + + if (step == 1): + print "U2F. Authenticate for step 1" + + user_password = credentials.getPassword() + logged_in = False + if (StringHelper.isNotEmptyString(user_name) and StringHelper.isNotEmptyString(user_password)): + userService = CdiUtil.bean(UserService) + logged_in = authenticationService.authenticate(user_name, user_password) + + if (not logged_in): + return False + + return True + elif (step == 2): + print "U2F. Authenticate for step 2" + + token_response = ServerUtil.getFirstValue(requestParameters, "tokenResponse") + if token_response == None: + print "U2F. Authenticate for step 2. tokenResponse is empty" + return False + + auth_method = ServerUtil.getFirstValue(requestParameters, "authMethod") + if auth_method == None: + print "U2F. Authenticate for step 2. authMethod is empty" + return False + + authenticationService = CdiUtil.bean(AuthenticationService) + user = authenticationService.getAuthenticatedUser() + if (user == None): + print "U2F. Prepare for step 2. Failed to determine user name" + return False + + if (auth_method == 'authenticate'): + print "U2F. Prepare for step 2. Call FIDO U2F in order to finish authentication workflow" + authenticationRequestService = FidoU2fClientFactory.instance().createAuthenticationRequestService(self.metaDataConfiguration) + authenticationStatus = authenticationRequestService.finishAuthentication(user.getUserId(), token_response) + + if (authenticationStatus.getStatus() != Constants.RESULT_SUCCESS): + print "U2F. Authenticate for step 2. Get invalid authentication status from FIDO U2F server" + return False + + return True + elif (auth_method == 'enroll'): + print "U2F. Prepare for step 2. Call FIDO U2F in order to finish registration workflow" + registrationRequestService = FidoU2fClientFactory.instance().createRegistrationRequestService(self.metaDataConfiguration) + registrationStatus = registrationRequestService.finishRegistration(user.getUserId(), token_response) + + if (registrationStatus.getStatus() != Constants.RESULT_SUCCESS): + print "U2F. Authenticate for step 2. Get invalid registration status from FIDO U2F server" + return False + + return True + else: + print "U2F. Prepare for step 2. Authenticatiod method is invalid" + return False + + return False + else: + return False + + def prepareForStep(self, configurationAttributes, requestParameters, step): + identity = CdiUtil.bean(Identity) + + if (step == 1): + return True + elif (step == 2): + print "U2F. Prepare for step 2" + + session = CdiUtil.bean(SessionIdService).getSessionId() + if session == None: + print "U2F. Prepare for step 2. Failed to determine session_id" + return False + + authenticationService = CdiUtil.bean(AuthenticationService) + user = authenticationService.getAuthenticatedUser() + if (user == None): + print "U2F. Prepare for step 2. Failed to determine user name" + return False + + u2f_application_id = configurationAttributes.get("u2f_application_id").getValue2() + + # Check if user have registered devices + deviceRegistrationService = CdiUtil.bean(DeviceRegistrationService) + + userInum = user.getAttribute("inum") + + registrationRequest = None + authenticationRequest = None + + deviceRegistrations = deviceRegistrationService.findUserDeviceRegistrations(userInum, u2f_application_id) + if (deviceRegistrations.size() > 0): + print "U2F. Prepare for step 2. Call FIDO U2F in order to start authentication workflow" + + try: + authenticationRequestService = FidoU2fClientFactory.instance().createAuthenticationRequestService(self.metaDataConfiguration) + authenticationRequest = authenticationRequestService.startAuthentication(user.getUserId(), None, u2f_application_id, session.getId()) + except ClientResponseFailure, ex: + if (ex.getResponse().getResponseStatus() != Response.Status.NOT_FOUND): + print "U2F. Prepare for step 2. Failed to start authentication workflow. Exception:", sys.exc_info()[1] + return False + else: + print "U2F. Prepare for step 2. Call FIDO U2F in order to start registration workflow" + registrationRequestService = FidoU2fClientFactory.instance().createRegistrationRequestService(self.metaDataConfiguration) + registrationRequest = registrationRequestService.startRegistration(user.getUserId(), u2f_application_id, session.getId()) + + identity.setWorkingParameter("fido_u2f_authentication_request", ServerUtil.asJson(authenticationRequest)) + identity.setWorkingParameter("fido_u2f_registration_request", ServerUtil.asJson(registrationRequest)) + + return True + elif (step == 3): + print "U2F. Prepare for step 3" + + return True + else: + return False + + def getExtraParametersForStep(self, configurationAttributes, step): + return None + + def getCountAuthenticationSteps(self, configurationAttributes): + return 2 + + def getPageForStep(self, configurationAttributes, step): + if (step == 2): + return "/auth/u2f/login.xhtml" + + return "" + + def getNextStep(self, configurationAttributes, requestParameters, step): + return -1 + + def getLogoutExternalUrl(self, configurationAttributes, requestParameters): + print "Get external logout URL call" + return None + + def logout(self, configurationAttributes, requestParameters): + return True diff --git a/jans-ce-setup/static/extension/person_authentication/UafExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/UafExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/UafExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/UafExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/UserCertExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/UserCertExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/UserCertExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/UserCertExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/YubicloudExternalAuthenticator.py b/jans-linux-setup/static/extension/person_authentication/YubicloudExternalAuthenticator.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/YubicloudExternalAuthenticator.py rename to jans-linux-setup/static/extension/person_authentication/YubicloudExternalAuthenticator.py diff --git a/jans-ce-setup/static/extension/person_authentication/smpp2FA.py b/jans-linux-setup/static/extension/person_authentication/smpp2FA.py similarity index 100% rename from jans-ce-setup/static/extension/person_authentication/smpp2FA.py rename to jans-linux-setup/static/extension/person_authentication/smpp2FA.py diff --git a/jans-ce-setup/static/extension/person_authentication/twilio2FA.py b/jans-linux-setup/static/extension/person_authentication/twilio2FA.py similarity index 97% rename from jans-ce-setup/static/extension/person_authentication/twilio2FA.py rename to jans-linux-setup/static/extension/person_authentication/twilio2FA.py index 3a233404832..5d0ad5f5735 100644 --- a/jans-ce-setup/static/extension/person_authentication/twilio2FA.py +++ b/jans-linux-setup/static/extension/person_authentication/twilio2FA.py @@ -1,251 +1,251 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2018, Janssen -# -# Author: Jose Gonzalez -# Author: Gasmyr Mougang - -from io.jans.service.cdi.util import CdiUtil -from io.jans.as.server.security import Identity -from io.jans.model.custom.script.type.auth import PersonAuthenticationType -from io.jans.as.server.service import AuthenticationService -from io.jans.as.server.service import UserService -from io.jans.as.server.service import SessionIdService -from io.jans.as.util import ServerUtil -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays -from javax.faces.application import FacesMessage -from io.jans.jsf2.message import FacesMessages - -import com.twilio.Twilio as Twilio -import com.twilio.rest.api.v2010.account.Message as Message -import com.twilio.type.PhoneNumber as PhoneNumber -import org.codehaus.jettison.json.JSONArray as JSONArray - - -import java -import random -import jarray - -class PersonAuthentication(PersonAuthenticationType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - self.mobile_number = None - self.identity = CdiUtil.bean(Identity) - - def init(self, customScript, configurationAttributes): - print "==============================================" - print "===TWILIO SMS INITIALIZATION==================" - print "==============================================" - self.ACCOUNT_SID = None - self.AUTH_TOKEN = None - self.FROM_NUMBER = None - - # Get Custom Properties - try: - self.ACCOUNT_SID = configurationAttributes.get("twilio_sid").getValue2() - except: - print 'TwilioSMS, Missing required configuration attribute "twilio_sid"' - - try: - self.AUTH_TOKEN = configurationAttributes.get("twilio_token").getValue2() - except: - print'TwilioSMS, Missing required configuration attribute "twilio_token"' - try: - self.FROM_NUMBER = configurationAttributes.get("from_number").getValue2() - except: - print'TwilioSMS, Missing required configuration attribute "from_number"' - - if None in (self.ACCOUNT_SID, self.AUTH_TOKEN, self.FROM_NUMBER): - print "twilio_sid, twilio_token, from_number is empty ... returning False" - return False - - print "===TWILIO SMS INITIALIZATION DONE PROPERLY=====" - return True - - def destroy(self, configurationAttributes): - print "Twilio SMS. Destroy" - print "Twilio SMS. Destroyed successfully" - return True - - def getApiVersion(self): - return 11 - - def getAuthenticationMethodClaims(self, requestParameters): - return None - - def isValidAuthenticationMethod(self, usageType, configurationAttributes): - return True - - def getAlternativeAuthenticationMethod(self, usageType, configurationAttributes): - return None - - def authenticate(self, configurationAttributes, requestParameters, step): - print "==============================================" - print "====TWILIO SMS AUTHENCATION===================" - print "==============================================" - userService = CdiUtil.bean(UserService) - authenticationService = CdiUtil.bean(AuthenticationService) - sessionIdService = CdiUtil.bean(SessionIdService) - facesMessages = CdiUtil.bean(FacesMessages) - facesMessages.setKeepMessages() - - session_attributes = self.identity.getSessionId().getSessionAttributes() - form_passcode = ServerUtil.getFirstValue(requestParameters, "passcode") - form_name = ServerUtil.getFirstValue(requestParameters, "TwilioSmsloginForm") - - print "TwilioSMS. form_response_passcode: %s" % str(form_passcode) - - if step == 1: - print "==============================================" - print "=TWILIO SMS STEP 1 | Password Authentication==" - print "==============================================" - credentials = self.identity.getCredentials() - user_name = credentials.getUsername() - user_password = credentials.getPassword() - logged_in = False - if StringHelper.isNotEmptyString(user_name) and StringHelper.isNotEmptyString(user_password): - logged_in = authenticationService.authenticate(user_name, user_password) - - if not logged_in: - return False - - # Get the Person's number and generate a code - foundUser = None - try: - foundUser = authenticationService.getAuthenticatedUser() - except: - print 'TwilioSMS, Error retrieving user %s from LDAP' % (user_name) - return False - - try: - isVerified = foundUser.getAttribute("phoneNumberVerified") - if isVerified: - self.mobile_number = foundUser.getAttribute("employeeNumber") - if self.mobile_number == None: - self.mobile_number = foundUser.getAttribute("mobile") - if self.mobile_number == None: - self.mobile_number = foundUser.getAttribute("telephoneNumber") - if self.mobile_number == None: - print "TwilioSMS, Error finding mobile number for user '%s'" % user_name - - except: - facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to determine mobile phone number") - print 'TwilioSMS, Error finding mobile number for "%s". Exception: %s` % (user_name, sys.exc_info()[1])`' - return False - - # Generate Random six digit code and store it in array - code = random.randint(100000, 999999) - - # Get code and save it in LDAP temporarily with special session entry - self.identity.setWorkingParameter("code", code) - sessionId = sessionIdService.getSessionId() # fetch from persistence - sessionId.getSessionAttributes().put("code", code) - - try: - Twilio.init(self.ACCOUNT_SID, self.AUTH_TOKEN); - message = Message.creator(PhoneNumber(self.mobile_number), PhoneNumber(self.FROM_NUMBER), str(code)).create(); - print "++++++++++++++++++++++++++++++++++++++++++++++" - print 'TwilioSMs, Message Sid: %s' % (message.getSid()) - print 'TwilioSMs, User phone: %s' % (self.mobile_number) - print "++++++++++++++++++++++++++++++++++++++++++++++" - sessionId.getSessionAttributes().put("mobile_number", self.mobile_number) - sessionId.getSessionAttributes().put("mobile", self.mobile_number) - sessionIdService.updateSessionId(sessionId) - self.identity.setWorkingParameter("mobile_number", self.mobile_number) - self.identity.getSessionId().getSessionAttributes().put("mobile_number",self.mobile_number) - self.identity.setWorkingParameter("mobile", self.mobile_number) - self.identity.getSessionId().getSessionAttributes().put("mobile",self.mobile_number) - print "++++++++++++++++++++++++++++++++++++++++++++++" - print "Number: %s" % (self.identity.getWorkingParameter("mobile_number")) - print "Mobile: %s" % (self.identity.getWorkingParameter("mobile")) - print "++++++++++++++++++++++++++++++++++++++++++++++" - print "========================================" - print "===TWILIO SMS FIRST STEP DONE PROPERLY==" - print "========================================" - return True - except Exception, ex: - facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to send message to mobile phone") - print "TwilioSMS. Error sending message to Twilio" - print "TwilioSMS. Unexpected error:", ex - - return False - elif step == 2: - # Retrieve the session attribute - print "==============================================" - print "=TWILIO SMS STEP 2 | Password Authentication==" - print "==============================================" - code = session_attributes.get("code") - print '=======> Session code is "%s"' % str(code) - sessionIdService = CdiUtil.bean(SessionIdService) - sessionId = sessionIdService.getSessionId() # fetch from persistence - code = sessionId.getSessionAttributes().get("code") - print '=======> Database code is "%s"' % str(code) - self.identity.setSessionId(sessionId) - print "==============================================" - print "TwilioSMS. Code: %s" % str(code) - print "==============================================" - if code is None: - print "TwilioSMS. Failed to find previously sent code" - return False - - if form_passcode is None: - print "TwilioSMS. Passcode is empty" - return False - - if len(form_passcode) != 6: - print "TwilioSMS. Passcode from response is not 6 digits: %s" % form_passcode - return False - - if form_passcode == code: - print "TiwlioSMS, SUCCESS! User entered the same code!" - print "========================================" - print "===TWILIO SMS SECOND STEP DONE PROPERLY" - print "========================================" - return True - - print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - print "TwilioSMS. FAIL! User entered the wrong code! %s != %s" % (form_passcode, code) - print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - facesMessages.add(FacesMessage.SEVERITY_ERROR, "Incorrect Twilio code, please try again.") - print "================================================" - print "===TWILIO SMS SECOND STEP FAILED: INCORRECT CODE" - print "================================================" - return False - - print "TwilioSMS. ERROR: step param not found or != (1|2)" - - return False - - def prepareForStep(self, configurationAttributes, requestParameters, step): - if step == 1: - print "TwilioSMS. Prepare for Step 1" - return True - elif step == 2: - print "TwilioSMS. Prepare for Step 2" - return True - return False - - def getExtraParametersForStep(self, configurationAttributes, step): - if step == 2: - return Arrays.asList("code") - - return None - - def getCountAuthenticationSteps(self, configurationAttributes): - return 2 - - def getPageForStep(self, configurationAttributes, step): - if step == 2: - return "/auth/otp_sms/otp_sms.xhtml" - - return "" - - def getNextStep(self, configurationAttributes, requestParameters, step): - return -1 - - def getLogoutExternalUrl(self, configurationAttributes, requestParameters): - print "Get external logout URL call" - return None - - def logout(self, configurationAttributes, requestParameters): - return True +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2018, Janssen +# +# Author: Jose Gonzalez +# Author: Gasmyr Mougang + +from io.jans.service.cdi.util import CdiUtil +from io.jans.as.server.security import Identity +from io.jans.model.custom.script.type.auth import PersonAuthenticationType +from io.jans.as.server.service import AuthenticationService +from io.jans.as.server.service import UserService +from io.jans.as.server.service import SessionIdService +from io.jans.as.util import ServerUtil +from io.jans.util import StringHelper, ArrayHelper +from java.util import Arrays +from javax.faces.application import FacesMessage +from io.jans.jsf2.message import FacesMessages + +import com.twilio.Twilio as Twilio +import com.twilio.rest.api.v2010.account.Message as Message +import com.twilio.type.PhoneNumber as PhoneNumber +import org.codehaus.jettison.json.JSONArray as JSONArray + + +import java +import random +import jarray + +class PersonAuthentication(PersonAuthenticationType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + self.mobile_number = None + self.identity = CdiUtil.bean(Identity) + + def init(self, customScript, configurationAttributes): + print "==============================================" + print "===TWILIO SMS INITIALIZATION==================" + print "==============================================" + self.ACCOUNT_SID = None + self.AUTH_TOKEN = None + self.FROM_NUMBER = None + + # Get Custom Properties + try: + self.ACCOUNT_SID = configurationAttributes.get("twilio_sid").getValue2() + except: + print 'TwilioSMS, Missing required configuration attribute "twilio_sid"' + + try: + self.AUTH_TOKEN = configurationAttributes.get("twilio_token").getValue2() + except: + print'TwilioSMS, Missing required configuration attribute "twilio_token"' + try: + self.FROM_NUMBER = configurationAttributes.get("from_number").getValue2() + except: + print'TwilioSMS, Missing required configuration attribute "from_number"' + + if None in (self.ACCOUNT_SID, self.AUTH_TOKEN, self.FROM_NUMBER): + print "twilio_sid, twilio_token, from_number is empty ... returning False" + return False + + print "===TWILIO SMS INITIALIZATION DONE PROPERLY=====" + return True + + def destroy(self, configurationAttributes): + print "Twilio SMS. Destroy" + print "Twilio SMS. Destroyed successfully" + return True + + def getApiVersion(self): + return 11 + + def getAuthenticationMethodClaims(self, requestParameters): + return None + + def isValidAuthenticationMethod(self, usageType, configurationAttributes): + return True + + def getAlternativeAuthenticationMethod(self, usageType, configurationAttributes): + return None + + def authenticate(self, configurationAttributes, requestParameters, step): + print "==============================================" + print "====TWILIO SMS AUTHENCATION===================" + print "==============================================" + userService = CdiUtil.bean(UserService) + authenticationService = CdiUtil.bean(AuthenticationService) + sessionIdService = CdiUtil.bean(SessionIdService) + facesMessages = CdiUtil.bean(FacesMessages) + facesMessages.setKeepMessages() + + session_attributes = self.identity.getSessionId().getSessionAttributes() + form_passcode = ServerUtil.getFirstValue(requestParameters, "passcode") + form_name = ServerUtil.getFirstValue(requestParameters, "TwilioSmsloginForm") + + print "TwilioSMS. form_response_passcode: %s" % str(form_passcode) + + if step == 1: + print "==============================================" + print "=TWILIO SMS STEP 1 | Password Authentication==" + print "==============================================" + credentials = self.identity.getCredentials() + user_name = credentials.getUsername() + user_password = credentials.getPassword() + logged_in = False + if StringHelper.isNotEmptyString(user_name) and StringHelper.isNotEmptyString(user_password): + logged_in = authenticationService.authenticate(user_name, user_password) + + if not logged_in: + return False + + # Get the Person's number and generate a code + foundUser = None + try: + foundUser = authenticationService.getAuthenticatedUser() + except: + print 'TwilioSMS, Error retrieving user %s from LDAP' % (user_name) + return False + + try: + isVerified = foundUser.getAttribute("phoneNumberVerified") + if isVerified: + self.mobile_number = foundUser.getAttribute("employeeNumber") + if self.mobile_number == None: + self.mobile_number = foundUser.getAttribute("mobile") + if self.mobile_number == None: + self.mobile_number = foundUser.getAttribute("telephoneNumber") + if self.mobile_number == None: + print "TwilioSMS, Error finding mobile number for user '%s'" % user_name + + except: + facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to determine mobile phone number") + print 'TwilioSMS, Error finding mobile number for "%s". Exception: %s` % (user_name, sys.exc_info()[1])`' + return False + + # Generate Random six digit code and store it in array + code = random.randint(100000, 999999) + + # Get code and save it in LDAP temporarily with special session entry + self.identity.setWorkingParameter("code", code) + sessionId = sessionIdService.getSessionId() # fetch from persistence + sessionId.getSessionAttributes().put("code", code) + + try: + Twilio.init(self.ACCOUNT_SID, self.AUTH_TOKEN); + message = Message.creator(PhoneNumber(self.mobile_number), PhoneNumber(self.FROM_NUMBER), str(code)).create(); + print "++++++++++++++++++++++++++++++++++++++++++++++" + print 'TwilioSMs, Message Sid: %s' % (message.getSid()) + print 'TwilioSMs, User phone: %s' % (self.mobile_number) + print "++++++++++++++++++++++++++++++++++++++++++++++" + sessionId.getSessionAttributes().put("mobile_number", self.mobile_number) + sessionId.getSessionAttributes().put("mobile", self.mobile_number) + sessionIdService.updateSessionId(sessionId) + self.identity.setWorkingParameter("mobile_number", self.mobile_number) + self.identity.getSessionId().getSessionAttributes().put("mobile_number",self.mobile_number) + self.identity.setWorkingParameter("mobile", self.mobile_number) + self.identity.getSessionId().getSessionAttributes().put("mobile",self.mobile_number) + print "++++++++++++++++++++++++++++++++++++++++++++++" + print "Number: %s" % (self.identity.getWorkingParameter("mobile_number")) + print "Mobile: %s" % (self.identity.getWorkingParameter("mobile")) + print "++++++++++++++++++++++++++++++++++++++++++++++" + print "========================================" + print "===TWILIO SMS FIRST STEP DONE PROPERLY==" + print "========================================" + return True + except Exception, ex: + facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to send message to mobile phone") + print "TwilioSMS. Error sending message to Twilio" + print "TwilioSMS. Unexpected error:", ex + + return False + elif step == 2: + # Retrieve the session attribute + print "==============================================" + print "=TWILIO SMS STEP 2 | Password Authentication==" + print "==============================================" + code = session_attributes.get("code") + print '=======> Session code is "%s"' % str(code) + sessionIdService = CdiUtil.bean(SessionIdService) + sessionId = sessionIdService.getSessionId() # fetch from persistence + code = sessionId.getSessionAttributes().get("code") + print '=======> Database code is "%s"' % str(code) + self.identity.setSessionId(sessionId) + print "==============================================" + print "TwilioSMS. Code: %s" % str(code) + print "==============================================" + if code is None: + print "TwilioSMS. Failed to find previously sent code" + return False + + if form_passcode is None: + print "TwilioSMS. Passcode is empty" + return False + + if len(form_passcode) != 6: + print "TwilioSMS. Passcode from response is not 6 digits: %s" % form_passcode + return False + + if form_passcode == code: + print "TiwlioSMS, SUCCESS! User entered the same code!" + print "========================================" + print "===TWILIO SMS SECOND STEP DONE PROPERLY" + print "========================================" + return True + + print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + print "TwilioSMS. FAIL! User entered the wrong code! %s != %s" % (form_passcode, code) + print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + facesMessages.add(FacesMessage.SEVERITY_ERROR, "Incorrect Twilio code, please try again.") + print "================================================" + print "===TWILIO SMS SECOND STEP FAILED: INCORRECT CODE" + print "================================================" + return False + + print "TwilioSMS. ERROR: step param not found or != (1|2)" + + return False + + def prepareForStep(self, configurationAttributes, requestParameters, step): + if step == 1: + print "TwilioSMS. Prepare for Step 1" + return True + elif step == 2: + print "TwilioSMS. Prepare for Step 2" + return True + return False + + def getExtraParametersForStep(self, configurationAttributes, step): + if step == 2: + return Arrays.asList("code") + + return None + + def getCountAuthenticationSteps(self, configurationAttributes): + return 2 + + def getPageForStep(self, configurationAttributes, step): + if step == 2: + return "/auth/otp_sms/otp_sms.xhtml" + + return "" + + def getNextStep(self, configurationAttributes, requestParameters, step): + return -1 + + def getLogoutExternalUrl(self, configurationAttributes, requestParameters): + print "Get external logout URL call" + return None + + def logout(self, configurationAttributes, requestParameters): + return True diff --git a/jans-ce-setup/static/extension/post_authn/post_authn.py b/jans-linux-setup/static/extension/post_authn/post_authn.py similarity index 100% rename from jans-ce-setup/static/extension/post_authn/post_authn.py rename to jans-linux-setup/static/extension/post_authn/post_authn.py diff --git a/jans-ce-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials.py b/jans-linux-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials.py similarity index 100% rename from jans-ce-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials.py rename to jans-linux-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials.py diff --git a/jans-ce-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials_custom_params.py b/jans-linux-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials_custom_params.py similarity index 100% rename from jans-ce-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials_custom_params.py rename to jans-linux-setup/static/extension/resource_owner_password_credentials/resource_owner_password_credentials_custom_params.py diff --git a/jans-ce-setup/static/extension/revoke_token/revoke_token.py b/jans-linux-setup/static/extension/revoke_token/revoke_token.py similarity index 100% rename from jans-ce-setup/static/extension/revoke_token/revoke_token.py rename to jans-linux-setup/static/extension/revoke_token/revoke_token.py diff --git a/jans-ce-setup/static/extension/scim/SampleScript.py b/jans-linux-setup/static/extension/scim/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/scim/SampleScript.py rename to jans-linux-setup/static/extension/scim/SampleScript.py diff --git a/jans-ce-setup/static/extension/spontaneous_scope/spontaneous_scope.py b/jans-linux-setup/static/extension/spontaneous_scope/spontaneous_scope.py similarity index 100% rename from jans-ce-setup/static/extension/spontaneous_scope/spontaneous_scope.py rename to jans-linux-setup/static/extension/spontaneous_scope/spontaneous_scope.py diff --git a/jans-ce-setup/static/extension/uma_claims_gathering/uma_claims_gathering.py b/jans-linux-setup/static/extension/uma_claims_gathering/uma_claims_gathering.py similarity index 97% rename from jans-ce-setup/static/extension/uma_claims_gathering/uma_claims_gathering.py rename to jans-linux-setup/static/extension/uma_claims_gathering/uma_claims_gathering.py index 79abcd19936..15bbd71b636 100644 --- a/jans-ce-setup/static/extension/uma_claims_gathering/uma_claims_gathering.py +++ b/jans-linux-setup/static/extension/uma_claims_gathering/uma_claims_gathering.py @@ -1,92 +1,92 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2017, Janssen -# -# Author: Yuriy Zabrovarnyy -# - -from io.jans.model.custom.script.type.uma import UmaClaimsGatheringType - -class UmaClaimsGathering(UmaClaimsGatheringType): - - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "Claims-Gathering. Initializing ..." - print "Claims-Gathering. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "Claims-Gathering. Destroying ..." - print "Claims-Gathering. Destroyed successfully" - return True - - def getApiVersion(self): - return 11 - - - # Main gather method. Must return True (if gathering performed successfully) or False (if fail). - # Method must set claim into context (via context.putClaim('name', value)) in order to persist it (otherwise it will be lost). - # All user entered values can be access via Map context.getPageClaims() - def gather(self, step, context): # context is reference of io.jans.as.uma.authorization.UmaGatherContext - print "Claims-Gathering. Gathering ..." - - if step == 1: - if (context.getPageClaims().containsKey("country")): - country = context.getPageClaims().get("country") - print "Country: " + country - - context.putClaim("country", country) - return True - - print "Claims-Gathering. 'country' is not provided on step 1." - return False - - elif step == 2: - if (context.getPageClaims().containsKey("city")): - city = context.getPageClaims().get("city") - print "City: " + city - - context.putClaim("city", city) - print "Claims-Gathering. 'city' is not provided on step 2." - return True - - return False - - def getNextStep(self, step, context): - return -1 - - def prepareForStep(self, step, context): - if step == 10 and not context.isAuthenticated(): - # user is not authenticated, so we are redirecting user to authorization endpoint - # client_id is specified via configuration attribute. - # Make sure that given client has redirect_uri to Claims-Gathering Endpoint with parameter authentication=true - # Sample https://sample.com/restv1/uma/gather_claims?authentication=true - # If redirect to external url is performated, make sure that viewAction has onPostback="true" (otherwise redirect will not work) - # After user is authenticated then within the script it's possible to get user attributes as - # context.getUser("uid", "sn") - # If user is authenticated to current AS (to the same server, not external one) then it's possible to - # access Connect session attributes directly (no need to obtain id_token after redirect with 'code'). - # To fetch attributes please use getConnectSessionAttributes() method. - - print "User is not authenticated. Redirect for authentication ..." - clientId = context.getConfigurationAttributes().get("client_id").getValue2() - redirectUri = context.getClaimsGatheringEndpoint() + "?authentication=true" # without authentication=true parameter it will not work - authorizationUrl = context.getAuthorizationEndpoint() + "?client_id=" + clientId + "&redirect_uri=" + redirectUri + "&scope=openid&response_type=code" - context.redirectToExternalUrl(authorizationUrl) # redirect to external url - return False - if step == 10 and context.isAuthenticated(): # example how to get session attribute if user is authenticated to same AS - arc = context.getConnectSessionAttributes().get("acr") - - return True - - def getStepsCount(self, context): - return 2 - - def getPageForStep(self, step, context): - if step == 1: - return "/uma2/sample/country.xhtml" - elif step == 2: - return "/uma2/sample/city.xhtml" +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2017, Janssen +# +# Author: Yuriy Zabrovarnyy +# + +from io.jans.model.custom.script.type.uma import UmaClaimsGatheringType + +class UmaClaimsGathering(UmaClaimsGatheringType): + + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "Claims-Gathering. Initializing ..." + print "Claims-Gathering. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "Claims-Gathering. Destroying ..." + print "Claims-Gathering. Destroyed successfully" + return True + + def getApiVersion(self): + return 11 + + + # Main gather method. Must return True (if gathering performed successfully) or False (if fail). + # Method must set claim into context (via context.putClaim('name', value)) in order to persist it (otherwise it will be lost). + # All user entered values can be access via Map context.getPageClaims() + def gather(self, step, context): # context is reference of io.jans.as.uma.authorization.UmaGatherContext + print "Claims-Gathering. Gathering ..." + + if step == 1: + if (context.getPageClaims().containsKey("country")): + country = context.getPageClaims().get("country") + print "Country: " + country + + context.putClaim("country", country) + return True + + print "Claims-Gathering. 'country' is not provided on step 1." + return False + + elif step == 2: + if (context.getPageClaims().containsKey("city")): + city = context.getPageClaims().get("city") + print "City: " + city + + context.putClaim("city", city) + print "Claims-Gathering. 'city' is not provided on step 2." + return True + + return False + + def getNextStep(self, step, context): + return -1 + + def prepareForStep(self, step, context): + if step == 10 and not context.isAuthenticated(): + # user is not authenticated, so we are redirecting user to authorization endpoint + # client_id is specified via configuration attribute. + # Make sure that given client has redirect_uri to Claims-Gathering Endpoint with parameter authentication=true + # Sample https://sample.com/restv1/uma/gather_claims?authentication=true + # If redirect to external url is performated, make sure that viewAction has onPostback="true" (otherwise redirect will not work) + # After user is authenticated then within the script it's possible to get user attributes as + # context.getUser("uid", "sn") + # If user is authenticated to current AS (to the same server, not external one) then it's possible to + # access Connect session attributes directly (no need to obtain id_token after redirect with 'code'). + # To fetch attributes please use getConnectSessionAttributes() method. + + print "User is not authenticated. Redirect for authentication ..." + clientId = context.getConfigurationAttributes().get("client_id").getValue2() + redirectUri = context.getClaimsGatheringEndpoint() + "?authentication=true" # without authentication=true parameter it will not work + authorizationUrl = context.getAuthorizationEndpoint() + "?client_id=" + clientId + "&redirect_uri=" + redirectUri + "&scope=openid&response_type=code" + context.redirectToExternalUrl(authorizationUrl) # redirect to external url + return False + if step == 10 and context.isAuthenticated(): # example how to get session attribute if user is authenticated to same AS + arc = context.getConnectSessionAttributes().get("acr") + + return True + + def getStepsCount(self, context): + return 2 + + def getPageForStep(self, step, context): + if step == 1: + return "/uma2/sample/country.xhtml" + elif step == 2: + return "/uma2/sample/city.xhtml" return "" \ No newline at end of file diff --git a/jans-ce-setup/static/extension/uma_rpt_claims/uma_rpt_claims.py b/jans-linux-setup/static/extension/uma_rpt_claims/uma_rpt_claims.py similarity index 100% rename from jans-ce-setup/static/extension/uma_rpt_claims/uma_rpt_claims.py rename to jans-linux-setup/static/extension/uma_rpt_claims/uma_rpt_claims.py diff --git a/jans-ce-setup/static/extension/uma_rpt_policy/UmaClientAuthzRptPolicy.py b/jans-linux-setup/static/extension/uma_rpt_policy/UmaClientAuthzRptPolicy.py similarity index 100% rename from jans-ce-setup/static/extension/uma_rpt_policy/UmaClientAuthzRptPolicy.py rename to jans-linux-setup/static/extension/uma_rpt_policy/UmaClientAuthzRptPolicy.py diff --git a/jans-ce-setup/static/extension/uma_rpt_policy/uma_rpt_policy.py b/jans-linux-setup/static/extension/uma_rpt_policy/uma_rpt_policy.py similarity index 97% rename from jans-ce-setup/static/extension/uma_rpt_policy/uma_rpt_policy.py rename to jans-linux-setup/static/extension/uma_rpt_policy/uma_rpt_policy.py index 53739671573..1b4df3e05b3 100644 --- a/jans-ce-setup/static/extension/uma_rpt_policy/uma_rpt_policy.py +++ b/jans-linux-setup/static/extension/uma_rpt_policy/uma_rpt_policy.py @@ -1,76 +1,76 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2017, Janssen -# -# Author: Yuriy Zabrovarnyy -# -# Call sequence -# 1. First is call constructor of the Script __init__ -# 2. Next init() method -# 3. Next getRequiredClaims() - method returns required claims, so UMA engine checks whether -# in request RP provided all claims that are required. Pay attention that there can be -# multiple scripts bound to the scopes, means that UMA engine will build set of required claims -# from all scripts. If not all claims are provided need_info error is sent to RP. -# During need_info construction getClaimsGatheringScriptName() method is called -# 4. authorize() method is called if all required claims are provided. -# 5. destroy() - -from io.jans.model.custom.script.type.uma import UmaRptPolicyType -from io.jans.model.uma import ClaimDefinitionBuilder -from java.lang import String - -class UmaRptPolicy(UmaRptPolicyType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "RPT Policy. Initializing ..." - print "RPT Policy. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "RPT Policy. Destroying ..." - print "RPT Policy. Destroyed successfully" - return True - - def getApiVersion(self): - return 11 - - # Returns required claims definitions. - # This method must provide definition of all claims that is used in 'authorize' method. - # Note : name in both places must match. - # %1$s - placeholder for issuer. It uses standard Java Formatter, docs : https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html - def getRequiredClaims(self, context): # context is reference of io.jans.as.uma.authorization.UmaAuthorizationContext - json = """[ - { - "issuer" : [ "%1$s" ], - "name" : "country", - "claim_token_format" : [ "http://openid.net/specs/openid-connect-core-1_0.html#IDToken" ], - "claim_type" : "string", - "friendly_name" : "country" - }, - { - "issuer" : [ "%1$s" ], - "name" : "city", - "claim_token_format" : [ "http://openid.net/specs/openid-connect-core-1_0.html#IDToken" ], - "claim_type" : "string", - "friendly_name" : "city" - } - ]""" - context.addRedirectUserParam("customUserParam1", "value1") # pass some custom parameters to need_info uri. It can be removed if you don't need custom parameters. - return ClaimDefinitionBuilder.build(String.format(json, context.getIssuer())) - - # Main authorization method. Must return True or False. - def authorize(self, context): # context is reference of io.jans.as.uma.authorization.UmaAuthorizationContext - print "RPT Policy. Authorizing ..." - - if context.getClaim("country") == 'US' and context.getClaim("city") == 'NY': - print "Authorized successfully!" - return True - - return False - - # Returns name of the Claims-Gathering script which will be invoked if need_info error is returned. - def getClaimsGatheringScriptName(self, context): # context is reference of io.jans.as.uma.authorization.UmaAuthorizationContext - context.addRedirectUserParam("customUserParam2", "value2") # pass some custom parameters to need_info uri. It can be removed if you don't need custom parameters. +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2017, Janssen +# +# Author: Yuriy Zabrovarnyy +# +# Call sequence +# 1. First is call constructor of the Script __init__ +# 2. Next init() method +# 3. Next getRequiredClaims() - method returns required claims, so UMA engine checks whether +# in request RP provided all claims that are required. Pay attention that there can be +# multiple scripts bound to the scopes, means that UMA engine will build set of required claims +# from all scripts. If not all claims are provided need_info error is sent to RP. +# During need_info construction getClaimsGatheringScriptName() method is called +# 4. authorize() method is called if all required claims are provided. +# 5. destroy() + +from io.jans.model.custom.script.type.uma import UmaRptPolicyType +from io.jans.model.uma import ClaimDefinitionBuilder +from java.lang import String + +class UmaRptPolicy(UmaRptPolicyType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "RPT Policy. Initializing ..." + print "RPT Policy. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "RPT Policy. Destroying ..." + print "RPT Policy. Destroyed successfully" + return True + + def getApiVersion(self): + return 11 + + # Returns required claims definitions. + # This method must provide definition of all claims that is used in 'authorize' method. + # Note : name in both places must match. + # %1$s - placeholder for issuer. It uses standard Java Formatter, docs : https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html + def getRequiredClaims(self, context): # context is reference of io.jans.as.uma.authorization.UmaAuthorizationContext + json = """[ + { + "issuer" : [ "%1$s" ], + "name" : "country", + "claim_token_format" : [ "http://openid.net/specs/openid-connect-core-1_0.html#IDToken" ], + "claim_type" : "string", + "friendly_name" : "country" + }, + { + "issuer" : [ "%1$s" ], + "name" : "city", + "claim_token_format" : [ "http://openid.net/specs/openid-connect-core-1_0.html#IDToken" ], + "claim_type" : "string", + "friendly_name" : "city" + } + ]""" + context.addRedirectUserParam("customUserParam1", "value1") # pass some custom parameters to need_info uri. It can be removed if you don't need custom parameters. + return ClaimDefinitionBuilder.build(String.format(json, context.getIssuer())) + + # Main authorization method. Must return True or False. + def authorize(self, context): # context is reference of io.jans.as.uma.authorization.UmaAuthorizationContext + print "RPT Policy. Authorizing ..." + + if context.getClaim("country") == 'US' and context.getClaim("city") == 'NY': + print "Authorized successfully!" + return True + + return False + + # Returns name of the Claims-Gathering script which will be invoked if need_info error is returned. + def getClaimsGatheringScriptName(self, context): # context is reference of io.jans.as.uma.authorization.UmaAuthorizationContext + context.addRedirectUserParam("customUserParam2", "value2") # pass some custom parameters to need_info uri. It can be removed if you don't need custom parameters. return "sampleClaimsGathering" \ No newline at end of file diff --git a/jans-ce-setup/static/extension/update_token/sample_script.py b/jans-linux-setup/static/extension/update_token/sample_script.py similarity index 100% rename from jans-ce-setup/static/extension/update_token/sample_script.py rename to jans-linux-setup/static/extension/update_token/sample_script.py diff --git a/jans-ce-setup/static/extension/update_user/SampleScript.py b/jans-linux-setup/static/extension/update_user/SampleScript.py similarity index 100% rename from jans-ce-setup/static/extension/update_user/SampleScript.py rename to jans-linux-setup/static/extension/update_user/SampleScript.py diff --git a/jans-ce-setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py b/jans-linux-setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py similarity index 98% rename from jans-ce-setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py rename to jans-linux-setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py index 9f95734468c..7a8e9ac0508 100644 --- a/jans-ce-setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py +++ b/jans-linux-setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py @@ -1,105 +1,105 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# - -from io.jans.service.cdi.util import CdiUtil -from io.jans.model.custom.script.type.user import UserRegistrationType -from io.jans.service import MailService -from io.jans.oxtrust.service import PersonService -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList -from io.jans.config.oxtrust import AppConfiguration -from javax.faces.context import ExternalContext -from io.jans.oxtrust.service import ConfigurationService - -import java - -class UserRegistration(UserRegistrationType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "User Confirm registration. Initialization" - print "User Confirm registration. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "User Confirm registration. Destroy" - print "User Confirm registration. Destroyed successfully" - return True - - # User registration init method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def initRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Init method" - #hostName = requestParameters.get("hostName")[0] - #print "HostName Initialization : %s" % hostName - return True - - # User registration pre method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def preRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Pre method" - userStatus = "inactive" - - # Disable/Enable registered user - user.setStatus(userStatus) - self.guid = StringHelper.getRandomString(16) - user.setGuid(self.guid) - return True - - # User registration post method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def postRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Post method" - externalContext = CdiUtil.bean(ExternalContext) - contextPath = externalContext.getRequest().getContextPath() - hostName = externalContext.getRequestServerName() - print "HostName from context : %s" % hostName - mailService = CdiUtil.bean(MailService) - subject = "Registration confirmation" - activationLink = "https://%s%s/confirm/registration.htm?code=%s" %(hostName, contextPath, self.guid) - body = "

Welcome


Dear %s,

Your Account has been created, welcome to %s.

You are just one step way from activating your account on %s.

Click the button and start using your account.

" % (user.getUid(), hostName, hostName, activationLink) - print "User Confirm registration. Post method. Attempting to send e-mail to '%s' message '%s'" % (user.getMail(), body) - mailService.sendMail(user.getMail(), None, subject, body, body); - return True - - def confirmRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Confirm method" - code_array = requestParameters.get("code") - if ArrayHelper.isEmpty(code_array): - print "User Confirm registration. Confirm method. code is empty" - return False - - confirmation_code = code_array[0] - print "User Confirm registration. Confirm method. code: '%s'" % confirmation_code - - if confirmation_code == None: - print "User Confirm registration. Confirm method. Confirmation code not exist in request" - return False - - personService = CdiUtil.bean(PersonService) - user = personService.getPersonByAttribute("oxGuid", confirmation_code) - if user == None: - print "User Confirm registration. Confirm method. There is no user by confirmation code: '%s'" % confirmation_code - return False - - if confirmation_code == user.getGuid(): - user.setStatus("active") - user.setGuid("") - personService.updatePerson(user) - print "User Confirm registration. Confirm method. User '%s' confirmed his registration" % user.getUid() - return True - - print "User Confirm registration. Confirm method. Confirmation code for user '%s' is invalid" % user.getUid() - return False - - def getApiVersion(self): - return 11 +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2016, Janssen +# + +from io.jans.service.cdi.util import CdiUtil +from io.jans.model.custom.script.type.user import UserRegistrationType +from io.jans.service import MailService +from io.jans.oxtrust.service import PersonService +from io.jans.util import StringHelper, ArrayHelper +from java.util import Arrays, ArrayList +from io.jans.config.oxtrust import AppConfiguration +from javax.faces.context import ExternalContext +from io.jans.oxtrust.service import ConfigurationService + +import java + +class UserRegistration(UserRegistrationType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "User Confirm registration. Initialization" + print "User Confirm registration. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "User Confirm registration. Destroy" + print "User Confirm registration. Destroyed successfully" + return True + + # User registration init method + # user is io.jans.oxtrust.model.JanssenCustomPerson + # requestParameters is java.util.Map + # configurationAttributes is java.util.Map + def initRegistration(self, user, requestParameters, configurationAttributes): + print "User Confirm registration. Init method" + #hostName = requestParameters.get("hostName")[0] + #print "HostName Initialization : %s" % hostName + return True + + # User registration pre method + # user is io.jans.oxtrust.model.JanssenCustomPerson + # requestParameters is java.util.Map + # configurationAttributes is java.util.Map + def preRegistration(self, user, requestParameters, configurationAttributes): + print "User Confirm registration. Pre method" + userStatus = "inactive" + + # Disable/Enable registered user + user.setStatus(userStatus) + self.guid = StringHelper.getRandomString(16) + user.setGuid(self.guid) + return True + + # User registration post method + # user is io.jans.oxtrust.model.JanssenCustomPerson + # requestParameters is java.util.Map + # configurationAttributes is java.util.Map + def postRegistration(self, user, requestParameters, configurationAttributes): + print "User Confirm registration. Post method" + externalContext = CdiUtil.bean(ExternalContext) + contextPath = externalContext.getRequest().getContextPath() + hostName = externalContext.getRequestServerName() + print "HostName from context : %s" % hostName + mailService = CdiUtil.bean(MailService) + subject = "Registration confirmation" + activationLink = "https://%s%s/confirm/registration.htm?code=%s" %(hostName, contextPath, self.guid) + body = "

Welcome


Dear %s,

Your Account has been created, welcome to %s.

You are just one step way from activating your account on %s.

Click the button and start using your account.

" % (user.getUid(), hostName, hostName, activationLink) + print "User Confirm registration. Post method. Attempting to send e-mail to '%s' message '%s'" % (user.getMail(), body) + mailService.sendMail(user.getMail(), None, subject, body, body); + return True + + def confirmRegistration(self, user, requestParameters, configurationAttributes): + print "User Confirm registration. Confirm method" + code_array = requestParameters.get("code") + if ArrayHelper.isEmpty(code_array): + print "User Confirm registration. Confirm method. code is empty" + return False + + confirmation_code = code_array[0] + print "User Confirm registration. Confirm method. code: '%s'" % confirmation_code + + if confirmation_code == None: + print "User Confirm registration. Confirm method. Confirmation code not exist in request" + return False + + personService = CdiUtil.bean(PersonService) + user = personService.getPersonByAttribute("oxGuid", confirmation_code) + if user == None: + print "User Confirm registration. Confirm method. There is no user by confirmation code: '%s'" % confirmation_code + return False + + if confirmation_code == user.getGuid(): + user.setStatus("active") + user.setGuid("") + personService.updatePerson(user) + print "User Confirm registration. Confirm method. User '%s' confirmed his registration" % user.getUid() + return True + + print "User Confirm registration. Confirm method. Confirmation code for user '%s' is invalid" % user.getUid() + return False + + def getApiVersion(self): + return 11 diff --git a/jans-ce-setup/static/extension/user_registration/SampleScript.py b/jans-linux-setup/static/extension/user_registration/SampleScript.py similarity index 97% rename from jans-ce-setup/static/extension/user_registration/SampleScript.py rename to jans-linux-setup/static/extension/user_registration/SampleScript.py index 72080b86cee..0b2adaa6013 100644 --- a/jans-ce-setup/static/extension/user_registration/SampleScript.py +++ b/jans-linux-setup/static/extension/user_registration/SampleScript.py @@ -1,75 +1,75 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Yuriy Movchan -# - -from io.jans.model.custom.script.type.user import UserRegistrationType -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList - -import java - -class UserRegistration(UserRegistrationType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "User registration. Initialization" - - self.enable_user = StringHelper.toBoolean(configurationAttributes.get("enable_user").getValue2(), False) - - print "User registration. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "User registration. Destroy" - print "User registration. Destroyed successfully" - return True - - # User registration init method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def initRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Init method" - - return True - - # User registration pre method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def preRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Pre method" - - userStatus = "active" - if not self.enable_user: - userStatus = "inactive" - - # Disable/Enable registered user - user.setStatus(userStatus) - - return True - - # User registration post method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def postRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Post method" - - return True - - # User confirm New Registration method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def confirmRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Confirm registration method" - - return True - - def getApiVersion(self): - return 11 +# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. +# Copyright (c) 2016, Janssen +# +# Author: Yuriy Movchan +# + +from io.jans.model.custom.script.type.user import UserRegistrationType +from io.jans.util import StringHelper, ArrayHelper +from java.util import Arrays, ArrayList + +import java + +class UserRegistration(UserRegistrationType): + def __init__(self, currentTimeMillis): + self.currentTimeMillis = currentTimeMillis + + def init(self, customScript, configurationAttributes): + print "User registration. Initialization" + + self.enable_user = StringHelper.toBoolean(configurationAttributes.get("enable_user").getValue2(), False) + + print "User registration. Initialized successfully" + + return True + + def destroy(self, configurationAttributes): + print "User registration. Destroy" + print "User registration. Destroyed successfully" + return True + + # User registration init method + # user is io.jans.oxtrust.model.JanssenCustomPerson + # requestParameters is java.util.Map + # configurationAttributes is java.util.Map + def initRegistration(self, user, requestParameters, configurationAttributes): + print "User registration. Init method" + + return True + + # User registration pre method + # user is io.jans.oxtrust.model.JanssenCustomPerson + # requestParameters is java.util.Map + # configurationAttributes is java.util.Map + def preRegistration(self, user, requestParameters, configurationAttributes): + print "User registration. Pre method" + + userStatus = "active" + if not self.enable_user: + userStatus = "inactive" + + # Disable/Enable registered user + user.setStatus(userStatus) + + return True + + # User registration post method + # user is io.jans.oxtrust.model.JanssenCustomPerson + # requestParameters is java.util.Map + # configurationAttributes is java.util.Map + def postRegistration(self, user, requestParameters, configurationAttributes): + print "User registration. Post method" + + return True + + # User confirm New Registration method + # user is io.jans.oxtrust.model.JanssenCustomPerson + # requestParameters is java.util.Map + # configurationAttributes is java.util.Map + def confirmRegistration(self, user, requestParameters, configurationAttributes): + print "User registration. Confirm registration method" + + return True + + def getApiVersion(self): + return 11 diff --git a/jans-ce-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V1.pem b/jans-linux-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V1.pem similarity index 100% rename from jans-ce-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V1.pem rename to jans-linux-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V1.pem diff --git a/jans-ce-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V2.pem b/jans-linux-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V2.pem similarity index 100% rename from jans-ce-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V2.pem rename to jans-linux-setup/static/fido2/authenticator_cert/HyperFIDO_CA_Cert_V2.pem diff --git a/jans-ce-setup/static/fido2/authenticator_cert/yubico-u2f-ca-cert.crt b/jans-linux-setup/static/fido2/authenticator_cert/yubico-u2f-ca-cert.crt similarity index 100% rename from jans-ce-setup/static/fido2/authenticator_cert/yubico-u2f-ca-cert.crt rename to jans-linux-setup/static/fido2/authenticator_cert/yubico-u2f-ca-cert.crt diff --git a/jans-ce-setup/static/fido2/mds_toc_cert/metadata-root-ca.cer b/jans-linux-setup/static/fido2/mds_toc_cert/metadata-root-ca.cer similarity index 100% rename from jans-ce-setup/static/fido2/mds_toc_cert/metadata-root-ca.cer rename to jans-linux-setup/static/fido2/mds_toc_cert/metadata-root-ca.cer diff --git a/jans-ce-setup/static/metric/o_metric.ldif b/jans-linux-setup/static/metric/o_metric.ldif similarity index 100% rename from jans-ce-setup/static/metric/o_metric.ldif rename to jans-linux-setup/static/metric/o_metric.ldif diff --git a/jans-ce-setup/static/opendj/101-jans.ldif b/jans-linux-setup/static/opendj/101-jans.ldif similarity index 100% rename from jans-ce-setup/static/opendj/101-jans.ldif rename to jans-linux-setup/static/opendj/101-jans.ldif diff --git a/jans-ce-setup/static/opendj/77-customAttributes.ldif b/jans-linux-setup/static/opendj/77-customAttributes.ldif similarity index 100% rename from jans-ce-setup/static/opendj/77-customAttributes.ldif rename to jans-linux-setup/static/opendj/77-customAttributes.ldif diff --git a/jans-ce-setup/static/opendj/96-eduperson.ldif b/jans-linux-setup/static/opendj/96-eduperson.ldif similarity index 100% rename from jans-ce-setup/static/opendj/96-eduperson.ldif rename to jans-linux-setup/static/opendj/96-eduperson.ldif diff --git a/jans-ce-setup/static/opendj/index.json b/jans-linux-setup/static/opendj/index.json similarity index 100% rename from jans-ce-setup/static/opendj/index.json rename to jans-linux-setup/static/opendj/index.json diff --git a/jans-ce-setup/static/opendj/systemd/opendj.service b/jans-linux-setup/static/opendj/systemd/opendj.service similarity index 100% rename from jans-ce-setup/static/opendj/systemd/opendj.service rename to jans-linux-setup/static/opendj/systemd/opendj.service diff --git a/jans-ce-setup/static/oxd/oxd-server.default b/jans-linux-setup/static/oxd/oxd-server.default similarity index 100% rename from jans-ce-setup/static/oxd/oxd-server.default rename to jans-linux-setup/static/oxd/oxd-server.default diff --git a/jans-ce-setup/static/rdbm/ldap_sql_data_type_mapping.json b/jans-linux-setup/static/rdbm/ldap_sql_data_type_mapping.json similarity index 100% rename from jans-ce-setup/static/rdbm/ldap_sql_data_type_mapping.json rename to jans-linux-setup/static/rdbm/ldap_sql_data_type_mapping.json diff --git a/jans-ce-setup/static/rdbm/mysql_index.json b/jans-linux-setup/static/rdbm/mysql_index.json similarity index 100% rename from jans-ce-setup/static/rdbm/mysql_index.json rename to jans-linux-setup/static/rdbm/mysql_index.json diff --git a/jans-ce-setup/static/rdbm/opendj_attributes_syntax.json b/jans-linux-setup/static/rdbm/opendj_attributes_syntax.json similarity index 100% rename from jans-ce-setup/static/rdbm/opendj_attributes_syntax.json rename to jans-linux-setup/static/rdbm/opendj_attributes_syntax.json diff --git a/jans-ce-setup/static/rdbm/pgsql_index.json b/jans-linux-setup/static/rdbm/pgsql_index.json similarity index 100% rename from jans-ce-setup/static/rdbm/pgsql_index.json rename to jans-linux-setup/static/rdbm/pgsql_index.json diff --git a/jans-ce-setup/static/rdbm/spanner_index.json b/jans-linux-setup/static/rdbm/spanner_index.json similarity index 100% rename from jans-ce-setup/static/rdbm/spanner_index.json rename to jans-linux-setup/static/rdbm/spanner_index.json diff --git a/jans-ce-setup/static/rdbm/sql_data_types.json b/jans-linux-setup/static/rdbm/sql_data_types.json similarity index 100% rename from jans-ce-setup/static/rdbm/sql_data_types.json rename to jans-linux-setup/static/rdbm/sql_data_types.json diff --git a/jans-ce-setup/static/rdbm/sub_tables.json b/jans-linux-setup/static/rdbm/sub_tables.json similarity index 100% rename from jans-ce-setup/static/rdbm/sub_tables.json rename to jans-linux-setup/static/rdbm/sub_tables.json diff --git a/jans-ce-setup/static/scripts/admin_ui_plugin.py b/jans-linux-setup/static/scripts/admin_ui_plugin.py similarity index 100% rename from jans-ce-setup/static/scripts/admin_ui_plugin.py rename to jans-linux-setup/static/scripts/admin_ui_plugin.py diff --git a/jans-ce-setup/static/scripts/find_dups.py b/jans-linux-setup/static/scripts/find_dups.py similarity index 100% rename from jans-ce-setup/static/scripts/find_dups.py rename to jans-linux-setup/static/scripts/find_dups.py diff --git a/jans-ce-setup/static/scripts/genSchemaMarkdown.py b/jans-linux-setup/static/scripts/genSchemaMarkdown.py similarity index 100% rename from jans-ce-setup/static/scripts/genSchemaMarkdown.py rename to jans-linux-setup/static/scripts/genSchemaMarkdown.py diff --git a/jans-ce-setup/static/scripts/key_regeneration.py b/jans-linux-setup/static/scripts/key_regeneration.py similarity index 100% rename from jans-ce-setup/static/scripts/key_regeneration.py rename to jans-linux-setup/static/scripts/key_regeneration.py diff --git a/jans-ce-setup/static/scripts/logmanager.sh b/jans-linux-setup/static/scripts/logmanager.sh similarity index 100% rename from jans-ce-setup/static/scripts/logmanager.sh rename to jans-linux-setup/static/scripts/logmanager.sh diff --git a/jans-ce-setup/static/scripts/printHeaders.py b/jans-linux-setup/static/scripts/printHeaders.py similarity index 100% rename from jans-ce-setup/static/scripts/printHeaders.py rename to jans-linux-setup/static/scripts/printHeaders.py diff --git a/jans-ce-setup/static/scripts/print_json_ldif.py b/jans-linux-setup/static/scripts/print_json_ldif.py similarity index 100% rename from jans-ce-setup/static/scripts/print_json_ldif.py rename to jans-linux-setup/static/scripts/print_json_ldif.py diff --git a/jans-ce-setup/static/scripts/random_password.py b/jans-linux-setup/static/scripts/random_password.py similarity index 100% rename from jans-ce-setup/static/scripts/random_password.py rename to jans-linux-setup/static/scripts/random_password.py diff --git a/jans-ce-setup/static/scripts/remove_external_people.py b/jans-linux-setup/static/scripts/remove_external_people.py similarity index 100% rename from jans-ce-setup/static/scripts/remove_external_people.py rename to jans-linux-setup/static/scripts/remove_external_people.py diff --git a/jans-ce-setup/static/scripts/renew_certs.py b/jans-linux-setup/static/scripts/renew_certs.py similarity index 100% rename from jans-ce-setup/static/scripts/renew_certs.py rename to jans-linux-setup/static/scripts/renew_certs.py diff --git a/jans-ce-setup/static/scripts/super_gluu_license_renewer.py b/jans-linux-setup/static/scripts/super_gluu_license_renewer.py similarity index 100% rename from jans-ce-setup/static/scripts/super_gluu_license_renewer.py rename to jans-linux-setup/static/scripts/super_gluu_license_renewer.py diff --git a/jans-ce-setup/static/scripts/testBind.py b/jans-linux-setup/static/scripts/testBind.py similarity index 100% rename from jans-ce-setup/static/scripts/testBind.py rename to jans-linux-setup/static/scripts/testBind.py diff --git a/jans-ce-setup/static/system/initd/couchbase-server b/jans-linux-setup/static/system/initd/couchbase-server similarity index 100% rename from jans-ce-setup/static/system/initd/couchbase-server rename to jans-linux-setup/static/system/initd/couchbase-server diff --git a/jans-ce-setup/static/system/initd/jans-config-api b/jans-linux-setup/static/system/initd/jans-config-api similarity index 100% rename from jans-ce-setup/static/system/initd/jans-config-api rename to jans-linux-setup/static/system/initd/jans-config-api diff --git a/jans-ce-setup/static/system/initd/jetty.sh b/jans-linux-setup/static/system/initd/jetty.sh similarity index 100% rename from jans-ce-setup/static/system/initd/jetty.sh rename to jans-linux-setup/static/system/initd/jetty.sh diff --git a/jans-ce-setup/static/system/initd/node b/jans-linux-setup/static/system/initd/node similarity index 100% rename from jans-ce-setup/static/system/initd/node rename to jans-linux-setup/static/system/initd/node diff --git a/jans-ce-setup/static/system/systemd/jans-auth.service b/jans-linux-setup/static/system/systemd/jans-auth.service similarity index 100% rename from jans-ce-setup/static/system/systemd/jans-auth.service rename to jans-linux-setup/static/system/systemd/jans-auth.service diff --git a/jans-ce-setup/static/system/systemd/jans-config-api.service b/jans-linux-setup/static/system/systemd/jans-config-api.service similarity index 100% rename from jans-ce-setup/static/system/systemd/jans-config-api.service rename to jans-linux-setup/static/system/systemd/jans-config-api.service diff --git a/jans-ce-setup/static/system/systemd/jans-eleven.service b/jans-linux-setup/static/system/systemd/jans-eleven.service similarity index 100% rename from jans-ce-setup/static/system/systemd/jans-eleven.service rename to jans-linux-setup/static/system/systemd/jans-eleven.service diff --git a/jans-ce-setup/static/system/systemd/jans-fido2.service b/jans-linux-setup/static/system/systemd/jans-fido2.service similarity index 100% rename from jans-ce-setup/static/system/systemd/jans-fido2.service rename to jans-linux-setup/static/system/systemd/jans-fido2.service diff --git a/jans-ce-setup/static/system/systemd/jans-scim.service b/jans-linux-setup/static/system/systemd/jans-scim.service similarity index 100% rename from jans-ce-setup/static/system/systemd/jans-scim.service rename to jans-linux-setup/static/system/systemd/jans-scim.service diff --git a/jans-ce-setup/static/system/ubuntu/rsyslog b/jans-linux-setup/static/system/ubuntu/rsyslog similarity index 100% rename from jans-ce-setup/static/system/ubuntu/rsyslog rename to jans-linux-setup/static/system/ubuntu/rsyslog diff --git a/jans-ce-setup/templates/apache/error_pages/custom_404.html b/jans-linux-setup/templates/apache/error_pages/custom_404.html similarity index 100% rename from jans-ce-setup/templates/apache/error_pages/custom_404.html rename to jans-linux-setup/templates/apache/error_pages/custom_404.html diff --git a/jans-ce-setup/templates/apache/error_pages/custom_500.html b/jans-linux-setup/templates/apache/error_pages/custom_500.html similarity index 100% rename from jans-ce-setup/templates/apache/error_pages/custom_500.html rename to jans-linux-setup/templates/apache/error_pages/custom_500.html diff --git a/jans-ce-setup/templates/apache/error_pages/custom_502.html b/jans-linux-setup/templates/apache/error_pages/custom_502.html similarity index 100% rename from jans-ce-setup/templates/apache/error_pages/custom_502.html rename to jans-linux-setup/templates/apache/error_pages/custom_502.html diff --git a/jans-ce-setup/templates/apache/error_pages/custom_503.html b/jans-linux-setup/templates/apache/error_pages/custom_503.html similarity index 100% rename from jans-ce-setup/templates/apache/error_pages/custom_503.html rename to jans-linux-setup/templates/apache/error_pages/custom_503.html diff --git a/jans-ce-setup/templates/apache/error_pages/custom_504.html b/jans-linux-setup/templates/apache/error_pages/custom_504.html similarity index 100% rename from jans-ce-setup/templates/apache/error_pages/custom_504.html rename to jans-linux-setup/templates/apache/error_pages/custom_504.html diff --git a/jans-ce-setup/templates/apache/httpd.conf b/jans-linux-setup/templates/apache/httpd.conf similarity index 100% rename from jans-ce-setup/templates/apache/httpd.conf rename to jans-linux-setup/templates/apache/httpd.conf diff --git a/jans-ce-setup/templates/apache/httpd_2.4.conf b/jans-linux-setup/templates/apache/httpd_2.4.conf similarity index 100% rename from jans-ce-setup/templates/apache/httpd_2.4.conf rename to jans-linux-setup/templates/apache/httpd_2.4.conf diff --git a/jans-ce-setup/templates/apache/https_jans.conf b/jans-linux-setup/templates/apache/https_jans.conf similarity index 100% rename from jans-ce-setup/templates/apache/https_jans.conf rename to jans-linux-setup/templates/apache/https_jans.conf diff --git a/jans-ce-setup/templates/attributes.ldif b/jans-linux-setup/templates/attributes.ldif similarity index 100% rename from jans-ce-setup/templates/attributes.ldif rename to jans-linux-setup/templates/attributes.ldif diff --git a/jans-ce-setup/templates/base.ldif b/jans-linux-setup/templates/base.ldif similarity index 100% rename from jans-ce-setup/templates/base.ldif rename to jans-linux-setup/templates/base.ldif diff --git a/jans-ce-setup/templates/configuration.ldif b/jans-linux-setup/templates/configuration.ldif similarity index 100% rename from jans-ce-setup/templates/configuration.ldif rename to jans-linux-setup/templates/configuration.ldif diff --git a/jans-ce-setup/templates/datasource.properties b/jans-linux-setup/templates/datasource.properties similarity index 100% rename from jans-ce-setup/templates/datasource.properties rename to jans-linux-setup/templates/datasource.properties diff --git a/jans-ce-setup/templates/encode.py b/jans-linux-setup/templates/encode.py similarity index 100% rename from jans-ce-setup/templates/encode.py rename to jans-linux-setup/templates/encode.py diff --git a/jans-ce-setup/templates/hostname b/jans-linux-setup/templates/hostname similarity index 100% rename from jans-ce-setup/templates/hostname rename to jans-linux-setup/templates/hostname diff --git a/jans-ce-setup/templates/jans-auth/configuration.ldif b/jans-linux-setup/templates/jans-auth/configuration.ldif similarity index 100% rename from jans-ce-setup/templates/jans-auth/configuration.ldif rename to jans-linux-setup/templates/jans-auth/configuration.ldif diff --git a/jans-ce-setup/templates/jans-auth/groups.ldif b/jans-linux-setup/templates/jans-auth/groups.ldif similarity index 100% rename from jans-ce-setup/templates/jans-auth/groups.ldif rename to jans-linux-setup/templates/jans-auth/groups.ldif diff --git a/jans-ce-setup/templates/jans-auth/jans-auth-config.json b/jans-linux-setup/templates/jans-auth/jans-auth-config.json similarity index 100% rename from jans-ce-setup/templates/jans-auth/jans-auth-config.json rename to jans-linux-setup/templates/jans-auth/jans-auth-config.json diff --git a/jans-ce-setup/templates/jans-auth/jans-auth-errors.json b/jans-linux-setup/templates/jans-auth/jans-auth-errors.json similarity index 100% rename from jans-ce-setup/templates/jans-auth/jans-auth-errors.json rename to jans-linux-setup/templates/jans-auth/jans-auth-errors.json diff --git a/jans-ce-setup/templates/jans-auth/jans-auth-static-conf.json b/jans-linux-setup/templates/jans-auth/jans-auth-static-conf.json similarity index 100% rename from jans-ce-setup/templates/jans-auth/jans-auth-static-conf.json rename to jans-linux-setup/templates/jans-auth/jans-auth-static-conf.json diff --git a/jans-ce-setup/templates/jans-auth/people.ldif b/jans-linux-setup/templates/jans-auth/people.ldif similarity index 100% rename from jans-ce-setup/templates/jans-auth/people.ldif rename to jans-linux-setup/templates/jans-auth/people.ldif diff --git a/jans-ce-setup/templates/jans-auth/role-scope-mappings.ldif b/jans-linux-setup/templates/jans-auth/role-scope-mappings.ldif similarity index 100% rename from jans-ce-setup/templates/jans-auth/role-scope-mappings.ldif rename to jans-linux-setup/templates/jans-auth/role-scope-mappings.ldif diff --git a/jans-ce-setup/templates/jans-cli/client.ldif b/jans-linux-setup/templates/jans-cli/client.ldif similarity index 100% rename from jans-ce-setup/templates/jans-cli/client.ldif rename to jans-linux-setup/templates/jans-cli/client.ldif diff --git a/jans-ce-setup/templates/jans-config-api/auiConfiguration.properties b/jans-linux-setup/templates/jans-config-api/auiConfiguration.properties similarity index 100% rename from jans-ce-setup/templates/jans-config-api/auiConfiguration.properties rename to jans-linux-setup/templates/jans-config-api/auiConfiguration.properties diff --git a/jans-ce-setup/templates/jans-config-api/config.ldif b/jans-linux-setup/templates/jans-config-api/config.ldif similarity index 100% rename from jans-ce-setup/templates/jans-config-api/config.ldif rename to jans-linux-setup/templates/jans-config-api/config.ldif diff --git a/jans-ce-setup/templates/jans-config-api/dynamic-conf.json b/jans-linux-setup/templates/jans-config-api/dynamic-conf.json similarity index 100% rename from jans-ce-setup/templates/jans-config-api/dynamic-conf.json rename to jans-linux-setup/templates/jans-config-api/dynamic-conf.json diff --git a/jans-ce-setup/templates/jans-couchbase.properties b/jans-linux-setup/templates/jans-couchbase.properties similarity index 100% rename from jans-ce-setup/templates/jans-couchbase.properties rename to jans-linux-setup/templates/jans-couchbase.properties diff --git a/jans-ce-setup/templates/jans-eleven/jans-eleven.json b/jans-linux-setup/templates/jans-eleven/jans-eleven.json similarity index 100% rename from jans-ce-setup/templates/jans-eleven/jans-eleven.json rename to jans-linux-setup/templates/jans-eleven/jans-eleven.json diff --git a/jans-ce-setup/templates/jans-fido2/dynamic-conf.json b/jans-linux-setup/templates/jans-fido2/dynamic-conf.json similarity index 100% rename from jans-ce-setup/templates/jans-fido2/dynamic-conf.json rename to jans-linux-setup/templates/jans-fido2/dynamic-conf.json diff --git a/jans-ce-setup/templates/jans-fido2/fido2.ldif b/jans-linux-setup/templates/jans-fido2/fido2.ldif similarity index 100% rename from jans-ce-setup/templates/jans-fido2/fido2.ldif rename to jans-linux-setup/templates/jans-fido2/fido2.ldif diff --git a/jans-ce-setup/templates/jans-fido2/static-conf.json b/jans-linux-setup/templates/jans-fido2/static-conf.json similarity index 100% rename from jans-ce-setup/templates/jans-fido2/static-conf.json rename to jans-linux-setup/templates/jans-fido2/static-conf.json diff --git a/jans-ce-setup/templates/jans-ldap.properties b/jans-linux-setup/templates/jans-ldap.properties similarity index 100% rename from jans-ce-setup/templates/jans-ldap.properties rename to jans-linux-setup/templates/jans-ldap.properties diff --git a/jans-ce-setup/templates/jans-scim/clients.ldif b/jans-linux-setup/templates/jans-scim/clients.ldif similarity index 100% rename from jans-ce-setup/templates/jans-scim/clients.ldif rename to jans-linux-setup/templates/jans-scim/clients.ldif diff --git a/jans-ce-setup/templates/jans-scim/configuration.ldif b/jans-linux-setup/templates/jans-scim/configuration.ldif similarity index 100% rename from jans-ce-setup/templates/jans-scim/configuration.ldif rename to jans-linux-setup/templates/jans-scim/configuration.ldif diff --git a/jans-ce-setup/templates/jans-scim/dynamic-conf.json b/jans-linux-setup/templates/jans-scim/dynamic-conf.json similarity index 100% rename from jans-ce-setup/templates/jans-scim/dynamic-conf.json rename to jans-linux-setup/templates/jans-scim/dynamic-conf.json diff --git a/jans-ce-setup/templates/jans-scim/static-conf.json b/jans-linux-setup/templates/jans-scim/static-conf.json similarity index 100% rename from jans-ce-setup/templates/jans-scim/static-conf.json rename to jans-linux-setup/templates/jans-scim/static-conf.json diff --git a/jans-ce-setup/templates/jans-spanner.properties b/jans-linux-setup/templates/jans-spanner.properties similarity index 100% rename from jans-ce-setup/templates/jans-spanner.properties rename to jans-linux-setup/templates/jans-spanner.properties diff --git a/jans-ce-setup/templates/jans-sql.properties b/jans-linux-setup/templates/jans-sql.properties similarity index 100% rename from jans-ce-setup/templates/jans-sql.properties rename to jans-linux-setup/templates/jans-sql.properties diff --git a/jans-ce-setup/templates/jans.properties b/jans-linux-setup/templates/jans.properties similarity index 100% rename from jans-ce-setup/templates/jans.properties rename to jans-linux-setup/templates/jans.properties diff --git a/jans-ce-setup/templates/jetty.conf.tmpfiles.d b/jans-linux-setup/templates/jetty.conf.tmpfiles.d similarity index 100% rename from jans-ce-setup/templates/jetty.conf.tmpfiles.d rename to jans-linux-setup/templates/jetty.conf.tmpfiles.d diff --git a/jans-ce-setup/templates/jetty/jans-app.xml b/jans-linux-setup/templates/jetty/jans-app.xml similarity index 100% rename from jans-ce-setup/templates/jetty/jans-app.xml rename to jans-linux-setup/templates/jetty/jans-app.xml diff --git a/jans-ce-setup/templates/jetty/jans-auth b/jans-linux-setup/templates/jetty/jans-auth similarity index 100% rename from jans-ce-setup/templates/jetty/jans-auth rename to jans-linux-setup/templates/jetty/jans-auth diff --git a/jans-ce-setup/templates/jetty/jans-auth_web_resources.xml b/jans-linux-setup/templates/jetty/jans-auth_web_resources.xml similarity index 100% rename from jans-ce-setup/templates/jetty/jans-auth_web_resources.xml rename to jans-linux-setup/templates/jetty/jans-auth_web_resources.xml diff --git a/jans-ce-setup/templates/jetty/jans-config-api b/jans-linux-setup/templates/jetty/jans-config-api similarity index 100% rename from jans-ce-setup/templates/jetty/jans-config-api rename to jans-linux-setup/templates/jetty/jans-config-api diff --git a/jans-ce-setup/templates/jetty/jans-eleven b/jans-linux-setup/templates/jetty/jans-eleven similarity index 100% rename from jans-ce-setup/templates/jetty/jans-eleven rename to jans-linux-setup/templates/jetty/jans-eleven diff --git a/jans-ce-setup/templates/jetty/jans-fido2 b/jans-linux-setup/templates/jetty/jans-fido2 similarity index 100% rename from jans-ce-setup/templates/jetty/jans-fido2 rename to jans-linux-setup/templates/jetty/jans-fido2 diff --git a/jans-ce-setup/templates/jetty/jans-scim b/jans-linux-setup/templates/jetty/jans-scim similarity index 100% rename from jans-ce-setup/templates/jetty/jans-scim rename to jans-linux-setup/templates/jetty/jans-scim diff --git a/jans-ce-setup/templates/network b/jans-linux-setup/templates/network similarity index 100% rename from jans-ce-setup/templates/network rename to jans-linux-setup/templates/network diff --git a/jans-ce-setup/templates/opendj-setup.properties b/jans-linux-setup/templates/opendj-setup.properties similarity index 100% rename from jans-ce-setup/templates/opendj-setup.properties rename to jans-linux-setup/templates/opendj-setup.properties diff --git a/jans-ce-setup/templates/oxTrustLogRotationConfiguration.xml b/jans-linux-setup/templates/oxTrustLogRotationConfiguration.xml similarity index 100% rename from jans-ce-setup/templates/oxTrustLogRotationConfiguration.xml rename to jans-linux-setup/templates/oxTrustLogRotationConfiguration.xml diff --git a/jans-ce-setup/templates/oxValidation.json b/jans-linux-setup/templates/oxValidation.json similarity index 97% rename from jans-ce-setup/templates/oxValidation.json rename to jans-linux-setup/templates/oxValidation.json index 47aeff3c901..245e1928140 100644 --- a/jans-ce-setup/templates/oxValidation.json +++ b/jans-linux-setup/templates/oxValidation.json @@ -1,5 +1,5 @@ -{ - "minLength": "3", - "maxLength": "10", - "regexp": "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$" +{ + "minLength": "3", + "maxLength": "10", + "regexp": "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$" } \ No newline at end of file diff --git a/jans-ce-setup/templates/python.txt b/jans-linux-setup/templates/python.txt similarity index 100% rename from jans-ce-setup/templates/python.txt rename to jans-linux-setup/templates/python.txt diff --git a/jans-ce-setup/templates/scopes.ldif b/jans-linux-setup/templates/scopes.ldif similarity index 100% rename from jans-ce-setup/templates/scopes.ldif rename to jans-linux-setup/templates/scopes.ldif diff --git a/jans-ce-setup/templates/scripts.ldif b/jans-linux-setup/templates/scripts.ldif similarity index 100% rename from jans-ce-setup/templates/scripts.ldif rename to jans-linux-setup/templates/scripts.ldif diff --git a/jans-ce-setup/templates/snap-post-setup.py b/jans-linux-setup/templates/snap-post-setup.py similarity index 100% rename from jans-ce-setup/templates/snap-post-setup.py rename to jans-linux-setup/templates/snap-post-setup.py diff --git a/jans-ce-setup/templates/system_profile_init b/jans-linux-setup/templates/system_profile_init similarity index 100% rename from jans-ce-setup/templates/system_profile_init rename to jans-linux-setup/templates/system_profile_init diff --git a/jans-ce-setup/templates/system_profile_systemd b/jans-linux-setup/templates/system_profile_systemd similarity index 100% rename from jans-ce-setup/templates/system_profile_systemd rename to jans-linux-setup/templates/system_profile_systemd diff --git a/jans-ce-setup/templates/test/docs/oxauth-config-update.md b/jans-linux-setup/templates/test/docs/oxauth-config-update.md similarity index 100% rename from jans-ce-setup/templates/test/docs/oxauth-config-update.md rename to jans-linux-setup/templates/test/docs/oxauth-config-update.md diff --git a/jans-ce-setup/templates/test/jans-auth/client/config-oxauth-test-data.properties b/jans-linux-setup/templates/test/jans-auth/client/config-oxauth-test-data.properties similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/client/config-oxauth-test-data.properties rename to jans-linux-setup/templates/test/jans-auth/client/config-oxauth-test-data.properties diff --git a/jans-ce-setup/templates/test/jans-auth/data/oxauth-test-data-user.ldif b/jans-linux-setup/templates/test/jans-auth/data/oxauth-test-data-user.ldif similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/data/oxauth-test-data-user.ldif rename to jans-linux-setup/templates/test/jans-auth/data/oxauth-test-data-user.ldif diff --git a/jans-ce-setup/templates/test/jans-auth/data/oxauth-test-data.ldif b/jans-linux-setup/templates/test/jans-auth/data/oxauth-test-data.ldif similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/data/oxauth-test-data.ldif rename to jans-linux-setup/templates/test/jans-auth/data/oxauth-test-data.ldif diff --git a/jans-ce-setup/templates/test/jans-auth/schema/102-oxauth_test.ldif b/jans-linux-setup/templates/test/jans-auth/schema/102-oxauth_test.ldif similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/schema/102-oxauth_test.ldif rename to jans-linux-setup/templates/test/jans-auth/schema/102-oxauth_test.ldif diff --git a/jans-ce-setup/templates/test/jans-auth/schema/oxauth_index.txt b/jans-linux-setup/templates/test/jans-auth/schema/oxauth_index.txt similarity index 97% rename from jans-ce-setup/templates/test/jans-auth/schema/oxauth_index.txt rename to jans-linux-setup/templates/test/jans-auth/schema/oxauth_index.txt index e6177c49e53..ed634cab2df 100644 --- a/jans-ce-setup/templates/test/jans-auth/schema/oxauth_index.txt +++ b/jans-linux-setup/templates/test/jans-auth/schema/oxauth_index.txt @@ -1 +1 @@ -Create indexes myCustomAttr1, myCustomAttr2 +Create indexes myCustomAttr1, myCustomAttr2 diff --git a/jans-ce-setup/templates/test/jans-auth/server/config-build.properties b/jans-linux-setup/templates/test/jans-auth/server/config-build.properties similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/server/config-build.properties rename to jans-linux-setup/templates/test/jans-auth/server/config-build.properties diff --git a/jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-couchbase.properties.nrnd b/jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-couchbase.properties.nrnd similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-couchbase.properties.nrnd rename to jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-couchbase.properties.nrnd diff --git a/jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-data.properties b/jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-data.properties similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-data.properties rename to jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-data.properties diff --git a/jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-ldap.properties.nrnd b/jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-ldap.properties.nrnd similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-ldap.properties.nrnd rename to jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-ldap.properties.nrnd diff --git a/jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-spanner.properties.nrnd b/jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-spanner.properties.nrnd similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-spanner.properties.nrnd rename to jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-spanner.properties.nrnd diff --git a/jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-sql.properties.nrnd b/jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-sql.properties.nrnd similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/server/config-oxauth-test-sql.properties.nrnd rename to jans-linux-setup/templates/test/jans-auth/server/config-oxauth-test-sql.properties.nrnd diff --git a/jans-ce-setup/templates/test/jans-auth/server/config-oxauth.properties b/jans-linux-setup/templates/test/jans-auth/server/config-oxauth.properties similarity index 100% rename from jans-ce-setup/templates/test/jans-auth/server/config-oxauth.properties rename to jans-linux-setup/templates/test/jans-auth/server/config-oxauth.properties diff --git a/jans-ce-setup/templates/test/jans-config-api/client/config-api-server.properties b/jans-linux-setup/templates/test/jans-config-api/client/config-api-server.properties similarity index 100% rename from jans-ce-setup/templates/test/jans-config-api/client/config-api-server.properties rename to jans-linux-setup/templates/test/jans-config-api/client/config-api-server.properties diff --git a/jans-ce-setup/templates/test/jans-config-api/client/config-api-test.properties b/jans-linux-setup/templates/test/jans-config-api/client/config-api-test.properties similarity index 100% rename from jans-ce-setup/templates/test/jans-config-api/client/config-api-test.properties rename to jans-linux-setup/templates/test/jans-config-api/client/config-api-test.properties diff --git a/jans-ce-setup/templates/test/jans-config-api/data/jans-config-api.ldif b/jans-linux-setup/templates/test/jans-config-api/data/jans-config-api.ldif similarity index 97% rename from jans-ce-setup/templates/test/jans-config-api/data/jans-config-api.ldif rename to jans-linux-setup/templates/test/jans-config-api/data/jans-config-api.ldif index 7a16e9059f6..1ecb2bf2855 100644 --- a/jans-ce-setup/templates/test/jans-config-api/data/jans-config-api.ldif +++ b/jans-linux-setup/templates/test/jans-config-api/data/jans-config-api.ldif @@ -1,31 +1,31 @@ -dn: inum=%(jca_test_client_id)s,ou=clients,o=jans -objectClass: jansClnt -objectClass: top -del: FALSE -displayName: Jans Config Api Client -inum: %(jca_test_client_id)s -jansAccessTknAsJwt: FALSE -jansAccessTknSigAlg: RS256 -jansAppTyp: web -jansAttrs: {"tlsClientAuthSubjectDn":"","runIntrospectionScriptBeforeAccessT - okenAsJwtCreationAndIncludeClaims":false,"keepClientAuthorizationAfterExpir - ation":false,"allowSpontaneousScopes":false,"spontaneousScopes":[],"spontan - eousScopeScriptDns":[],"backchannelLogoutUri":[],"backchannelLogoutSessionR - equired":false,"additionalAudience":[],"postAuthnScripts":[],"consentGather - ingScripts":[],"introspectionScripts":[],"rptClaimsScripts":[]} -jansClntSecret: %(jca_test_client_encoded_pw)s -jansDisabled: FALSE -jansGrantTyp: authorization_code -jansGrantTyp: client_credentials -jansGrantTyp: refresh_token -jansIdTknSignedRespAlg: RS256 -jansInclClaimsInIdTkn: FALSE -jansLogoutSessRequired: FALSE -jansPersistClntAuthzs: TRUE -jansRequireAuthTime: FALSE -jansRespTyp: code -jansRptAsJwt: FALSE -jansSubjectTyp: pairwise -jansTknEndpointAuthMethod: client_secret_basic -jansTrustedClnt: FALSE -%(config_api_scopes)s +dn: inum=%(jca_test_client_id)s,ou=clients,o=jans +objectClass: jansClnt +objectClass: top +del: FALSE +displayName: Jans Config Api Client +inum: %(jca_test_client_id)s +jansAccessTknAsJwt: FALSE +jansAccessTknSigAlg: RS256 +jansAppTyp: web +jansAttrs: {"tlsClientAuthSubjectDn":"","runIntrospectionScriptBeforeAccessT + okenAsJwtCreationAndIncludeClaims":false,"keepClientAuthorizationAfterExpir + ation":false,"allowSpontaneousScopes":false,"spontaneousScopes":[],"spontan + eousScopeScriptDns":[],"backchannelLogoutUri":[],"backchannelLogoutSessionR + equired":false,"additionalAudience":[],"postAuthnScripts":[],"consentGather + ingScripts":[],"introspectionScripts":[],"rptClaimsScripts":[]} +jansClntSecret: %(jca_test_client_encoded_pw)s +jansDisabled: FALSE +jansGrantTyp: authorization_code +jansGrantTyp: client_credentials +jansGrantTyp: refresh_token +jansIdTknSignedRespAlg: RS256 +jansInclClaimsInIdTkn: FALSE +jansLogoutSessRequired: FALSE +jansPersistClntAuthzs: TRUE +jansRequireAuthTime: FALSE +jansRespTyp: code +jansRptAsJwt: FALSE +jansSubjectTyp: pairwise +jansTknEndpointAuthMethod: client_secret_basic +jansTrustedClnt: FALSE +%(config_api_scopes)s diff --git a/jans-ce-setup/templates/test/scim-client/client/config-scim-test.properties b/jans-linux-setup/templates/test/scim-client/client/config-scim-test.properties similarity index 100% rename from jans-ce-setup/templates/test/scim-client/client/config-scim-test.properties rename to jans-linux-setup/templates/test/scim-client/client/config-scim-test.properties diff --git a/jans-ce-setup/templates/test/scim-client/data/scim-test-data-user.ldif b/jans-linux-setup/templates/test/scim-client/data/scim-test-data-user.ldif similarity index 100% rename from jans-ce-setup/templates/test/scim-client/data/scim-test-data-user.ldif rename to jans-linux-setup/templates/test/scim-client/data/scim-test-data-user.ldif diff --git a/jans-ce-setup/templates/test/scim-client/data/scim-test-data.ldif b/jans-linux-setup/templates/test/scim-client/data/scim-test-data.ldif similarity index 100% rename from jans-ce-setup/templates/test/scim-client/data/scim-test-data.ldif rename to jans-linux-setup/templates/test/scim-client/data/scim-test-data.ldif diff --git a/jans-ce-setup/templates/test/scim-client/schema/103-scim_test.ldif b/jans-linux-setup/templates/test/scim-client/schema/103-scim_test.ldif similarity index 100% rename from jans-ce-setup/templates/test/scim-client/schema/103-scim_test.ldif rename to jans-linux-setup/templates/test/scim-client/schema/103-scim_test.ldif diff --git a/jans-ce-setup/templates/test/scim-client/schema/scim_test_manual_update.schema b/jans-linux-setup/templates/test/scim-client/schema/scim_test_manual_update.schema similarity index 100% rename from jans-ce-setup/templates/test/scim-client/schema/scim_test_manual_update.schema rename to jans-linux-setup/templates/test/scim-client/schema/scim_test_manual_update.schema diff --git a/jans-ce-setup/tests/analyzer.py b/jans-linux-setup/tests/analyzer.py similarity index 100% rename from jans-ce-setup/tests/analyzer.py rename to jans-linux-setup/tests/analyzer.py diff --git a/jans-ce-setup/tests/dummyfile b/jans-linux-setup/tests/dummyfile similarity index 100% rename from jans-ce-setup/tests/dummyfile rename to jans-linux-setup/tests/dummyfile diff --git a/jans-ce-setup/tests/os-release b/jans-linux-setup/tests/os-release similarity index 100% rename from jans-ce-setup/tests/os-release rename to jans-linux-setup/tests/os-release diff --git a/jans-ce-setup/tests/sample1.properties b/jans-linux-setup/tests/sample1.properties similarity index 100% rename from jans-ce-setup/tests/sample1.properties rename to jans-linux-setup/tests/sample1.properties diff --git a/jans-ce-setup/tests/sample2.properties b/jans-linux-setup/tests/sample2.properties similarity index 100% rename from jans-ce-setup/tests/sample2.properties rename to jans-linux-setup/tests/sample2.properties diff --git a/jans-ce-setup/tests/sample3.properties b/jans-linux-setup/tests/sample3.properties similarity index 100% rename from jans-ce-setup/tests/sample3.properties rename to jans-linux-setup/tests/sample3.properties diff --git a/jans-ce-setup/tests/test_functions.py b/jans-linux-setup/tests/test_functions.py similarity index 100% rename from jans-ce-setup/tests/test_functions.py rename to jans-linux-setup/tests/test_functions.py diff --git a/jans-ce-setup/tests/test_setup.py b/jans-linux-setup/tests/test_setup.py similarity index 100% rename from jans-ce-setup/tests/test_setup.py rename to jans-linux-setup/tests/test_setup.py