Skip to content

Commit c533c7a

Browse files
committed
Issue#84 - Avoid displaying password fields as part of entry logging. Password fields appear as <masked>, consistent with other logging. Fixes #84
1 parent 153cec1 commit c533c7a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

core/src/main/python/wlsdeploy/aliases/alias_entries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class AliasEntries(object):
155155

156156
__domain_info_attributes_and_types = {
157157
'AdminUserName': 'string',
158-
'AdminPassword': 'string',
158+
'AdminPassword': 'password',
159159
'ServerStartMode': 'string',
160160
'domainLibraries': 'list',
161161
# A map of Server Group names to the list of servers/clusters to which they should

core/src/main/python/wlsdeploy/tool/validate/validator.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,12 @@ def __validate_attribute(self, attribute_name, attribute_value, valid_attr_infos
715715
model_folder_path, validation_location, validation_result):
716716
_method_name = '__validate_attribute'
717717

718-
self._logger.entering(attribute_name, attribute_value, str(valid_attr_infos), str(path_tokens_attr_keys),
718+
log_value = attribute_value
719+
expected_data_type = dictionary_utils.get_element(valid_attr_infos, attribute_name)
720+
if expected_data_type == 'password':
721+
log_value = '<masked>'
722+
723+
self._logger.entering(attribute_name, log_value, str(valid_attr_infos), str(path_tokens_attr_keys),
719724
model_folder_path, str(validation_location),
720725
class_name=_class_name, method_name=_method_name)
721726

0 commit comments

Comments
 (0)