Re: SCRAM Error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Logan Greenlee <logan(at)thegreenlees(dot)us>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: SCRAM Error
Date: 2020-10-10 16:01:49
Message-ID: 2887053.1602345709@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Logan Greenlee <logan(at)thegreenlees(dot)us> writes:
> I am receiving an error "SCRAM Authentication requires libpq version 10 or
> above".
> ...
> [33236-0.005]connection[CC_initial_log]982: Driver Version='09.06.0500,Jan
> 25 2019' linking 1800 dynamic Multithread library

Since the ODBC driver seems to be 9.6, it's not surprising that it's
linked to a 9.6 libpq. Can't you update that?

> Is this due to the libpq version being insufficient in the driver? I am
> connecting to a 13 instance. I tried to go to md5 but it seemed to have no
> effect.

It seems like your server may be set to hash passwords via SCRAM. If you
need compatibility with ancient client versions, you need to make sure
your password is hashed the old way with md5. Observe:

regression=# create user joe;
CREATE ROLE
regression=# set password_encryption to "scram-sha-256";
SET
regression=# alter user joe password 'foo';
ALTER ROLE
regression=# select rolpassword from pg_authid where rolname = 'joe';
rolpassword

--------------------------------------------------------------------------------
-------------------------------------------------------
SCRAM-SHA-256$4096:LSVE1BFWcxrIJSTEeZF/8g==$ceM/afcYjb8zwIjD3MIXmubeu/F2ZieAzYL
LeAzck6k=:ge1TjRpYn7kNf0pAJoohYRURT9LGLFIEPK48M1pJZ8c=
(1 row)
regression=# set password_encryption = md5;
SET
regression=# alter user joe password 'foo';
ALTER ROLE
regression=# select rolpassword from pg_authid where rolname = 'joe';
rolpassword
-------------------------------------
md516fa7b3dfbb8654ea1e0a864754ee209
(1 row)

regards, tom lane

In response to

  • SCRAM Error at 2020-10-10 03:24:03 from Logan Greenlee

Browse pgsql-odbc by date

  From Date Subject
Next Message Mohammed, Iqbaluddin 2020-10-13 16:35:44 POSTGRES ODBC Drivers
Previous Message Logan Greenlee 2020-10-10 03:24:03 SCRAM Error