From 5b7f82b42377d017471306a0c200657309758c1e Mon Sep 17 00:00:00 2001 From: Carolyn Rountree Date: Fri, 7 Oct 2022 17:08:17 -0500 Subject: [PATCH 1/3] Fix for flattened folders without tokens in location --- .../src/test/python/aliastest/verify/verifier_helper.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/alias-test/src/test/python/aliastest/verify/verifier_helper.py b/alias-test/src/test/python/aliastest/verify/verifier_helper.py index e81713301..e2b2c085e 100644 --- a/alias-test/src/test/python/aliastest/verify/verifier_helper.py +++ b/alias-test/src/test/python/aliastest/verify/verifier_helper.py @@ -326,6 +326,11 @@ def verify_attributes(self, attributes, location): :param location: current location in aliases """ _method_name = 'verify_attributes' + flattened_info = self._helper.aliases().get_wlst_flattened_folder_info(location) + if flattened_info is not None: + path_token = flattened_info.get_path_token() + mbean_name = flattened_info.get_mbean_name() + location.add_name_token(path_token, mbean_name) model_name_map = self._model_attribute_map(location) _logger.fine('WLSDPLYST-01211', location.get_folder_path(), model_name_map, class_name=CLASS_NAME, method_name=_method_name) @@ -973,6 +978,9 @@ def check_dictionary_against_model_list(self, location, dictionary, folder_map): if flattened_info is not None: _logger.finer('WLSDPLYST-01203', location.get_folder_path(), class_name=CLASS_NAME, method_name=_method_name) + path_token = flattened_info.get_path_token() + mbean_name = flattened_info.get_mbean_name() + location.add_name_token(path_token, mbean_name) else: keys = folder_map.keys() lower_case_map = all_utils.get_lower_case_dict(dictionary.keys()) From 59f468bf9a4e1505445a43560b08548f74b62a1a Mon Sep 17 00:00:00 2001 From: Carolyn Rountree Date: Wed, 14 Dec 2022 17:35:19 -0600 Subject: [PATCH 2/3] secure mode folder not discovered --- core/src/main/python/wlsdeploy/aliases/model_constants.py | 1 + .../python/wlsdeploy/tool/discover/topology_discoverer.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/core/src/main/python/wlsdeploy/aliases/model_constants.py b/core/src/main/python/wlsdeploy/aliases/model_constants.py index e882f596f..cc317b11e 100644 --- a/core/src/main/python/wlsdeploy/aliases/model_constants.py +++ b/core/src/main/python/wlsdeploy/aliases/model_constants.py @@ -262,6 +262,7 @@ SAML2_CREDENTIAL_MAPPER = 'SAML2CredentialMapper' SAML2_IDENTITY_ASSERTER = 'SAML2IdentityAsserter' SCRIPT_ACTION = 'ScriptAction' +SECURE_MODE = 'SecureMode' SECURITY = 'Security' SECURITY_CONFIGURATION = 'SecurityConfiguration' SECURITY_CONFIGURATION_CD_ENABLED = 'CrossDomainSecurityEnabled' diff --git a/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py b/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py index 51037057e..7f214408f 100644 --- a/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py +++ b/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py @@ -348,6 +348,14 @@ def discover_security_configuration(self): location.add_name_token(self._aliases.get_name_token(location), security_configuration) self._populate_model_parameters(result, location) self._massage_security_credential(result, location) + #Security Configuration has 2 subfolders, SecureMode and Realm + #Realm needs to be handled with special code, so discover SecureMode manually + location.append_location(model_constants.SECURE_MODE) + secure_mode = self._find_singleton_name_in_folder(location) + location.add_name_token(self._aliases.get_name_token(location), secure_mode) + result[model_constants.SECURE_MODE] = OrderedDict() + self._populate_model_parameters(result[model_constants.SECURE_MODE], location) + location.pop_location() location.append_location(model_constants.REALM) result[model_constants.REALM] = OrderedDict() realms = self._find_names_in_folder(location) From 8092057c5d54220df45495d873bd0108cfa7d1df Mon Sep 17 00:00:00 2001 From: Carolyn Rountree Date: Wed, 14 Dec 2022 18:29:59 -0600 Subject: [PATCH 3/3] secure mode folder not discovered --- .../python/wlsdeploy/tool/discover/topology_discoverer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py b/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py index 7f214408f..e38fd3b41 100644 --- a/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py +++ b/core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py @@ -352,9 +352,10 @@ def discover_security_configuration(self): #Realm needs to be handled with special code, so discover SecureMode manually location.append_location(model_constants.SECURE_MODE) secure_mode = self._find_singleton_name_in_folder(location) - location.add_name_token(self._aliases.get_name_token(location), secure_mode) - result[model_constants.SECURE_MODE] = OrderedDict() - self._populate_model_parameters(result[model_constants.SECURE_MODE], location) + if secure_mode is not None: + location.add_name_token(self._aliases.get_name_token(location), secure_mode) + result[model_constants.SECURE_MODE] = OrderedDict() + self._populate_model_parameters(result[model_constants.SECURE_MODE], location) location.pop_location() location.append_location(model_constants.REALM) result[model_constants.REALM] = OrderedDict()