jcmturner / gokrb5

Pure Go Kerberos library for clients and services
Apache License 2.0
725 stars 248 forks source link

No way to change context flags for SPNEGO's AP REQ #541

Open Macmod opened 6 months ago

Macmod commented 6 months ago

SPNEGO's InitSecContext in spnego.go references NewNegTokenInitKRB5 from negotiationToken.go, which always generates a NegTokenInit from NewKRB5TokenAPREQ with ContextFlags gssapi.ContextFlagInteg and gssapi.ContextFlagConf.

I have an issue in which Active Directory doesn't provide replies to LDAP searches (they just timeout) after a successful bind with GSS-SPNEGO whenever these flags are set, but it works fine when they are not set. I'd like to turn off these flags but haven't found a way to do so within the library. Unless these ContextFlags are mandatory by some RFC shouldn't it be up to the implementor to decide which flags to include in the request?