Skip to content

Commit ce368db

Browse files
committed
No more LDAP SSL truststore password on CP4BA
1 parent fad74b9 commit ce368db

3 files changed

Lines changed: 18 additions & 24 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
# You are encouraged to use static refs such as tags, instead of branch name
55
#
66
# Running "pre-commit autoupdate" automatically updates rev to latest tag
7-
rev: 0.13.1+ibm.62.dss
7+
rev: 0.13.1+ibm.64.dss
88
hooks:
99
- id: detect-secrets # pragma: whitelist secret
1010
# Add options for detect-secrets-hook binary. You can run `detect-secrets-hook --help` to list out all possible options.
@@ -13,4 +13,3 @@ repos:
1313
# when "--baseline" with "--use-all-plugins", pre-commit scan with all available plugins
1414
# add "--fail-on-unaudited" to fail pre-commit for unaudited potential secrets
1515
args: [--baseline, .secrets.baseline]
16-

.secrets.baseline

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "^.git/.*|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2026-04-09T12:26:56Z",
6+
"generated_at": "2026-07-15T07:54:21Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -82,7 +82,7 @@
8282
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
8383
"is_secret": false,
8484
"is_verified": false,
85-
"line_number": 47,
85+
"line_number": 48,
8686
"type": "Basic Auth Credentials",
8787
"verified_result": null
8888
}
@@ -268,7 +268,7 @@
268268
"hashed_secret": "07313f0e320f22cbfa35cfc220508eb3ff457c7e",
269269
"is_secret": false,
270270
"is_verified": false,
271-
"line_number": 111,
271+
"line_number": 105,
272272
"type": "Secret Keyword",
273273
"verified_result": null
274274
}
@@ -278,31 +278,31 @@
278278
"hashed_secret": "642c4d230c27058424a132dbff9a0d1317fd0deb",
279279
"is_secret": false,
280280
"is_verified": false,
281-
"line_number": 125,
281+
"line_number": 135,
282282
"type": "Secret Keyword",
283283
"verified_result": null
284284
},
285285
{
286286
"hashed_secret": "fa9beb99e4029ad5a6615399e7bbae21356086b3",
287287
"is_secret": false,
288288
"is_verified": false,
289-
"line_number": 128,
289+
"line_number": 138,
290290
"type": "Secret Keyword",
291291
"verified_result": null
292292
},
293293
{
294294
"hashed_secret": "07313f0e320f22cbfa35cfc220508eb3ff457c7e",
295295
"is_secret": false,
296296
"is_verified": false,
297-
"line_number": 131,
297+
"line_number": 141,
298298
"type": "Secret Keyword",
299299
"verified_result": null
300300
},
301301
{
302302
"hashed_secret": "dece3177de6ef53ccd2138fa6a36213476061cb3",
303303
"is_secret": false,
304304
"is_verified": false,
305-
"line_number": 133,
305+
"line_number": 152,
306306
"type": "Secret Keyword",
307307
"verified_result": null
308308
}
@@ -646,7 +646,7 @@
646646
"hashed_secret": "d53cc24e20ca1808d3df033258b6d8e78168ecef",
647647
"is_secret": false,
648648
"is_verified": false,
649-
"line_number": 20,
649+
"line_number": 25,
650650
"type": "Secret Keyword",
651651
"verified_result": null
652652
}
@@ -768,7 +768,7 @@
768768
"hashed_secret": "d53cc24e20ca1808d3df033258b6d8e78168ecef",
769769
"is_secret": false,
770770
"is_verified": false,
771-
"line_number": 18,
771+
"line_number": 23,
772772
"type": "Secret Keyword",
773773
"verified_result": null
774774
}
@@ -1338,7 +1338,7 @@
13381338
}
13391339
]
13401340
},
1341-
"version": "0.13.1+ibm.62.dss",
1341+
"version": "0.13.1+ibm.64.dss",
13421342
"word_list": {
13431343
"file": null,
13441344
"hash": null

common/script/configureTlsSecurity.sh

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,10 @@ then
9999
fi
100100
# End - Configuration for the TLS security
101101

102-
if [ -f "/config/ldap/ldap.jks" ]
103-
then
104-
if [ -n "$LDAP_TRUSTSTORE_PASSWORD" ] || [ -f /config/secrets/dba-env-context/ldapSslTruststorePassword ]
105-
then
106-
# Set env var if secrets are passed using mounted volumes
107-
[ -f /config/secrets/dba-env-context/ldapSslTruststorePassword ] && export LDAP_TRUSTSTORE_PASSWORD=$(cat /config/secrets/dba-env-context/ldapSslTruststorePassword)
108-
echo "import /config/ldap/ldap.jks in trustore using provided LDAP truststore password"
109-
else
110-
echo "import /config/ldap/ldap.jks in trustore using default LDAP truststore password"
111-
LDAP_TRUSTSTORE_PASSWORD=changeit
112-
fi
102+
if [ -f "/config/ldap/ldap.jks" ]; then
103+
104+
echo "import /config/ldap/ldap.jks in trustore using default LDAP truststore password"
105+
LDAP_TRUSTSTORE_PASSWORD=changeit
113106

114107
i=0
115108
mapfile -t trust_list < <(keytool -J"-Xshareclasses:none" -list -v -keystore /config/ldap/ldap.jks -storepass $LDAP_TRUSTSTORE_PASSWORD | grep "Alias name" | awk 'NF>1{print $NF}')
@@ -121,11 +114,13 @@ then
121114
keytool -J"-Xshareclasses:none" -importkeystore -srckeystore /config/ldap/ldap.jks -destkeystore /config/security/truststore.jks -srcstorepass $LDAP_TRUSTSTORE_PASSWORD -deststorepass $DEFAULT_TRUSTSTORE_PASSWORD
122115

123116
else
117+
124118
echo "no /config/ldap/ldap.jks file"
119+
125120
fi
126121

127122
# This part allow to import a list of PEM certificate in the JVM
128-
echo "Importing trusted certificates $dir"
123+
echo "Importing trusted certificates $dir"
129124
TRUSTSTORE=/config/security/truststore.jks
130125
CERTDIR="/config/security/trusted-cert-volume/"
131126
if [ -d $CERTDIR ]; then

0 commit comments

Comments
 (0)