Skip to content

Commit

Permalink
disable hostname validation with new DB2 driver
Browse files Browse the repository at this point in the history
  • Loading branch information
mmouly authored Jan 9, 2025
1 parent 1ef2a67 commit e40ac0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/script/updateDatasource.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ then
if [ -n "$DB_SSL_TRUSTSTORE_PASSWORD" ]
then
echo "configure DB2 SSL with DB_SSL_TRUSTSTORE_PASSWORD"
sed -i 's|sslConnection="false"|sslConnection="true" sslVersion="TLSv1.3" sslTrustStoreLocation="/config/customdatasource/truststore.p12" sslTrustStorePassword="'$DB_SSL_TRUSTSTORE_PASSWORD'"|g' /config/datasource.xml
sed -i 's|sslConnection="false"|sslConnection="true" sslClientHostnameValidation="OFF" sslVersion="TLSv1.3" sslTrustStoreLocation="/config/customdatasource/truststore.p12" sslTrustStorePassword="'$DB_SSL_TRUSTSTORE_PASSWORD'"|g' /config/datasource.xml
else
echo "configure DB2 SSL with DEFAULT_TRUSTSTORE_PASSWORD"
DEFAULT_TRUSTSTORE_PASSWORD=changeme
if [ -f "/shared/tls/truststore/jks/trusts.jks" ]
then
DEFAULT_TRUSTSTORE_PASSWORD=changeit
fi
sed -i 's|sslConnection="false"|sslConnection="true" sslVersion="TLSv1.3" sslTrustStoreLocation="/config/security/truststore.p12" sslTrustStorePassword="'$DEFAULT_TRUSTSTORE_PASSWORD'"|g' /config/datasource.xml
sed -i 's|sslConnection="false"|sslConnection="true" sslClientHostnameValidation="OFF" sslVersion="TLSv1.3" sslTrustStoreLocation="/config/security/truststore.p12" sslTrustStorePassword="'$DEFAULT_TRUSTSTORE_PASSWORD'"|g' /config/datasource.xml
if [ -f /config/customdatasource/tls.crt ]
then
echo "Import DB2 certificate"
Expand Down

0 comments on commit e40ac0c

Please sign in to comment.