-
Notifications
You must be signed in to change notification settings - Fork 2k
ssh: add support for server side multi-step authentication #130
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
- add ErrPartialSuccess. Authentication callbacks must return this error for multi-step authentication when a specific authentication step succeed - add PartialSuccessMethods to ConnMetadata interface, it returns the ordered list of authentication methods that returned ErrPartialSuccess. It can be used inside callbacks to find if a multi-step authentication is done using the correct sequence and to return the authentication methods that can continue - add NextAuthMethodsCallback, this callback is called when an authentication callback returns ErrPartialSuccess or if, after an initial partial success, an authentication step fails. It must return the list of authentications methods that can continue. This way an application can define per-user multi-step authentication. Fixes #17889
This PR (HEAD: 2aafde1) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/crypto/+/227781 to see it. Tip: You can toggle comments from me using the |
If PublicKeyCallback returns ErrPartialSuccess we need to check source address and update the returned error if this check fails
This PR (HEAD: aed7e17) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/crypto/+/227781 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: 83446a0) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/crypto/+/227781 to see it. Tip: You can toggle comments from me using the |
There's a pretty significant security issue in the current implementation. If This is because the client can first query if a key is acceptable before it signs anything. Lines 577 to 586 in 2aafde1
|
This PR (HEAD: 6d02a9b) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/crypto/+/227781 to see it. Tip: You can toggle comments from me using the |
this should be fixed now, thanks for reporting |
more details here: golang/crypto#130 (comment)
Message from Dan Peterson: Patch Set 4: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/227781. |
Message from Gobot Gobot: Patch Set 4: TryBots beginning. Status page: https://farmer.golang.org/try?commit=9080eac4 Please don’t reply on this GitHub thread. Visit golang.org/cl/227781. |
Message from Gobot Gobot: Patch Set 4: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/227781. |
Are there plans to accept this PR, or alternatively add server side multi auth via another PR? I am very eagerly waiting for this feature, and can offer my help in reviewing this PR, if that will speed up the acceptance process! |
Message from Sami Pönkänen: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/227781. |
Message from Go Bot: Patch Set 4: TryBots beginning. Status page: https://farmer.golang.org/try?commit=9080eac4 Please don’t reply on this GitHub thread. Visit golang.org/cl/227781. |
Message from Go Bot: Patch Set 4: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/227781. |
multi-step authentication when a specific authentication step succeed
list of authentication methods that returned ErrPartialSuccess. It can be used
inside callbacks to find if a multi-step authentication is done using the
correct sequence and to return the authentication methods that can continue
callback returns ErrPartialSuccess or if, after an initial partial success, an
authentication step fails. It must return the list of authentications methods
that can continue.
This way an application can define per-user multi-step authentication.
Fixes #17889