Skip to content
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

Merged
merged 11 commits into from
Feb 14, 2020
Merged

credentials: deprecate ProtocolInfo.SecurityVersion #3372

merged 11 commits into from
Feb 14, 2020

Conversation

GarrettGutierrez1
Copy link
Contributor

Deprecating ProtocolInfo.SecurityVersion.

Updates #3352

@dfawley dfawley changed the title Deprecate ProtocolInfo.SecurityVersion credentials: deprecate ProtocolInfo.SecurityVersion Feb 12, 2020
@dfawley dfawley added Type: API Change Breaking API changes (experimental APIs only!) and removed Type: Bug no release notes labels Feb 12, 2020
@dfawley dfawley added this to the 1.28 Release milestone Feb 12, 2020
@@ -101,6 +101,8 @@ type ProtocolInfo struct {
// SecurityProtocol is the security protocol in use.
SecurityProtocol string
// SecurityVersion is the security protocol version.
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the comment.

@@ -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 {
Copy link
Member

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:

  1. why isn't vet.sh failing because of the place in the code that sets the value?
  2. we can update vet.sh to ignore this deprecation warning instead.

Copy link
Contributor Author

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.

Comment on lines 103 to 105
// SecurityVersion is the security protocol version.
//
// Deprecated: please use Peer.AuthInfo.
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@GarrettGutierrez1 GarrettGutierrez1 merged commit a10661d into grpc:master Feb 14, 2020
@GarrettGutierrez1 GarrettGutierrez1 deleted the tls-version-from-config branch February 18, 2020 20:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: API Change Breaking API changes (experimental APIs only!)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants