Kerberos delegation support in libpq and postgres_fdw - Mailing list pgsql-hackers

From Peifeng Qiu
Subject Kerberos delegation support in libpq and postgres_fdw
Date
Msg-id CO1PR05MB8023CC2CB575E0FAAD7DF4F8A8E29@CO1PR05MB8023.namprd05.prod.outlook.com
Whole thread Raw
Responses Re: Kerberos delegation support in libpq and postgres_fdw  (Peifeng Qiu <peifengq@vmware.com>)
List pgsql-hackers
Hi hackers.

This is the patch to add kerberos delegation support in libpq, which
enables postgres_fdw to connect to another server and authenticate
as the same user to the current login user. This will obsolete my
previous patch which requires keytab file to be present on the fdw
server host.

After the backend accepts the gssapi context, it may also get a
proxy credential if permitted by policy. I previously made a hack
to pass the pointer of proxy credential directly into libpq. It turns
out that the correct way to do this is store/acquire using credential
cache within local process memory to prevent leak.

Because no password is needed when querying foreign table via
kerberos delegation, the "password_required" option in user
mapping must be set to false by a superuser. Other than this, it
should work with normal user.

I only tested it manually in a very simple configuration currently.
I will go on to work with TAP tests for this.

How do you feel about this patch? Any feature/security concerns
about this?

Best regards,
Peifeng Qiu

Attachment

pgsql-hackers by date:

Previous
From: Chris Cleveland
Date:
Subject: Re: Transactions and indexes
Next
From: Peter Smith
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions