Skip to content
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

Support scram-sha-256 out of the box #1481

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

Conversation

julianladisch
Copy link
Contributor

Remove <optional>true</optional> from com.ongres.scram:scram-client dependency in pom.xml.

Since PostgreSQL 14 the default value for password_encryption is scram-sha-256.

Explain the migration from Vert.x 4 to Vert.x 5 in index.adoc - the client has been changed from client to scram-client:
https://github.com/eclipse-vertx/vertx-sql-client/pull/1431/files

Fixes #944, #1059, #1189, #1249, #1266, #1398, #1466

Motivation:

The client fails with all default installations of PostgreSQL versions >= 14.

Conformance:

@vietj vietj added this to the 5.0.0 milestone Feb 28, 2025
@vietj
Copy link
Member

vietj commented Feb 28, 2025

I think we need to remove the associated unit test for this MissingScramTest as well.

@vietj
Copy link
Member

vietj commented Feb 28, 2025

and check if other things need to be cleaned up

@julianladisch
Copy link
Contributor Author

PostgreSQL has many client authentication methods: https://www.postgresql.org/docs/current/client-authentication.html
Scram authentication is one of them and is optional.
There can be valid uses cases where the client uses other auth methods only and the scram-client dependency is removed from the client to make the client as small as possible.
Therefore the code that handles a missing scram-client library in ScramAuthentication, InitCommandCodec and MissingScramTest should be kept.

@vietj
Copy link
Member

vietj commented Feb 28, 2025

good point, therefore I think we need to document this and say that the dependency can be excluded if that is needed in the documentation.

Remove `<optional>true</optional>` from com.ongres.scram:scram-client dependency.

Since PostgreSQL 14+ the default value for password_encryption is scram-sha-256.

Explain the migration from Vert.x 4 to Vert.x 5 in index.adoc - the client has been
changed from `client` to `scram-client`:
https://github.com/eclipse-vertx/vertx-sql-client/pull/1431/files

Explain that scram authentication is optional and the scram client can be excluded.

Fixes eclipse-vertx#944, eclipse-vertx#1059, eclipse-vertx#1189, eclipse-vertx#1249, eclipse-vertx#1266, eclipse-vertx#1398, eclipse-vertx#1466
@julianladisch julianladisch force-pushed the ship-with-scram-client branch from 35ed617 to 28cc2a4 Compare March 12, 2025 12:21
@julianladisch
Copy link
Contributor Author

Aggreed, added that to the documentation.

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

Successfully merging this pull request may close these issues.

Should add SCRAM client to vertx-sql-client dependency list
2 participants