Skip to content

Commit

Permalink
Set md5 after postgres version 14 (#34)
Browse files Browse the repository at this point in the history
Signed-off-by: souravbiswassanto <[email protected]>
  • Loading branch information
souravbiswassanto authored Aug 9, 2024
1 parent 318d873 commit 0a1e0a9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions role_scripts/14/primary/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,16 @@ if [[ "${SSL:-0}" == "ON" ]]; then
echo "ssl_ca_file ='/tls/certs/server/ca.crt'" >>/tmp/postgresql.conf
fi

if [[ "$CLIENT_AUTH_MODE" == "md5" ]]; then
echo "password_encryption = md5" >>/tmp/postgresql.conf
fi

if [[ "$CLIENT_AUTH_MODE" == "scram" ]]; then
echo "password_encryption = scram-sha-256" >>/tmp/postgresql.conf
fi



# ****************** Recovery config **************************
echo "recovery_target_timeline = 'latest'" >>/tmp/postgresql.conf
# primary_conninfo is used for streaming replication
Expand Down
4 changes: 4 additions & 0 deletions role_scripts/15/primary/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ if [[ "${SSL:-0}" == "ON" ]]; then
echo "ssl_ca_file ='/tls/certs/server/ca.crt'" >>/tmp/postgresql.conf
fi

if [[ "$CLIENT_AUTH_MODE" == "md5" ]]; then
echo "password_encryption = md5" >>/tmp/postgresql.conf
fi

if [[ "$CLIENT_AUTH_MODE" == "scram" ]]; then
echo "password_encryption = scram-sha-256" >>/tmp/postgresql.conf
fi
Expand Down
4 changes: 4 additions & 0 deletions role_scripts/16/primary/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ if [[ "${SSL:-0}" == "ON" ]]; then
echo "ssl_ca_file ='/tls/certs/server/ca.crt'" >>/tmp/postgresql.conf
fi

if [[ "$CLIENT_AUTH_MODE" == "md5" ]]; then
echo "password_encryption = md5" >>/tmp/postgresql.conf
fi

if [[ "$CLIENT_AUTH_MODE" == "scram" ]]; then
echo "password_encryption = scram-sha-256" >>/tmp/postgresql.conf
fi
Expand Down

0 comments on commit 0a1e0a9

Please sign in to comment.