leafo / pgmoon

A pure Lua Postgres driver for use in OpenResty & more
MIT License
390 stars 93 forks source link

Can't auth postgresql 14 : don't know how to auth: 10 #108

Closed xiangnanscu closed 2 years ago

xiangnanscu commented 2 years ago

I upgrade postgresql to 14 and when try to connect encounter:

don't know how to auth: 10

When I change pg version to 10, it disappears.

xiangnanscu commented 2 years ago

I believe the auth method needs some upgrade

leafo commented 2 years ago

Authentication method 10 is AuthenticationSASL

Reference: https://www.postgresql.org/docs/14/protocol-message-formats.html

This was available in earlier versions of postgres (although still unsupoorted by pgmoon), but perhaps the default has changed? I didn't see anything in the changelog about it.

If you update your configuration to use one of the supported auth methods you should be able to connect until support for this auth mode is added. (Currently that includes md5, cleartext, or trust)

leafo commented 2 years ago

101

leafo commented 2 years ago

Thanks for the report, this is now fixed in the latest version, 1.13.0