postgresql/src
Andrew Dunstan 6d7a6feac4 Allow matching the DN of a client certificate for authentication
Currently we only recognize the Common Name (CN) of a certificate's
subject to be matched against the user name. Thus certificates with
subjects '/OU=eng/CN=fred' and '/OU=sales/CN=fred' will have the same
connection rights. This patch provides an option to match the whole
Distinguished Name (DN) instead of just the CN. On any hba line using
client certificate identity, there is an option 'clientname' which can
have values of 'DN' or 'CN'. The default is 'CN', the current procedure.

The DN is matched against the RFC2253 formatted DN, which looks like
'CN=fred,OU=eng'.

This facility of probably best used in conjunction with an ident map.

Discussion: https://postgr.es/m/92e70110-9273-d93c-5913-0bccb6562740@dunslane.net

Reviewed-By: Michael Paquier, Daniel Gustafsson, Jacob Champion
2021-03-29 15:49:39 -04:00
..
backend Allow matching the DN of a client certificate for authentication 2021-03-29 15:49:39 -04:00
bin Improve consistency of SQL code capitalization 2021-03-27 10:17:12 +01:00
common pg_upgrade: Check version of target cluster binaries 2021-03-03 09:45:56 +01:00
fe_utils Refactor and generalize the ParallelSlot machinery. 2021-03-11 13:17:46 -05:00
include Allow matching the DN of a client certificate for authentication 2021-03-29 15:49:39 -04:00
interfaces Need to step forward in the loop to get to an end. 2021-03-24 22:06:31 +01:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Remove extra increment of plpgsql's statement counter for FOR loops. 2021-02-02 14:35:12 -05:00
port Move bsearch_arg to src/port 2021-03-23 00:11:22 +01:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Allow matching the DN of a client certificate for authentication 2021-03-29 15:49:39 -04:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Revert "Enable parallel SELECT for "INSERT INTO ... SELECT ..."." 2021-03-24 11:29:15 +05:30
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:19 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Introduce --with-ssl={openssl} as a configure option 2021-02-01 19:19:44 +09:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00