Skip to content

feat: Make the used password algorithm configurable #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions jobs/postgres/spec
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ properties:
databases.max_connections:
description: "Maximum number of database connections"
default: 500
databases.password_authentication_algorithm:
description: "Defines the central algorithm for encrypting passwords e.g. md5 or scram-sha-256"
default: "scram-sha-256"
databases.log_line_prefix:
description: "The postgres `printf` style string that is output at the beginning of each log line"
default: "%m: "
Expand Down
4 changes: 2 additions & 2 deletions jobs/postgres/templates/pg_hba.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local all vcap trust
host all vcap 127.0.0.1/32 trust
host all vcap ::1/128 trust
<% if !p("databases.trust_local_connections").nil? && !p("databases.trust_local_connections") %>
local all all md5
local all all <%= p("databases.password_authentication_algorithm") %>
<% else %>
local all all trust
host all all 127.0.0.1/32 trust
Expand All @@ -18,4 +18,4 @@ host all all ::1/128 trust
line
%>
<% end %>
host all all 0.0.0.0/0 md5
host all all 0.0.0.0/0 <%= p("databases.password_authentication_algorithm") %>
1 change: 1 addition & 0 deletions jobs/postgres/templates/postgresql.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ end
listen_addresses = '0.0.0.0'
port = <%= p("databases.port") %>
max_connections = <%= p("databases.max_connections") %>
password_encryption = <%= p("databases.password_authentication_algorithm") %>
external_pid_file = '/var/vcap/sys/run/postgres/postgres.pid'
authentication_timeout = 1min

Expand Down