Skip to content

Commit 976479d

Browse files
authored
add dual authentication mode (#396)
1 parent ebfb395 commit 976479d

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

common/script/updateDatasource.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,15 @@ else
111111
case $DB_TYPE in
112112
*postgres* )
113113
if [ -n "$DB_SSL_MODE" ]
114-
then
115-
echo "postgres ssl: remove password from /config/datasource.xml"
116-
sed -i '/odmpwd/d' /config/datasource.xml
117-
fi
118-
;;
114+
then
115+
if [ -n "$DB_DUAL_AUTHENTICATION_MODE" ] && [ "$DB_DUAL_AUTHENTICATION_MODE" == "true" ]
116+
echo "keep password authentication for postgres ssl as DB_DUAL_AUTHENTICATION_MODE is set"
117+
else
118+
echo "postgres ssl: remove password from /config/datasource.xml"
119+
sed -i '/odmpwd/d' /config/datasource.xml
120+
fi
121+
fi
122+
;;
119123
esac
120124
fi
121125

0 commit comments

Comments
 (0)