-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
credentials: deprecate ProtocolInfo.SecurityVersion #3372
credentials: deprecate ProtocolInfo.SecurityVersion #3372
Conversation
credentials/credentials.go
Outdated
@@ -101,6 +101,8 @@ type ProtocolInfo struct { | |||
// SecurityProtocol is the security protocol in use. | |||
SecurityProtocol string | |||
// SecurityVersion is the security protocol version. |
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.
Should we update this comment to explain that it's a static version string, not computed per-connection, and consequently has little value?
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.
Updated the comment.
credentials/alts/alts_test.go
Outdated
@@ -128,9 +128,6 @@ func (s) TestInfo(t *testing.T) { | |||
if got, want := info.SecurityProtocol, "alts"; got != want { | |||
t.Errorf("info.SecurityProtocol=%v, want %v", got, want) | |||
} | |||
if got, want := info.SecurityVersion, "1.0"; got != want { |
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.
Is there any harm in leaving this here? If it's because of vet.sh
, then:
- why isn't
vet.sh
failing because of the place in the code that sets the value? - we can update
vet.sh
to ignore this deprecation warning instead.
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.
I left it in and added it to vet.sh.
credentials/credentials.go
Outdated
// SecurityVersion is the security protocol version. | ||
// | ||
// Deprecated: please use Peer.AuthInfo. |
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.
Let's go with:
// SecurityVersion is the security protocol version. It is a static version string from the
// credentials, not a value that reflects per-connection protocol negotiation. To retrieve
// details about the credentials used for a connection, use the Peer's AuthInfo field instead.
//
// Deprecated: please use Peer.AuthInfo.
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.
Updated.
Deprecating ProtocolInfo.SecurityVersion.
Updates #3352