Skip to content

Commit 47a4e45

Browse files
decrypt encyrpted security user password before encrypting for security (#1012)
1 parent 4ef5faf commit 47a4e45

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/src/main/python/wlsdeploy/tool/create/domain_creator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ def __create_security_folder(self):
702702
self.logger.entering(class_name=self.__class_name, method_name=_method_name)
703703
security_folder = dictionary_utils.get_dictionary_element(self._topology, SECURITY)
704704
if security_folder is not None:
705-
helper = DefaultAuthenticatorHelper(self.model_context, ExceptionType.CREATE)
705+
helper = DefaultAuthenticatorHelper(self.model_context, self.aliases, ExceptionType.CREATE)
706706
helper.create_default_init_file(security_folder)
707707
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)
708708

core/src/main/python/wlsdeploy/tool/util/default_authenticator_helper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ class DefaultAuthenticatorHelper(object):
4343
"""
4444
_class_name = 'DefaultAuthenticatorHelper'
4545

46-
def __init__(self, model_context, exception_type):
46+
def __init__(self, model_context, aliases, exception_type):
4747
self._model_context = model_context
48+
self._aliases = aliases
4849
self._exception_type = exception_type
4950
self._logger = PlatformLogger('wlsdeploy.tool.util')
5051
self._weblogic_helper = WebLogicHelper(self._logger)
@@ -135,6 +136,7 @@ def _build_user_mapping_hash(self, user_mapping_section, name):
135136
hash_entry[HASH_DESCRIPTION] = description
136137
groups = dictionary_utils.get_element(group_attributes, GROUP_MEMBER_OF)
137138
password = self._get_required_attribute(user_mapping_section, PASSWORD, USER, name)
139+
password = self._aliases.decrypt_password(password)
138140
password_encoded = self._encode_password(name, password)
139141
hash_entry[HASH_USER_PASSWORD] = password_encoded
140142
group_list = []
@@ -177,6 +179,7 @@ def _get_required_attribute(self, dictionary, name, mapping_type, mapping_name):
177179
_method_name = '_get_required_attribute'
178180

179181
result = dictionary_utils.get_element(dictionary, name)
182+
180183
if result is None:
181184
pwe = exception_helper.create_exception(self._exception_type, '-01791', name, mapping_type,
182185
mapping_name)

0 commit comments

Comments
 (0)