-
Notifications
You must be signed in to change notification settings - Fork 559
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
chore: Authentication negotiation for Kerberos #3430
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PeterSchafer
force-pushed
the
chore/cliv2_proxy_negotiate
branch
4 times, most recently
from
July 8, 2022 15:41
1f07579
to
6410599
Compare
PeterSchafer
force-pushed
the
chore/cliv2_proxy_negotiate
branch
from
July 20, 2022 17:02
0c9427e
to
f720f80
Compare
maxjeffos
approved these changes
Jul 21, 2022
PeterSchafer
force-pushed
the
chore/cliv2_proxy_negotiate
branch
from
July 22, 2022 13:59
d253641
to
afc828f
Compare
* not fully working yet!!! * missing: negotiation integration in httpauth.Authenticationhandler Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> wip: replace go-spnego lib chore: add missing “Negotiate” in authorization header Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: implement negotiation for windows * Changed SpnegoProvider interface and implemented updating security context * fixed issue when sending data Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: ensure to free up ressources in authhandler Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: remove comments after going trhough them Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: support -d Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: adapt debug logging Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: Reduce messages send during negotiation * removed initial state for negotiate since it is not necessary in the current implementation * made state private Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: fixed some typos and simplified naming Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: implemented spnego_nonwindows * including some minor additions and cleanup Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: add missing import Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: refactoring and handling edge cases * refactoring for better testability and readability * handling edge cases Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: add src file dependency to makefile to avoid cleaning Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: go mod tidy Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: moved proxy_authenticator to httpauth * improved error Handling during authentication Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: throwing error when cycle max reached Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: fix failing tests Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: remove outdated tests Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: added logging that indicates the token type Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: close connection only if not nil Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: improved error message Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com> chore: incorporate feedback from review Signed-off-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com>
PeterSchafer
force-pushed
the
chore/cliv2_proxy_negotiate
branch
from
July 22, 2022 13:59
afc828f
to
bdd0ffb
Compare
This was referenced Nov 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces improved SPNEGO/Negotiate support for Proxy Authentication. It enables NTLM authentication by enabling multiple CONNECT messages being exchanged between CLIv2 and an upstream Proxy Server.
To achieve this, it dynamically extends the Go http.Transport implementation by decorating the accessor for TCP connections.
Where should the reviewer start?
A good start is top down from proxy/proxy.go and then along the different levels of abstraction.
How should this be manually tested?
In the Windows test environment on AWS, run either
Kerberos Authentication:
snyk_windows_amd64.exe --proxy=http://EC2AMAZ-vuHlNQ.hammer2.snyk.io:3128 --proxy-negotiate woof -d
NTLM Authentication:
snyk_windows_amd64.exe --proxy=http://proxy.hammer2.snyk.io:3128 --proxy-negotiate woof -d
Any background context you want to provide?
https://www.ietf.org/rfc/rfc4559.txt