MagicStack / asyncpg

A fast PostgreSQL Database Client Library for Python/asyncio.
Apache License 2.0
6.99k stars 404 forks source link

Implement GSSAPI authentication #1122

Closed eltoder closed 8 months ago

eltoder commented 8 months ago

Most commonly used with Kerberos.

Closes: #769

eltoder commented 8 months ago

@elprans appreciate if you could take a look!

eltoder commented 8 months ago

@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 commented 8 months ago

@elprans I fixed the test.

eltoder commented 8 months ago

@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.

awakeinagi commented 8 months ago

@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?

elprans commented 8 months ago

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

awakeinagi commented 8 months ago

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