You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wire native Kerberos GSSAPI into the LDAP SASL bind and remove gokrb5
Phase 7 (part 3) of the native Kerberos v5 work: replace the gokrb5-backed LDAP
GSSAPI bind with the native, standard-library-only stack, and drop the external
dependency entirely.
- network/ldap/kerberos_gssapi.go: a native implementation of go-ldap's
ldap.GSSAPIClient interface. It acquires a TGT (password or NT hash), gets an
ldap/<host> service ticket, and drives the RFC 4752 SASL GSSAPI handshake via
the gssapi package: KRB_AP_REQ (mutual), KRB_AP_REP verification, and the
security-layer negotiation (GSS Unwrap of the server offer, GSS Wrap of the
"no security layer" response). Server KRB-ERRORs are surfaced.
- network/ldap/session.go: use the native client; drop the gokrb5 and
go-ldap/gssapi imports.
- Remove KerberosInit (the last gokrb5 user) and delete kerberos.go; run
go mod tidy to drop github.com/jcmturner/gokrb5 from go.mod/go.sum.
- Fix a real RFC 4121 §4.2.3 bug in gssapi Wrap, found via live testing against
a Windows Server 2016 DC: for a non-confidential Wrap token the EC field must
encode the checksum length (not 0), and the {data|checksum} body is
right-rotated by RRC. AD rejected the previous EC=0 tokens with
SEC_E_INVALID_TOKEN. Unwrap now uses EC to locate the checksum. Added
rotateRight; updated tests with initiator<->acceptor integrity round-trips.
- Vendor RFC 4121 and RFC 4752 under network/ldap/docs.
Live-validated end-to-end against the 2016 DC: native GSSAPI LDAP bind succeeds
(no gokrb5) and authenticated LDAP queries return the domain naming contexts and
user accounts. go build ./..., go vet, and all kerberos/ldap tests pass.
0 commit comments