Revenj.DatabasePersistence.Postgres.Npgsql.NpgsqlException:
Only Scram SHA 256 is supported
at Revenj.DatabasePersistence.Postgres.Npgsql.NpgsqlState.ProcessBackendResponses_Ver_3(NpgsqlConnector context)+MoveNext()
in csharp\Core\Revenj.Core\DatabasePersistence\Postgres\Npgsql\State\NpgsqlState.cs:line 658
SCRAM-SHA-256-PLUS was implemented in Npgsql PR 3111 and I tried to back port but was blocked by Npgsql using System.Net.Security.SslStream and Revenj's using Revenj.DatabasePersistence.Postgres.Npgsql.NpgsqlBufferedStream
I've noticed that if the client does not support SCRAM-SHA-256-PLUS channel binding, the client can continue to use SCRAM-SHA-256: NpgsqlConnector.Auth.cs#L139
I found reading the next stream string after SCRAM-SHA-256-PLUS returns SCRAM-SHA-256 and setting then saslAuthMechanism works as usual. I've tested the change on SSL and non-SSL configurations.
SCRAM supported was added in https://github.com/ngs-doo/revenj/commit/31ace1d466722b246d6da890816fac8af9e94dd6 but it throws an exception when also using SSL:
SCRAM-SHA-256-PLUS was implemented in Npgsql PR 3111 and I tried to back port but was blocked by Npgsql using
System.Net.Security.SslStream
and Revenj's usingRevenj.DatabasePersistence.Postgres.Npgsql.NpgsqlBufferedStream
I've noticed that if the client does not support SCRAM-SHA-256-PLUS channel binding, the client can continue to use SCRAM-SHA-256: NpgsqlConnector.Auth.cs#L139
I found reading the next stream string after
SCRAM-SHA-256-PLUS
returnsSCRAM-SHA-256
and setting thensaslAuthMechanism
works as usual. I've tested the change on SSL and non-SSL configurations.