mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Add support for Kerberos credential delegation
Support GSSAPI/Kerberos credentials being delegated to the server by a client. With this, a user authenticating to PostgreSQL using Kerberos (GSSAPI) credentials can choose to delegate their credentials to the PostgreSQL server (which can choose to accept them, or not), allowing the server to then use those delegated credentials to connect to another service, such as with postgres_fdw or dblink or theoretically any other service which is able to be authenticated using Kerberos. Both postgres_fdw and dblink are changed to allow non-superuser password-less connections but only when GSSAPI credentials have been delegated to the server by the client and GSSAPI is used to authenticate to the remote system. Authors: Stephen Frost, Peifeng Qiu Reviewed-By: David Christensen Discussion: https://postgr.es/m/CO1PR05MB8023CC2CB575E0FAAD7DF4F8A8E29@CO1PR05MB8023.namprd05.prod.outlook.com
This commit is contained in:
@@ -404,6 +404,7 @@ struct pg_conn
|
||||
char *krbsrvname; /* Kerberos service name */
|
||||
char *gsslib; /* What GSS library to use ("gssapi" or
|
||||
* "sspi") */
|
||||
char *gssdeleg; /* Try to delegate GSS credentials? */
|
||||
char *ssl_min_protocol_version; /* minimum TLS protocol version */
|
||||
char *ssl_max_protocol_version; /* maximum TLS protocol version */
|
||||
char *target_session_attrs; /* desired session properties */
|
||||
@@ -465,6 +466,7 @@ struct pg_conn
|
||||
int sversion; /* server version, e.g. 70401 for 7.4.1 */
|
||||
bool auth_req_received; /* true if any type of auth req received */
|
||||
bool password_needed; /* true if server demanded a password */
|
||||
bool gssapi_used; /* true if authenticated via gssapi */
|
||||
bool sigpipe_so; /* have we masked SIGPIPE via SO_NOSIGPIPE? */
|
||||
bool sigpipe_flag; /* can we mask SIGPIPE via MSG_NOSIGNAL? */
|
||||
bool write_failed; /* have we had a write failure on sock? */
|
||||
|
||||
Reference in New Issue
Block a user