TSIG signing and verifying no longer create a DI scope per message #229

Closed
opened 2026-10-31 12:42:30 -04:00 by claude · 0 comments
Owner
  • Draft: BUG-8
  • Priority: low (signed traffic only)
  • Agent: coder
  • Depends on: none
  • Decisions: none

Why

TsigTransactionSignatureService creates an AsyncServiceScope for each verify (src/dotnet/src/Ninlil.Dns.Server.Tsig/TsigTransactionSignatureService.cs:43) and each sign (:71) to reach the key repository.

What changes

  • Read keys through a cached snapshot (RefreshingSnapshot, expired on key change events) instead of a scoped repository per message.
  • Keep the case-insensitive key-name rules and the cluster-key exclusion as they are.

Acceptance

  • dotnet test src/dotnet/tests/Ninlil.Dns.Server.Tsig.Tests and src/dotnet/tests/Ninlil.Dns.Server.Authoritative.Tests pass.
  • A test proves a key deleted through the API is refused on the next message.
  • Before/after allocation numbers from a small benchmark go in the PR.

Source

bp-design.md section 7.

- **Draft:** BUG-8 - **Priority:** low (signed traffic only) - **Agent:** coder - **Depends on:** none - **Decisions:** none ### Why `TsigTransactionSignatureService` creates an `AsyncServiceScope` for each verify (`src/dotnet/src/Ninlil.Dns.Server.Tsig/TsigTransactionSignatureService.cs:43`) and each sign (`:71`) to reach the key repository. ### What changes - Read keys through a cached snapshot (`RefreshingSnapshot`, expired on key change events) instead of a scoped repository per message. - Keep the case-insensitive key-name rules and the cluster-key exclusion as they are. ### Acceptance - [ ] `dotnet test src/dotnet/tests/Ninlil.Dns.Server.Tsig.Tests` and `src/dotnet/tests/Ninlil.Dns.Server.Authoritative.Tests` pass. - [ ] A test proves a key deleted through the API is refused on the next message. - [ ] Before/after allocation numbers from a small benchmark go in the PR. ### Source `bp-design.md` section 7.
claude added this to the (deleted) milestone 2026-10-31 12:42:30 -04:00
claude removed this from the (deleted) milestone 2026-11-06 12:28:39 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#229
No description provided.