Skip to content

Support 'trust' authentication method #11

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexdowad
Copy link

In the PostgreSQL server's response to the initial login packet, it includes a field indicating what kind of authentication the server would like the client to use. We were not checking that field. If it is 0, that means no authentication is needed and the client can just go ahead.

As a bonus, since we are now checking the value of that field, we can provide a more specific error message if the server wants to use an authentication type which this library does not currently support.

This code is working on my own installation of Nginx + Postgres 14.

In the PostgreSQL server's response to the initial login packet, it
includes a field indicating what kind of authentication the server
would like the client to use. We were not checking that field. If it
is 0, that means no authentication is needed and the client can just
go ahead.

As a bonus, since we are now checking the value of that field, we can
provide a more specific error message if the server wants to use an
authentication type which this library does not currently support.
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.

1 participant