]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add password expiration warnings.
authorNathan Bossart <nathan@postgresql.org>
Wed, 11 Feb 2026 16:36:15 +0000 (10:36 -0600)
committerNathan Bossart <nathan@postgresql.org>
Wed, 11 Feb 2026 16:36:15 +0000 (10:36 -0600)
commit1d92e0c2cc4789255c630d8776bbe85ca9ebc27f
tree0ed9525534605fac4edda216259e8ef6b697ec89
parenta3fd53babb8e8bde688739ec367a6d170495cfb4
Add password expiration warnings.

This commit adds a new parameter called
password_expiration_warning_threshold that controls when the server
begins emitting imminent-password-expiration warnings upon
successful password authentication.  By default, this parameter is
set to 7 days, but this functionality can be disabled by setting it
to 0.  This patch also introduces a new "connection warning"
infrastructure that can be reused elsewhere.  For example, we may
want to warn about the use of MD5 passwords for a couple of
releases before removing MD5 password support.

Author: Gilles Darold <gilles@darold.net>
Co-authored-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Reviewed-by: songjinzhou <tsinghualucky912@foxmail.com>
Reviewed-by: liu xiaohui <liuxh.zj.cn@gmail.com>
Reviewed-by: Yuefei Shi <shiyuefei1004@gmail.com>
Reviewed-by: Steven Niu <niushiji@gmail.com>
Reviewed-by: Soumya S Murali <soumyamurali.work@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Greg Sabino Mullane <htamfids@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/129bcfbf-47a6-e58a-190a-62fc21a17d03%40migops.com
doc/src/sgml/config.sgml
src/backend/libpq/crypt.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/guc_parameters.dat
src/backend/utils/misc/postgresql.conf.sample
src/include/libpq/crypt.h
src/include/miscadmin.h
src/test/authentication/t/001_password.pl