Skip to content

Commit 02943c0

Browse files
committed
Merge branch 'wdt-665' into 'main'
Wdt 665 See merge request weblogic-cloud/weblogic-deploy-tooling!1518
2 parents 0fd1593 + c801199 commit 02943c0

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

core/src/main/python/create.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,6 @@ def main(model_context):
378378
domain_path = _get_domain_path(model_context, model_dictionary)
379379
archive_helper = ArchiveHelper(archive_file_name, domain_path, __logger, ExceptionType.CREATE)
380380

381-
has_atp, has_ssl = validate_rcu_args_and_model(model_context, model_dictionary, archive_helper, aliases)
382-
383381
if archive_helper:
384382
domain_parent = model_context.get_domain_parent_dir()
385383
domain_home = model_context.get_domain_home()
@@ -390,6 +388,8 @@ def main(model_context):
390388

391389
archive_helper.extract_all_database_wallets()
392390

391+
has_atp, has_ssl = validate_rcu_args_and_model(model_context, model_dictionary, archive_helper, aliases)
392+
393393
creator = DomainCreator(model_dictionary, model_context, aliases)
394394

395395
rcu_db_info = rcudbinfo_helper.create(model_dictionary, model_context, aliases)

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

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ def set_ssl_properties(xml_doc, atp_creds_path, keystore_password, truststore_pa
4343
else:
4444
set_property(dom_tree, prop, 'javax.net.ssl.trustStore', truststore)
4545

46-
if keystore_password is not None:
47-
set_property(dom_tree, prop, 'javax.net.ssl.keyStorePassword', keystore_password)
48-
if truststore_password is not None:
49-
set_property(dom_tree, prop, 'javax.net.ssl.trustStorePassword', truststore_password)
46+
if keystore_type == 'JKS' and keystore_password is not None:
47+
set_property(dom_tree, prop, 'javax.net.ssl.keyStorePassword', keystore_password)
48+
49+
if truststore_type == 'JKS' and truststore_password is not None:
50+
set_property(dom_tree, prop, 'javax.net.ssl.trustStorePassword', truststore_password)
51+
5052
# Persist the changes in the xml file
5153
file_handle = open(xml_doc, "w")
5254
dom_tree.writexml(file_handle)
@@ -56,14 +58,19 @@ def set_ssl_properties(xml_doc, atp_creds_path, keystore_password, truststore_pa
5658
def fix_store_type_and_default_value(keystore, keystore_type, truststore, truststore_type):
5759
# historical reason atp does not need these inputs by default and it uses JKS
5860
# set the default and return it
59-
if truststore is None:
60-
truststore = "truststore.jks"
61+
6162
if keystore is None:
62-
keystore = "keystore.jks"
63-
if truststore_type is None:
64-
truststore_type = "JKS"
65-
if keystore_type is None:
66-
keystore_type = "JKS"
63+
if keystore_type == 'SSO':
64+
keystore = 'cwallet.sso'
65+
else:
66+
keystore = 'keystore.jks'
67+
68+
if truststore is None:
69+
if truststore_type == 'SSO':
70+
truststore = 'cwallet.sso'
71+
else:
72+
truststore = 'truststore.jks'
73+
6774
return keystore, keystore_type, truststore, truststore_type
6875

6976

0 commit comments

Comments
 (0)