fix(questdb): disable Npgsql GSS encryption probe unless the connection string sets it (lmxopcua#758)
v2-ci / unit-tests (push) Has been cancelled
v2-ci / unit-tests (push) Has been cancelled
QuestDB speaks plain PG-wire; Npgsql's default GSS Encryption Mode=Prefer made Linux central boots log 'Cannot load library libgssapi_krb5.so.2'. An explicit 'GSS Encryption Mode' in the connection string is kept. Not re-verified on a Linux host here; the Postgres Sql driver is left alone (Kerberos may be wanted). Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
+18
@@ -146,6 +146,24 @@ public sealed class QuestDbConnectionTests
|
||||
return c.EffectiveMaxPoolSize;
|
||||
}
|
||||
|
||||
// ---- GSS probe (#758) -------------------------------------------------------------------------------------------
|
||||
|
||||
private static Npgsql.GssEncryptionMode GssOf(string cs)
|
||||
{
|
||||
using var c = new QuestDbConnection(new QuestDbHistorianOptions { ConnectionString = cs });
|
||||
return c.EffectiveGssEncryptionMode;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void An_unset_GSS_Encryption_Mode_is_disabled() =>
|
||||
GssOf("Host=127.0.0.1;Port=1").ShouldBe(Npgsql.GssEncryptionMode.Disable);
|
||||
|
||||
[Theory]
|
||||
[InlineData("Host=127.0.0.1;Port=1;GSS Encryption Mode=Prefer", Npgsql.GssEncryptionMode.Prefer)]
|
||||
[InlineData("Host=127.0.0.1;Port=1;GssEncryptionMode=Require", Npgsql.GssEncryptionMode.Require)]
|
||||
public void An_explicit_GSS_Encryption_Mode_is_kept(string cs, Npgsql.GssEncryptionMode expected) =>
|
||||
GssOf(cs).ShouldBe(expected);
|
||||
|
||||
[Fact]
|
||||
public void An_unset_Maximum_Pool_Size_is_capped_at_24() =>
|
||||
PoolOf("Host=127.0.0.1;Port=1").ShouldBe(24);
|
||||
|
||||
Reference in New Issue
Block a user