-
Notifications
You must be signed in to change notification settings - Fork 371
Adding NTLMSSP support #265
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
johnweldon
left a comment
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.
Looks good, thank you.
- Please duplicate the code changes into the
/bind.gofile. (v3/bind.goshould mirrorbind.gofor right now - I know it's a hassle - we need to figure out a long term strategy here) - I don't have any clear suggestions on tests, but if you can think of a way to add some testing around your code to validate that it's working as expected, that'd be helpful.
|
Thanks for the feedback! I added comments, moved the import and copied the changes to the base |
|
Looks good; when you're ready to merge you can rebase your branch on master |
|
Merged master back in if you’re ready to merge this PR. The only way I can think of when it comes to testing is either mocking out an NTLM LDAP server or spinning one up in a Docker container for integration testing. Is that something you think is worthwhile? |
|
No, I don't want to try mocking out a server or spinning one up for the tests. Thanks @ropnop |
|
Released in version 3.2.0 |
Hello! Wanted to open this to start a conversation around adding NTLMSSP bind support to go-ldap/v3
I got this working by leveraging github.com/Azure/go-ntlmssp, which can handle negotiate and response message generation
To get the messages encoded properly, I also had to make some changes to github.com/go-asn1-ber/asn1-ber, which I submitted a PR for as well (go-asn1-ber/asn1-ber#27). Without that patch,
ber.Encodewas skipping over the negotiate and challenge-response messages.In the end, this works on my AD domain with the following code:
We get a successful bind request and subsequent searches work.
Let me know what you think! I also have an idea to add support for authenticating with just an NT hash as well if you already have it, but that would require a change to the go-ntlmssp module as well.
Great library btw!