-
Notifications
You must be signed in to change notification settings - Fork 46
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
Initial NTLM Implementation #177
base: v4
Are you sure you want to change the base?
Conversation
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.
Looking good, mostly style comments and naming conventions that I think we can improve on
recheck |
# Conflicts: # src/CommonLib/LdapConnectionPool.cs
throw new ArgumentException("Url property is null"); | ||
|
||
if (useBadChannelBindings == null && url.Scheme == "https") | ||
throw new ArgumentException("When using HTTPS, useBadChannelBindings must be set"); |
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.
Nitpicking, but trinary args like this tend to create some funky logic flows that can be hard to follow if you're smooth-brained like I am.
Here I think we're taking on some complexity by managing arg validations that the callers could be doing instead.
I might split this into two functions for clarity: the public function that does everything up to this point, then a private EnsureRequiresAuth(Uri url, bool useBadChannelBindings)
that this one calls, feeding the appropriate coerced useBadChannelBindings
:
EnsureRequiresAuth(url, useBadChannelBindings ?? true);
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.
Description
This is the initial implementation of the new NTLM modelling, courtesy of @leechristensen .
Motivation and Context
https://specterops.atlassian.net/browse/BED-5113
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: