Postgre SCRAM Authentication not possible because .jre driver
See original GitHub issueWhich version and edition of Flyway are you using?
6.0.8 Community
If this is not the latest version, can you reproduce the issue with the latest one as well?
(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Yes, with the latest as well
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line (via the docker image, but that is not relevant)
Which database are you using (type & version)?
Postgresql 12.0
Which operating system are you using?
Ubuntu 18.04
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Cofigured postgres server with
postgresql.conf:
password_encryption = 'scram-sha-256'
What did you expect to see?
A normal execution of migrations like
Database: jdbc:postgresql://host/db (PostgreSQL 12.0)
Successfully validated 11 migrations (execution time 00:00.022s)
What did you see instead?
Flyway Community Edition 6.0.8 by Redgate
ERROR:
Unable to obtain connection from database (jdbc:postgresql://host/db) for user 'my-user': SCRAM authentication is not supported by this driver. You need JDK >= 8 and pgjdbc >= 42.2.0 (not ".jre" versions)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL State : 08004
Error Code : 0
Message : SCRAM authentication is not supported by this driver. You need JDK >= 8 and pgjdbc >= 42.2.0 (not ".jre" versions)
The reason for the bug is because the postgres driver in the flyway package is the “jre6” (postgresql-42.2.8.jre6.jar
) version of the driver which does not support SCRAM authentication.
It works when I change the postgresql-42.2.8.jre6.jar
to the “normal” version of the driver: postgresql-42.2.8.jar
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
SCRAM authentication is not supported by this driver
Go to Database Driver Manager; Select PostgreSQL (either double click or single select and then "Edit ...") Click on "Download/Update"; Choose ...
Read more >BUG #16736: SCRAM authentication is not supported by this ...
I use the official PostgreSQL image of DockerHub (docker pull postgres:13.1) Is it possible that in 13.1 the default password encryption has ...
Read more >0044832: Support SCRAM authentication with PostgreSQL ...
org.postgresql.util.PSQLException: SCRAM authentication is not supported by this driver. You need JDK >= 8 and pgjdbc >= 42.2.0 (not ".jre" vesions).
Read more >BUG #16736: SCRAM authentication is not supported by this ...
org.postgresql.util.PSQLException: SCRAM authentication is not supported by this driver. You need JDK >= 8 and pgjdbc >= 42.2.0 (not ".jre" ...
Read more >PostgreSQL 14 and Recent SCRAM Authentication Changes
SCRAM authentication is not something new in PostgreSQL. It was there from PostgreSQL 10 onwards but never affected DBA life in general ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This feature is now available in the V7 beta which you can read more about here.
You should be able to drop the newer Postgres driver in manually (into the
drivers
folder in Flyway) and it will just work; alternatively Flyway 7 will ship with the latest driver this week.