asyncpg icon indicating copy to clipboard operation
asyncpg copied to clipboard

Implement GSSAPI authentication

Open eltoder opened this issue 4 months ago • 3 comments

Most commonly used with Kerberos.

Closes: #769

eltoder avatar Feb 25 '24 18:02 eltoder

@elprans appreciate if you could take a look!

eltoder avatar Feb 25 '24 19:02 eltoder

@elprans I was wondering about testing as well, but did not look very carefully. First, I don't know if the version of postgres used in CI (https://github.com/MagicStack/asyncpg/blob/master/.github/workflows/install-postgres.sh) is even compiled with gssapi support. If not, this will be the first thing to fix. Once this is solved, we can use something like k5test (https://github.com/pythongssapi/k5test) to set up a kerberos environment, start a server and test that auth works.

eltoder avatar Feb 25 '24 23:02 eltoder

@elprans I fixed the test.

eltoder avatar Feb 26 '24 03:02 eltoder

@elprans I added unit tests using k5test. From my testing so far it appears that Ubuntu builds of postgres have kerberos support of out the box, so this is fairly straightforward. There is a good chance this will not work in CI on the first try, so I would appreciate if you could help.

eltoder avatar Feb 27 '24 16:02 eltoder

@eltoder Thanks for your work on this! I would like to use asyncpg at work but we require kerberos auth for Postgres.

@elprans Any ETA on when this might be available? Is there anything I can do to help?

awakeinagi avatar Mar 04 '24 19:03 awakeinagi

I think this is good to go. Thanks @eltoder!

elprans avatar Mar 04 '24 20:03 elprans

@elprans Any chance of a patch release (0.29.1) in the near future?

awakeinagi avatar Mar 05 '24 13:03 awakeinagi