-
Notifications
You must be signed in to change notification settings - Fork 3
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
support anonymous auth #13
Conversation
Fixes #10 |
FYI, I tested it manually against a samba instance |
Anything else needed for this, beyond fixing those tests? And any good suggestions how? |
Hey @deitch. It's just been a very busy time at work. I'll be sure to review the PR this week. |
844b804
to
8e8d28c
Compare
OK, I restructured the server Ready for your review. |
8e8d28c
to
a7eecb4
Compare
This looks good @deitch. Just one minor nitpick to address, and then I'll bring it in. I tested the anonymous authentication against a local Samba server and it worked perfectly. After we merge this in, I'd like to add a test for it to the GitHub workflow. |
What nitpick is that? I didn't see any other comment 🤷♂️ |
Oops. I forgot to submit the review. |
Signed-off-by: Avi Deitcher <avi@deitcher.net>
a7eecb4
to
73a9e81
Compare
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.
This PR adds support for anonymous auth, i.e. no provision of username and password. Of course, if the requested share does not allow it, it will return an auth error, which it should. If connecting to a share that allows anonymous access, it will work.
While doing so, I moved the Unmarshaling of the challenge message into its own function and struct. I needed it to make the
Authenticate()
function clearer to read, to figure out why something wasn't working. Once I figured it out, I left it there. If it bothers you, I can put it back to how it was before.I extended the test
TestClientServer()
inntlm_test.go
. However, it appears thats.Authenticate()
calls the server authentication directly, and our server does not know how to handle anonymous clients. So that is not a great test. I also am not sure how to update the server correctly to do this. Help would be appreciated.