Skip to content

Commit a0fbef0

Browse files
committed
Merge branch 'introspector-fix-cie-securemode-3.4' into 'release/3.4'
Fix secure mode detection in introspector 3.4 See merge request weblogic-cloud/weblogic-kubernetes-operator!4535
2 parents a2053ba + f851f43 commit a0fbef0

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

operator/src/main/resources/scripts/introspectDomain.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,11 +2028,25 @@ def getRealListenPort(template):
20282028

20292029
# Derive the default value for SecureMode of a domain
20302030
def isSecureModeEnabledForDomain(domain):
2031-
secureModeEnabled = false
2032-
if domain.getSecurityConfiguration().getSecureMode() != None:
2033-
secureModeEnabled = domain.getSecurityConfiguration().getSecureMode().isSecureModeEnabled()
2031+
secureModeEnabled = False
2032+
2033+
# Do not use domain.getSecurityConfiguration().getSecureMode()
2034+
# it will result in cie error in MII domain created by ServerStartMode: secure
2035+
# switched to use lsa() to avoid cie not exposing the function
2036+
2037+
cd('/SecurityConfiguration/' + domain.getName())
2038+
childs = ls(returnType='c', returnMap='true')
2039+
if 'SecureMode' in childs:
2040+
cd('SecureMode')
2041+
child_objs = ls(returnMap='true', returnType='c')
2042+
if not child_objs.isEmpty():
2043+
cd(child_objs[0])
2044+
attributes = ls(returnType='a', returnMap='true')
2045+
if attributes['SecureModeEnabled']:
2046+
secureModeEnabled = True
20342047
else:
20352048
secureModeEnabled = domain.isProductionModeEnabled() and not LegalHelper.versionEarlierThan(domain.getDomainVersion(), "14.1.2.0")
2049+
20362050
return secureModeEnabled
20372051

20382052
def isAdministrationPortEnabledForDomain(domain):

0 commit comments

Comments
 (0)