Skip to content

fix: use acceptor subkey for initiator signing when present. Fixes bodgit/tsig#178#50

Merged
bodgit merged 1 commit into
bodgit:mainfrom
onno204:fix/krb5-mic-token-peer-sub-key
May 19, 2026
Merged

fix: use acceptor subkey for initiator signing when present. Fixes bodgit/tsig#178#50
bodgit merged 1 commit into
bodgit:mainfrom
onno204:fix/krb5-mic-token-peer-sub-key

Conversation

@onno204
Copy link
Copy Markdown
Contributor

@onno204 onno204 commented May 18, 2026

Previously, MakeSignature only checked for the initiator's own subkey
(ctx.subkey) but never used the peer's subkey (ctx.peerSubkey) for
signing.
This caused Windows AD DNS servers to reject GSS-TSIG signed
DNS updates because the signature was computed with the session key
instead of the acceptor's subkey.

Fixes bodgit/tsig#178

I tested this fix by creating a small wrapper using github.com/bodgit/tsig.
Confirmed without the fix, I got the error unexpected acceptor flag is not set: expecting a token from the acceptor, not in the initiator
And confirmed with the fix implemented, the DNS record got updated on our Windows DNS server and now error was thrown.

CloudbrokerAz added a commit to tfo-apj-demos/terraform-dns-records that referenced this pull request May 19, 2026
3.6.0 bumped bodgit/tsig 1.2.2 -> 1.3.0, which broke GSS-TSIG against
Windows AD DNS. Confirmed identical to:
  hashicorp/terraform-provider-dns#642
  bodgit/tsig#178

The acceptor-subkey flag handling in the new GSSAPI wrapper rejects the
DC's normally-formed MIC tokens. Fix upstream is bodgit/gssapi#50 (not yet
merged/released).

Pin constraint:  >= 3.4.3, < 3.6.0
- 3.4.3 / 3.5.0 both use tsig v1.2.2 (working)
- bumps from 3.5.x will resume automatically once a fixed dns provider
  release is published above 3.6.0.

For investigation context see docs/DNS-GSS-TSIG-INVESTIGATION.md in
better-together-vm-lifecycle.
@bodgit bodgit force-pushed the fix/krb5-mic-token-peer-sub-key branch from 484ca18 to 97e7350 Compare May 19, 2026 23:53
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 72.87% (-0.3%) from 73.205% — onno204:fix/krb5-mic-token-peer-sub-key into bodgit:main

@bodgit bodgit merged commit 72218f2 into bodgit:main May 19, 2026
2 of 3 checks passed
@bodgit bodgit mentioned this pull request May 19, 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.

v1.3.0: GSS-TSIG broken with Windows AD DNS servers

3 participants