Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to connect to postgres using GSSAPI encrypted connection #1220

Closed
Sireax opened this issue Jun 9, 2022 · 2 comments
Closed

Unable to connect to postgres using GSSAPI encrypted connection #1220

Sireax opened this issue Jun 9, 2022 · 2 comments
Labels
needs response Needs a response from the issue/PR author

Comments

@Sireax
Copy link
Contributor

Sireax commented Jun 9, 2022

I am using kerberos authentication to connect to postgres. In pg_hba.conf there is a separate host type hostgssenc, which enables secure data transport between client and server. If I use this line:

host all all 0.0.0.0/0 gss include_realm=1 krb_realm=DOMAIN1.LOCAL

everything works fine. However, the connection is not secure.
If I change host to hostgssenc, I get this error:

failed to connect to host=postgres user=testuser@DOMAIN1.LOCAL database=vault: server error (FATAL: no pg_hba.conf entry for host "172.18.0.2", user "testuser@DOMAIN1.LOCAL", database "vault", no encryption (SQLSTATE 28000))

If I connect to postgres via psql, the connection becomes secure along with authentication.

I suppose this error may be related to gokrb5 library, but I'm not sure

@bfontaine
Copy link
Contributor

I don’t understand how this issue has anything to do with pgx(?)

@bfontaine bfontaine added the needs response Needs a response from the issue/PR author label Nov 4, 2022
@bfontaine
Copy link
Contributor

I’m closing this since it does not appear to be related to pgx. Please reopen if you think it is.

@bfontaine bfontaine closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
needs response Needs a response from the issue/PR author
Projects
None yet
Development

No branches or pull requests

2 participants