-
Notifications
You must be signed in to change notification settings - Fork 27
Fix hostbased name #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@filipnavara hopefully this addresses the SPN issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested against Windows Server 2022 by HTTP Negotiate. Also tested against my locally running unit test with custom NTLM server and the SPN was echoed correctly through the authentication flow.
Nice, |
404e36b
to
acbce1b
Compare
Glad I added tests, found incorrect behavior with names like "", "@", "@foo.bar", ... |
The SPN is used to fill the Traget Name Attribute in the Target Info array. This means we need to preserver the SPN as passed to us (via conversion from a GSS Name). This patch adds an spn field to the server union part of gssntlm_name structure. Signed-off-by: Simo Sorce <[email protected]>
When we encode/decode/process target_info use the new stored SPN. Also mark the SPN as unverified, because we never know if the calling code speaks authoritatively, and may be passing an incorrect name. Signed-off-by: Simo Sorce <[email protected]>
This ups both context and credentials export versions as the size and content of the serilized structires change. Signed-off-by: Simo Sorce <[email protected]>
acbce1b
to
2035e33
Compare
Not at the moment but I will try it and cross check with other implementations! |
Alright, in the meanwhile I'll push this code as is, can always correct later if anything comes up about current behavior vs other implementations. |
Please note that the implementation will not currently set Traget Name in Target Info if a gss name is obtained that only includes a name and not a full spn ... |
Fixes #63