-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/crypto/ssh: add BannerError #64962
Comments
Hello, I like this idea, thank you for the proposal! What's wrong with something like this?
I see that you initially implemented the feature in this way in your branch. If we want to extend
|
We could even combine it with https://go-review.googlesource.com/c/crypto/+/516355 by adding a You can see https://github.com/tailscale/tailscale/pull/5883/files for why the initial And good point about backwards-compatibility of |
Here is the proposed implementation, just to facilitate discussion: https://go-review.googlesource.com/c/crypto/+/554775 |
as a comment to the original proposal: note that ConnMetadata only has functions that have no side effects. It's also shared between client and server, so server-only functionality should not be added there. |
I agree with @hanwen I think the use cases are:
We already have We may add something like this
This way it is also clearer when the banner is sent (the server calls tha callback) and we don't have to check that we are still in the authentication phase. |
Sorry for the delay. I can send a new CL tomorrow 👍 |
@awly thank you. Your patch looks good to me but we need this proposal approved first.
cc @golang/proposal-review |
CC @golang/security |
This proposal has been added to the active column of the proposals project |
What is the specific, complete proposal? Is it only the things listed in #64962 (comment)? |
I believe it's just
from #64962 (comment) and https://golang.org/cl/558695 (although I made the Unwrap and Error receivers pointers. |
Based on the discussion above, this proposal seems like a likely accept. The proposal is in #64962 (comment). |
No change in consensus, so accepted. 🎉 The proposal is in #64962 (comment). |
Change https://go.dev/cl/558695 mentions this issue: |
Add a new BannerError error type that auth callbacks can return to send banner to the client. While the BannerCallback can send the initial banner message, auth callbacks might want to communicate more information to the client to help them diagnose failures. Updates golang/go#64962 Change-Id: I97a26480ff4064b95a0a26042b0a5e19737cfb62 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/558695 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Nicola Murino <nicola.murino@gmail.com> Auto-Submit: Nicola Murino <nicola.murino@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Note: update proposal is #64962 (comment)
Proposal Details
According to https://datatracker.ietf.org/doc/html/rfc4252#section-5.4:
Currently,
x/crypto/ssh
allows servers to send a banner before authentication begins. I propose to add:This is useful for sending dynamic banner messages to clients from auth callbacks.
For example, a server can send a link to perform out-of-band authentication of the user if e.g. public key authentication fails. See for example the Check mode in Tailscale SSH: https://tailscale.com/kb/1193/tailscale-ssh#configure-tailscale-ssh-with-check-mode
cc @bradfitz @maisem
The text was updated successfully, but these errors were encountered: