summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2024-12-02 13:30:07 -0600
committerNathan Bossart <nathan@postgresql.org>2024-12-02 13:30:07 -0600
commitdb6a4a985bc09d260d5c29848e3c97f080646a53 (patch)
tree5d57a50559a2a1ae40896a2007a9025a12339f22 /contrib
parent97173536ed4b1c29dce0dc4119db136e142f60a2 (diff)
Deprecate MD5 passwords.
MD5 has been considered to be unsuitable for use as a cryptographic hash algorithm for some time. Furthermore, MD5 password hashes in PostgreSQL are vulnerable to pass-the-hash attacks, i.e., knowing the username and hashed password is sufficient to authenticate. The SCRAM-SHA-256 method added in v10 is not subject to these problems and is considered to be superior to MD5. This commit marks MD5 password support in PostgreSQL as deprecated and to be removed in a future release. The documentation now contains several deprecation notices, and CREATE ROLE and ALTER ROLE now emit deprecation warnings when setting MD5 passwords. The warnings can be disabled by setting the md5_password_warnings parameter to "off". Reviewed-by: Greg Sabino Mullane, Jim Nasby Discussion: https://postgr.es/m/ZwbfpJJol7lDWajL%40nathan
Diffstat (limited to 'contrib')
-rw-r--r--contrib/passwordcheck/expected/passwordcheck.out1
-rw-r--r--contrib/passwordcheck/expected/passwordcheck_1.out1
-rw-r--r--contrib/passwordcheck/sql/passwordcheck.sql1
3 files changed, 3 insertions, 0 deletions
diff --git a/contrib/passwordcheck/expected/passwordcheck.out b/contrib/passwordcheck/expected/passwordcheck.out
index 2027681daf6..dfb2ccfe008 100644
--- a/contrib/passwordcheck/expected/passwordcheck.out
+++ b/contrib/passwordcheck/expected/passwordcheck.out
@@ -1,3 +1,4 @@
+SET md5_password_warnings = off;
LOAD 'passwordcheck';
CREATE USER regress_passwordcheck_user1;
-- ok
diff --git a/contrib/passwordcheck/expected/passwordcheck_1.out b/contrib/passwordcheck/expected/passwordcheck_1.out
index 5d8d5dcc1c2..9519d60a495 100644
--- a/contrib/passwordcheck/expected/passwordcheck_1.out
+++ b/contrib/passwordcheck/expected/passwordcheck_1.out
@@ -1,3 +1,4 @@
+SET md5_password_warnings = off;
LOAD 'passwordcheck';
CREATE USER regress_passwordcheck_user1;
-- ok
diff --git a/contrib/passwordcheck/sql/passwordcheck.sql b/contrib/passwordcheck/sql/passwordcheck.sql
index 1fbd6b0e96e..5953ece5c26 100644
--- a/contrib/passwordcheck/sql/passwordcheck.sql
+++ b/contrib/passwordcheck/sql/passwordcheck.sql
@@ -1,3 +1,4 @@
+SET md5_password_warnings = off;
LOAD 'passwordcheck';
CREATE USER regress_passwordcheck_user1;