1min
is reasonable for most environments. For high-latency networks or complex authentication setups (like Kerberos in large enterprises), consider increasing to 2min
. Never set this higher than 5min
to maintain security against connection exhaustion attacks.off
is recommended for most environments. Enable this only in controlled enterprise environments where you fully trust the infrastructure and have a specific need for credential delegation. Always ensure proper security measures are in place when enabling delegation.off
(case-sensitive) is recommended for security-conscious environments. Set to on
only if you experience authentication issues due to case mismatches and you're confident this doesn't create security vulnerabilities in your specific setup.FILE:/etc/postgresql/krb5.keytab
or similar path. Ensure the file has strict permissions (usually 600) and is owned by the PostgreSQL user. Regularly rotate keytab files according to your organization's security policies.scram-sha-256
for maximum security. This is the strongest available method and protects against various attacks. Avoid older methods like md5
unless required for backward compatibility with very old clients. Remember that this setting only affects new passwords; existing passwords remain encrypted with their original method.4096
provides a good balance for most applications. For high-security environments, consider increasing to 10000
or higher. For systems with very high authentication rates, you might need to lower this value, but never go below 4096
. Monitor authentication performance after changing this value.Configuring authentication parameters correctly is essential for database security and access control.
With pghealth, you can:
Start securing your PostgreSQL authentication today with our free trial β no installation or commitment required.