Skip to content

Commit 6923700

Browse files
authored
Add info on GSSAPI-related error when Kerberos is not installed (#437)
See npgsql/npgsql#6360
1 parent a82b78b commit 6923700

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

conceptual/Npgsql/release-notes/10.0.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ With .NET 6 no longer supported by Npgsql, the PostgreSQL `cidr` type is now map
8080

8181
Npgsql emits metrics and tracing data that provide various information about commands and connections. Since these were designed when the OpenTelemetry specifications were in an earlier stage, they did not align with current standard naming. Npgsql 10 changes metrics names and tracing span tags to better align with the standard, allowing Npgsql observability data to be tracked in dashboards just like other standards-conforming database drivers. If you already have a dashboard set up to consume Npgsql observability data, its configuration will need to change to accomodate the new naming.
8282

83+
### Cannot load library libgssapi_krb5.so.2 when Kerberos is not installed
84+
85+
Since Npgsql 10.0 defaults to trying GSSAPI session encryption, it may generate the following error on some Linux environments:
86+
87+
```error
88+
Cannot load library libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
89+
```
90+
91+
Npgsql internally handles this and falls back to connecting without GSSAPI, so the error is harmless. You can specify `GSS Encryption Mode=Disable` to stop Npgsql from trying to use GSSAPI and remove the error.
92+
8393
### Only root CA certificate is used to validate TLS chain
8494

8595
While establishing TLS connection with PostgreSQL, Npgsql will now only use the provided root CA certificate to validate TLS chain instead of using it in addition to the system CA store. This behaviour aligns with libpq and prevents establishing unintended connections.

conceptual/Npgsql/security.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ Require | Only try a GSSAPI-encrypted connection.
5151

5252
The default mode is `Prefer`, which allows GSS-API session encryption but does not require it.
5353

54+
> [!NOTE]
55+
> Some Linux environments do not have Kerberos installed; since Npgsql 10.0 defaults to `Prefer`, it will attempt to get GSSAPI credentials, and may generate an error such as the following:
56+
> Cannot load library libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
57+
> Npgsql internally handles this and falls back to connecting without GSSAPI, so the error is harmless. You can specify `GSS Encryption Mode=Disable` to stop Npgsql from trying to use GSSAPI and remove the error.
58+
5459
## Encryption (SSL/TLS)
5560

5661
As an alternative to GSS-API, you can use SSL/TLS. First, you have to set up your PostgreSQL to receive SSL/TLS connections [as described here](http://www.postgresql.org/docs/current/static/ssl-tcp.html). Once that's done, specify `SSL Mode` in your connection string as detailed below.

0 commit comments

Comments
 (0)