Skip to content

Postgresql Kerberos authentication#4025

Open
2ndDerivative wants to merge 18 commits intolaunchbadge:mainfrom
2ndDerivative:kerberos
Open

Postgresql Kerberos authentication#4025
2ndDerivative wants to merge 18 commits intolaunchbadge:mainfrom
2ndDerivative:kerberos

Conversation

@2ndDerivative
Copy link
Contributor

Initial implementation of working Kerberos authentication for PostgresQL using the GSSAPI authentication feature.

This is mostly so people can take a look at it, I know it's Kerberos only and not completely GSSAPI, but I haven't seen anyone making an effort to put this out here.

If you have feedback or anything hit me up.

Maybe a point worth looking at: default behaviour of postgres/. I mainly made that for convenience but might be too unreliable for some people.

Is this a breaking change?

It adds a dependency I guess

2ndDerivative and others added 16 commits August 14, 2025 10:47
…chbadge#4027)

* build TlsConnector in blocking threadpool

The openssl TlsConnector synchronously loads certificates from files.
Loading these files can block for tens of milliseconds.

* Update sqlx-core/src/net/tls/tls_native_tls.rs

---------

Co-authored-by: David Übler <[email protected]>
Co-authored-by: Austin Bonander <[email protected]>
…hbadge#4053)

* fix(macros): smarter `.env` loading, caching, and invalidation

* feat(mysql): test `.env` loading in CI

* feat(postgres): test `.env` loading in CI

* feat(macros): allow `DATABASE_URL` to be empty

* fix(examples/postgres): make `cargo-sqlx` executable

* fix(examples/postgres): `cargo sqlx` invocation

* feat(examples/postgres): check offline prepare on more examples

* fix(examples/postgres): the name of this step

* fix(cli): don't suppress error from `dotenv()`

* fix(ci/examples/postgres): don't use heredoc in this step

* fix(ci/examples/postgres): multi-tenant

* fix(ci/examples/sqlite): test `.env` loading

* chore: add CHANGELOG entry
…go_bin()` (launchbadge#4134)

* fix(ci): update macOS intel runner version

* fix(cli/tests): replace use of deprecated `Command::cargo_bin()`
* Bump whoami to v2

Signed-off-by: tison <[email protected]>

* Update sqlx-postgres/src/options/mod.rs

---------

Signed-off-by: tison <[email protected]>
@2ndDerivative
Copy link
Contributor Author

This does not fail on formality, but due to a CI/ C library compilation thing. Is there something I can change here, since Kerberos is the only GSSAPI system supported for that auth method anyway

@abonander
Copy link
Collaborator

@2ndDerivative can you rebase and/or push a new commit to trigger a CI run? The logs aren't available anymore.

@2ndDerivative
Copy link
Contributor Author

I hope I didn't do it wrong, I never use rebase.

Just popped it into the last main if that's somewhat correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants