PostgreSQL authentication type 10 is not supported
SpraxDev opened this issue · 3 comments
Description
I'm using PostgreSQL as my database and would love to use scram-sha-256
instead of md5
as my authentication type. It looks like this could be fixed by using a newer version of one of the dependencies.
I've provided two websites further below.
EDIT: I've tried changing my user to md5
but that does not seem to help? I'm using a newer PostgreSQL driver in my plugin and do not have a problem connecting.
Reproduction steps
- Configure PostgreSQL to use
scram-sha-256
(password_encryption = scram-sha-256
) - Configure pg_hba.conf to use
scram-sha-256
instead ofmd5
- restart the PostgreSQL server
- Create a new user with a new password (or change the password of an existing user)
- Open the
config.yml
file and configure LuckPerms to use PostgreSQL (+ credentials) - Restart the server
- See error
Expected behaviour
LuckPerms to be able to normally connect to the database server.
Environment details
- Server type/version:
Waterfall
running versiongit:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:1d2221d:384
- LuckPerms version:
v5.2.44
- Java version:
openjdk 11.0.9 2020-10-20
- PostgreSQL version:
13.1
Any other relevant details
[13:00:12] [main/ERROR] [LuckPerms]: Failed to init storage implementation
java.sql.SQLTransientConnectionException: luckperms-hikari - Connection is not available, request timed out after 5001ms.
at me.lucko.luckperms.lib.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:695) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:197) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariPool.getConnection(HikariPool.java:162) ~[?:?]
at me.lucko.luckperms.lib.hikari.HikariDataSource.getConnection(HikariDataSource.java:100) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.connection.hikari.HikariConnectionFactory.getConnection(HikariConnectionFactory.java:171) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.init(SqlStorage.java:158) ~[?:?]
at me.lucko.luckperms.common.storage.Storage.init(Storage.java:116) ~[?:?]
at me.lucko.luckperms.common.storage.StorageFactory.getInstance(StorageFactory.java:88) ~[?:?]
at me.lucko.luckperms.common.plugin.AbstractLuckPermsPlugin.enable(AbstractLuckPermsPlugin.java:156) ~[?:?]
at me.lucko.luckperms.bungee.LPBungeeBootstrap.onEnable(LPBungeeBootstrap.java:154) ~[?:?]
at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:300) ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:1d2221d:384]
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:289) ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:1d2221d:384]
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62) ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:1d2221d:384]
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[Waterfall.jar:git:Waterfall-Bootstrap:1.16-R0.4-SNAPSHOT:1d2221d:384]
Caused by: me.lucko.luckperms.lib.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
at me.lucko.luckperms.lib.postgresql.Driver$ConnectThread.getResult(Driver.java:355) ~[?:?]
at me.lucko.luckperms.lib.postgresql.Driver.connect(Driver.java:279) ~[?:?]
at java.sql.DriverManager.getConnection(DriverManager.java:677) ~[java.sql:?]
at java.sql.DriverManager.getConnection(DriverManager.java:228) ~[java.sql:?]
at me.lucko.luckperms.lib.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:86) ~[?:?]
at me.lucko.luckperms.lib.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:71) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.PoolBase.newConnection(PoolBase.java:358) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariPool.access$100(HikariPool.java:71) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:725) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:711) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:836) [?:?]
Thanks for the report.
This might be fixed by #2602 - but I haven't got time to test/implement it myself at the moment (I'm not really a postgres user)
Should be fixed in 435e039