Skip to content

Commit 76f1cef

Browse files
committed
Merge branch 'oracle-identity' into 'main'
Include OracleIdentityCloudIntegrator provider in alias test See merge request weblogic-cloud/weblogic-deploy-tooling!1829
2 parents 80dd2a7 + 8d6dcc5 commit 76f1cef

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/SecurityConfiguration.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -840,24 +840,32 @@
840840
"version": "[12.2.1.3,)",
841841
"folders": {},
842842
"attributes" : {
843+
"AccessTokenContextPath": [ {"version": "[15.1.1,)", "wlst_mode": "both", "wlst_name": "AccessTokenContextPath${:s}", "wlst_path": "WP001", "default_value": "", "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string", "preferred_model_type": "list", "get_method": "${LSA:GET}" } ],
843844
"AccessTokenTimeoutWindow": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "AccessTokenTimeoutWindow", "wlst_path": "WP001", "default_value": "${0:300}", "wlst_type": "integer" } ],
844845
"ActiveType": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ActiveType${:s}", "wlst_path": "WP001", "default_value": "${:idcs_user_assertion,Idcs_user_assertion}", "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string", "preferred_model_type": "list", "get_method": "${LSA:GET}" } ],
845-
"AnyIdentityDomainEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "AnyIdentityDomainEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
846+
"AltClientIdTokenClaim": [ {"version": "[15.1.1,)", "wlst_mode": "both", "wlst_name": "AltClientI${d:D}TokenClaim", "wlst_path": "WP001", "default_value": "client_faId", "wlst_type": "string" } ],
847+
"AltIdTokenClaim": [
848+
{"version": "[14.1.2,15.1.1)", "wlst_mode": "both", "wlst_name": "AltI${d:D}TokenClaim", "wlst_path": "WP001", "default_value": "faId", "wlst_type": "string" },
849+
{"version": "[15.1.1,)", "wlst_mode": "both", "wlst_name": "AltI${d:D}TokenClaim", "wlst_path": "WP001", "default_value": "user_faId", "wlst_type": "string" }
850+
],
851+
"AnyIdentityDomainEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "online", "wlst_name": "AnyIdentityDomainEnabled", "wlst_path": "WP001", "default_value": "${false:true}", "wlst_type": "boolean", "access": "RO"} ],
846852
"AppNameFilterHeaderName": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "AppNameFilterHeaderName", "wlst_path": "WP001", "default_value": "X-RESOURCE-SERVICE-INSTANCE-IDENTITY-APPNAME", "wlst_type": "string" } ],
847853
"AppRolesTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "AppRolesTokenClaim", "wlst_path": "WP001", "default_value": "appRoles", "wlst_type": "string" } ],
848854
"AudienceEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "AudienceEnabled", "wlst_path": "WP001", "default_value": true, "wlst_type": "boolean" } ],
849855
"Base64DecodingRequired": [ {"version": "[12.2.1.3,)", "wlst_mode": "online", "wlst_name": "Base64DecodingRequired", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean", "access": "IGNORED" } ],
850-
"BasePath": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "BasePath", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
856+
"BasePath": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "BasePath", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "uses_path_tokens": true } ],
851857
"CacheEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "CacheEnabled", "wlst_path": "WP001", "default_value": true, "wlst_type": "boolean" } ],
852858
"CacheSize": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "CacheSize", "wlst_path": "WP001", "default_value": "${0:500}", "wlst_type": "integer" } ],
853-
"CacheTtl": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "CacheT${tl:TL}", "wlst_path": "WP001", "default_value": "${0:300}", "wlst_type": "string" } ],
859+
"CacheTtl": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "CacheT${tl:TL}", "wlst_path": "WP001", "default_value": "${0:300}", "wlst_type": "integer" } ],
854860
"ClientAsUserPrincipalEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientAsUserPrincipalEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
855861
"ClientId": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientId", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
856-
"ClientIdResourceAttribute": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientIdResourceAttribute", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
857-
"ClientIdTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientIdTokenClaim", "wlst_path": "WP001", "default_value": "client_id", "wlst_type": "string" } ],
862+
"ClientIdResourceAttribute": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientI${d:D}ResourceAttribute", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
863+
"ClientIdTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientI${d:D}TokenClaim", "wlst_path": "WP001", "default_value": "client_id", "wlst_type": "string" } ],
858864
"ClientNameTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientNameTokenClaim", "wlst_path": "WP001", "default_value": "client_name", "wlst_type": "string" } ],
859-
"ClientSecretEncrypted": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientSecretEncrypted", "wlst_path": "WP001", "default_value": null, "wlst_type": "password", "set_method": "MBEAN.set_encrypted"} ],
865+
"ClientSecretEncrypted": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientSecretEncrypted", "wlst_path": "WP001", "default_value": null, "wlst_type": "password", "get_method": "GET", "set_method": "MBEAN.set_encrypted"} ],
860866
"ClientTenant": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientTenant", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
867+
"ClientTenantTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ClientTenantTokenClaim", "wlst_path": "WP001", "default_value": "client_tenantname", "wlst_type": "string" } ],
868+
"CompatibilityObjectName": [ {"version": "[12.2.1.3,)", "wlst_mode": "offline", "wlst_name": "CompatibilityObjectName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
861869
"ConnectTimeout": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ConnectTimeout", "wlst_path": "WP001", "default_value": "${0:60}", "wlst_type": "integer" } ],
862870
"ControlFlag": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ControlFlag", "wlst_path": "WP001", "default_value": "${__NULL__:REQUIRED}", "wlst_type": "string" } ],
863871
"Description": [ {"version": "[12.2.1.3,)", "wlst_mode": "online", "wlst_name": "Description", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" } ],
@@ -869,6 +877,7 @@
869877
"KnownTenantPrefix": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "KnownTenantPrefix${:List}", "wlst_path": "WP001", "default_value": "${:idcs-}", "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string", "preferred_model_type": "list", "get_method": "${LSA:GET}" } ],
870878
"OnlyUserTokenClaimsEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "OnlyUserTokenClaimsEnabled", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
871879
"Port": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "Port", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer" } ],
880+
"PreferAltId": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "PreferAltI${d:D}", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
872881
"ProviderClassName": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "ProviderClassName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED" },
873882
{"version": "[12.2.1.4,)", "wlst_mode": "offline", "wlst_name": "ProviderClassName", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "access": "IGNORED", "get_method": "GET" }],
874883
"ResourceTenantTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "ResourceTenantTokenClaim", "wlst_path": "WP001", "default_value": "tenant", "wlst_type": "string" } ],
@@ -887,7 +896,7 @@
887896
"TenantDataFlushInterval": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantDataFlushInterval", "wlst_path": "WP001", "default_value": 0, "wlst_type": "integer" } ],
888897
"TenantDataReloadEnabled": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantDataReloadEnabled", "wlst_path": "WP001", "default_value": true, "wlst_type": "boolean" } ],
889898
"TenantDataReloadInterval": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantDataReloadInterval", "wlst_path": "WP001", "default_value": "${0:300}", "wlst_type": "integer" } ],
890-
"TenantHeaderName": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantHeaderName${:s}", "wlst_path": "WP001", "default_value": "java.lang.String[idcs_user_assertion, Idcs_user_assertion, Authorization, REMOTE_USER, IDCS_REMOTE_USER]", "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string", "preferred_model_type": "list", "get_method": "${LSA:GET}" } ],
899+
"TenantHeaderName": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantHeaderName${:s}", "wlst_path": "WP001", "default_value": "X-USER-IDENTITY-SERVICE-GUID, X-USER-IDENTITY-DOMAIN-NAME, X-RESOURCE-IDENTITY-SERVICE-GUID, X-RESOURCE-IDENTITY-DOMAIN-NAME", "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string", "preferred_model_type": "list", "get_method": "${LSA:GET}" } ],
891900
"TenantHostNameTemplate": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantHostNameTemplate", "wlst_path": "WP001", "default_value": "{%tenant}.{%host}", "wlst_type": "string" } ],
892901
"TenantName": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantName${:s}", "wlst_path": "WP001", "default_value": null, "wlst_type": "${list:jarray}", "wlst_read_type": "delimited_string", "preferred_model_type": "list", "get_method": "${LSA:GET}" } ],
893902
"TenantTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "TenantTokenClaim", "wlst_path": "WP001", "default_value": "user_tenantname", "wlst_type": "string" } ],
@@ -903,6 +912,7 @@
903912
"UserIdTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "UserI${d:D}TokenClaim", "wlst_path": "WP001", "default_value": "user_id", "wlst_type": "string" } ],
904913
"UserNameResourceAttribute": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "UserNameResourceAttribute", "wlst_path": "WP001", "default_value": "userName", "wlst_type": "string" } ],
905914
"UserNameTokenClaim": [ {"version": "[12.2.1.3,)", "wlst_mode": "both", "wlst_name": "UserNameTokenClaim", "wlst_path": "WP001", "default_value": null, "wlst_type": "string" } ],
915+
"UseRetrievedUserNameAsPrincipal": [ {"version": "[14.1.2,)", "wlst_mode": "both", "wlst_name": "UseRetrievedUserNameAsPrincipal", "wlst_path": "WP001", "default_value": false, "wlst_type": "boolean" } ],
906916
"Version": [ {"version": "[12.2.1.3,)", "wlst_mode": "online", "wlst_name": "Version", "wlst_path": "WP001", "default_value": "1.0", "wlst_type": "string", "access": "IGNORED" } ]
907917
},
908918
"wlst_attributes_path": "WP001",

integration-tests/alias-test/verify/src/test/python/aliastest/verify/verifier.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@
186186
"/ServerTemplate/SSL/ListenPort"
187187
}
188188

189+
FULLY_QUALIFIED_PROVIDERS = {
190+
# these security providers use their full name in the aliases
191+
'OracleIdentityCloudIntegrator' : 'weblogic.security.providers.authentication.OracleIdentityCloudIntegrator'
192+
}
193+
189194
_logger = PlatformLogger('test.aliases.verify')
190195
CLASS_NAME = 'Verifier'
191196

@@ -1153,10 +1158,17 @@ def _process_security_provider(self, generated_dictionary, mbean_name, alias_map
11531158

11541159
name_token = self._alias_helper.get_name_token(l2)
11551160
for provider in generated_dictionary[mbean_name].keys():
1161+
if provider == TYPE: # flag added by generator
1162+
continue
1163+
11561164
l2.add_name_token(name_token, provider)
11571165
model_provider = provider
11581166
if '.' in provider:
11591167
model_provider = provider[provider.rfind('.') + 1:]
1168+
1169+
if model_provider in FULLY_QUALIFIED_PROVIDERS:
1170+
model_provider = FULLY_QUALIFIED_PROVIDERS[model_provider]
1171+
11601172
if model_provider is None or model_provider not in alias_subfolders:
11611173
self._add_warning(location, WARN_ALIAS_FOLDER_NOT_IMPLEMENTED, attribute=provider)
11621174
continue
@@ -1495,7 +1507,8 @@ def _is_clear_text_password(attribute_name):
14951507
"""
14961508
# clear text password attributes are not in the alias definition and are skipped on discover or set
14971509
# clear text do not have Encrypted on the end
1498-
return ('Credential' in attribute_name or 'Pass' in attribute_name or 'Encrypted' in attribute_name) and \
1510+
return ('Credential' in attribute_name or 'Pass' in attribute_name or 'Encrypted' in attribute_name or
1511+
'Secret' in attribute_name) and \
14991512
not attribute_name.endswith('Encrypted')
15001513

15011514

0 commit comments

Comments
 (0)