Skip to content

Commit 654d273

Browse files
committed
Include encrypted/hashed secrets in JSON results file for prepare model
1 parent f2bf13a commit 654d273

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ def check_and_tokenize(self, model_dict, attribute, location):
114114
self.custom_injection(model_dict, attribute, location, injector_commands)
115115

116116
elif attribute_type == PASSWORD:
117-
if self._model_context.is_discover_passwords():
117+
# if results.json file is used, include passwords mappings in the cache.
118+
# these will be filtered and included in the result only as allowed.
119+
uses_results_file = self._model_context.get_target_configuration().generate_results_file()
120+
121+
if self._model_context.is_discover_passwords() or uses_results_file:
118122
injector_commands = OrderedDict()
119123
injector_commands.update({VARIABLE_VALUE: model_value})
120124
else:

0 commit comments

Comments
 (0)