9
9
from java .util import Properties
10
10
from oracle .weblogic .deploy .create import RCURunner
11
11
from oracle .weblogic .deploy .util import WLSDeployArchive , FileUtils
12
+ from wlsdeploy .util import string_utils
12
13
from wlsdeploy .aliases .location_context import LocationContext
13
14
from wlsdeploy .aliases .model_constants import ADMIN_PASSWORD
14
15
from wlsdeploy .aliases .model_constants import ADMIN_SERVER_NAME
48
49
from wlsdeploy .aliases .model_constants import PARTITION
49
50
from wlsdeploy .aliases .model_constants import PASSWORD
50
51
from wlsdeploy .aliases .model_constants import PASSWORD_ENCRYPTED
52
+ from wlsdeploy .aliases .model_constants import PRODUCTION_MODE_ENABLED
51
53
from wlsdeploy .aliases .model_constants import RCU_ADMIN_PASSWORD
52
54
from wlsdeploy .aliases .model_constants import RCU_DB_CONN
53
55
from wlsdeploy .aliases .model_constants import RCU_DB_INFO
@@ -1110,6 +1112,16 @@ def _configure_security_configuration(self):
1110
1112
def __create_boot_dot_properties (self ):
1111
1113
_method_name = '__create_boot_dot_properties'
1112
1114
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
+
1113
1125
systemIni = SerializedSystemIni .getEncryptionService (self ._domain_home )
1114
1126
encryptionService = ClearOrEncryptedService (systemIni )
1115
1127
admin_password = self ._domain_info [ADMIN_PASSWORD ]
@@ -1124,10 +1136,14 @@ def __create_boot_dot_properties(self):
1124
1136
name = self .wlst_helper .get_quoted_name_for_wlst (model_name )
1125
1137
servers .append (name )
1126
1138
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 )
1127
1143
for server in servers :
1128
1144
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 )
1131
1147
file_directory = self ._domain_home + "/servers/" + server + "/security"
1132
1148
file_location = file_directory + "/boot.properties"
1133
1149
if not os .path .exists (file_directory ):
0 commit comments