99from java .util import Properties
1010from oracle .weblogic .deploy .create import RCURunner
1111from oracle .weblogic .deploy .util import WLSDeployArchive , FileUtils
12+ from wlsdeploy .util import string_utils
1213from wlsdeploy .aliases .location_context import LocationContext
1314from wlsdeploy .aliases .model_constants import ADMIN_PASSWORD
1415from wlsdeploy .aliases .model_constants import ADMIN_SERVER_NAME
4849from wlsdeploy .aliases .model_constants import PARTITION
4950from wlsdeploy .aliases .model_constants import PASSWORD
5051from wlsdeploy .aliases .model_constants import PASSWORD_ENCRYPTED
52+ from wlsdeploy .aliases .model_constants import PRODUCTION_MODE_ENABLED
5153from wlsdeploy .aliases .model_constants import RCU_ADMIN_PASSWORD
5254from wlsdeploy .aliases .model_constants import RCU_DB_CONN
5355from wlsdeploy .aliases .model_constants import RCU_DB_INFO
@@ -1110,6 +1112,16 @@ def _configure_security_configuration(self):
11101112 def __create_boot_dot_properties (self ):
11111113 _method_name = '__create_boot_dot_properties'
11121114 self .logger .entering (class_name = self .__class_name , method_name = _method_name )
1115+
1116+ if SERVER_START_MODE in self ._domain_info :
1117+ server_start_mode = self ._domain_info [SERVER_START_MODE ]
1118+ if server_start_mode == 'prod' or server_start_mode == 'PROD' :
1119+ return
1120+
1121+ if PRODUCTION_MODE_ENABLED in self ._topology :
1122+ if string_utils .to_boolean (self ._topology [PRODUCTION_MODE_ENABLED ]):
1123+ return
1124+
11131125 systemIni = SerializedSystemIni .getEncryptionService (self ._domain_home )
11141126 encryptionService = ClearOrEncryptedService (systemIni )
11151127 admin_password = self ._domain_info [ADMIN_PASSWORD ]
@@ -1124,10 +1136,14 @@ def __create_boot_dot_properties(self):
11241136 name = self .wlst_helper .get_quoted_name_for_wlst (model_name )
11251137 servers .append (name )
11261138
1139+ admin_username = self .aliases .decrypt_password (admin_username )
1140+ admin_password = self .aliases .decrypt_password (admin_password )
1141+ encrypted_username = encryptionService .encrypt (admin_username )
1142+ encrypted_password = encryptionService .encrypt (admin_password )
11271143 for server in servers :
11281144 properties = Properties ()
1129- properties .put ("username" , encryptionService . encrypt ( admin_username ) )
1130- properties .put ("password" , encryptionService . encrypt ( admin_password ) )
1145+ properties .put ("username" , encrypted_username )
1146+ properties .put ("password" , encrypted_password )
11311147 file_directory = self ._domain_home + "/servers/" + server + "/security"
11321148 file_location = file_directory + "/boot.properties"
11331149 if not os .path .exists (file_directory ):
0 commit comments