Skip to content

Allow for SCRAM password encryption for versions >=10 #421

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

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ postgresql_ssl_ciphers:
- "@STRENGTH"
postgresql_ssl_prefer_server_ciphers: on
postgresql_ssl_ecdh_curve: "prime256v1"
postgresql_ssl_dh_params_file: "" # (>= 10)
postgresql_ssl_dh_params_file: "" # (>= 10)
postgresql_ssl_passphrase_command: "" # (>= 11)
postgresql_ssl_passphrase_command_supports_reload: off # (>= 11)
postgresql_ssl_renegotiation_limit: 512MB # amount of data between renegotiations
postgresql_ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem" # (>= 9.2)
postgresql_ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key" # (>= 9.2)
postgresql_ssl_ca_file: "" # (>= 9.2)
postgresql_ssl_crl_file: "" # (>= 9.2)
postgresql_password_encryption: on
postgresql_password_encryption: "{{'md5' if postgresql_version >= 10 else 'on'}}"
postgresql_db_user_namespace: off
postgresql_row_security: off # (>= 9.5)

Expand Down Expand Up @@ -347,7 +347,7 @@ postgresql_wal_receiver_timeout: 60s
# time to wait before retrying to retrieve WAL after a failed attempt
postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5)

# - Subscribers - (>= 10)
# - Subscribers - (>= 10)

# These settings are ignored on a publisher.

Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-10.j2
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart)
ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart)
ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart)
ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart)
password_encryption = {{'on' if postgresql_password_encryption else 'off'}} # md5 or scram-sha-256
password_encryption = '{{postgresql_password_encryption}}' # md5 or scram-sha-256
db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}}
row_security = {{'on' if postgresql_row_security else 'off'}}

Expand Down
6 changes: 3 additions & 3 deletions templates/postgresql.conf-11.j2
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ tcp_keepalives_count = {{ postgresql_tcp_keepalives_count }} # TCP_KEEPCNT;
# - Authentication -

authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s
password_encryption = {{ 'on' if postgresql_password_encryption else 'off' }} # md5 or scram-sha-256
password_encryption = '{{postgresql_password_encryption}}' # md5 or scram-sha-256
db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }}

# GSSAPI using Kerberos
Expand Down Expand Up @@ -169,7 +169,7 @@ effective_io_concurrency = {{ postgresql_effective_io_concurrency }} # 1-1000;
max_worker_processes = {{ postgresql_max_worker_processes }} # (change requires restart)
max_parallel_maintenance_workers = {{ postgresql_max_parallel_maintenance_workers }} # taken from max_parallel_workers
max_parallel_workers_per_gather = {{ postgresql_max_parallel_workers_per_gather }} # taken from max_parallel_workers
parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }}
parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }}
max_parallel_workers = {{ postgresql_max_parallel_workers }} # maximum number of max_worker_processes that
# can be used in parallel operations
old_snapshot_threshold = {{ postgresql_old_snapshot_threshold }} # 1min-60d; -1 disables; 0 is immediate
Expand Down Expand Up @@ -350,7 +350,7 @@ geqo_seed = {{ postgresql_geqo_seed }} # range 0.0-1.0
default_statistics_target = {{ postgresql_default_statistics_target }} # range 1-10000
constraint_exclusion = {{ postgresql_constraint_exclusion }} # on, off, or partition
cursor_tuple_fraction = {{ postgresql_cursor_tuple_fraction }} # range 0.0-1.0
from_collapse_limit = {{ postgresql_from_collapse_limit }}
from_collapse_limit = {{ postgresql_from_collapse_limit }}
join_collapse_limit = {{ postgresql_join_collapse_limit }} # 1 disables collapsing of explicit
# JOIN clauses
force_parallel_mode = {{ 'on' if ( postgresql_force_parallel_mode | bool == true or postgresql_force_parallel_mode == 'on' ) else ( 'regress' if postgresql_force_parallel_mode == 'regress' else 'off' ) }}
Expand Down