Skip to content

Disable GSS encryption on the database connection - #687

Merged
vdolek merged 2 commits into
masterfrom
claude/project-thread-7j4ik9
Oct 30, 2026
Merged

vdolek merged 2 commits into
masterfrom
claude/project-thread-7j4ik9

Conversation

@EvilBrainsBot

@EvilBrainsBot EvilBrainsBot commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Requested by Martin · project thread

Summary

The Docker image printed Error loading shared library libgssapi_krb5.so.2 at startup, because Npgsql probes GSS encryption by default and the Alpine image has no krb5-libs. The connection string now disables GSS encryption; the app never uses Kerberos or GSS.

Changes

  • AddEvilCaseData sets GssEncryptionMode = Disable on the configured connection string.
  • A test resolves ApplicationDbContext from AddEvilCaseData and asserts the mode.

Code Review

  • Removed a rationale code comment; the test substitutes IHostEnvironment instead of using an internal hosting type.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uovdgb1RrvqLz2omxdk9ah

Npgsql defaults GssEncryptionMode to Prefer, so opening a physical
connection loads libgssapi_krb5.so.2 for a GSS encryption probe. The
Alpine runtime image has no krb5-libs, and the container printed
"Error loading shared library libgssapi_krb5.so.2" at startup. The app
never uses Kerberos or GSS, so the connection string now disables the
probe instead of the image shipping a library nothing needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uovdgb1RrvqLz2omxdk9ah
@EvilBrainsBot
EvilBrainsBot requested a review from vdolek as a code owner October 30, 2026 20:42
@EvilBrainsBot EvilBrainsBot added the agent-in-progress An agent is working on this pull request label Oct 30, 2026 — with Claude
@EvilBrainsBot EvilBrainsBot self-assigned this Oct 30, 2026
The test substitutes IHostEnvironment instead of constructing
Microsoft.Extensions.Hosting.Internal.HostingEnvironment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uovdgb1RrvqLz2omxdk9ah

Copy link
Copy Markdown
Member Author

Code Review

  • /code-review high: the code comment stated rationale against writing.md; removed, the commit message carries it.
  • The test constructed Microsoft.Extensions.Hosting.Internal.HostingEnvironment; it substitutes IHostEnvironment now.
  • Not changed: overriding a configured GSS mode is intended, as the Alpine image cannot negotiate GSS at all. Parsing per scope costs nothing measurable. No other code opens an Npgsql connection.

Generated by Claude Code

@github-actions github-actions Bot removed the agent-in-progress An agent is working on this pull request label Oct 30, 2026
@EvilBrainsBot EvilBrainsBot added the agent-done Waiting for the owner's review and merge label Oct 30, 2026 — with Claude
@vdolek
vdolek merged commit 466df3d into master Oct 30, 2026
3 checks passed
@vdolek
vdolek deleted the claude/project-thread-7j4ik9 branch October 30, 2026 21:52
@github-actions github-actions Bot removed the agent-done Waiting for the owner's review and merge label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants