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

access log / route headers: Expose more downstream TLS information #7019

Merged
merged 7 commits into from
May 31, 2019

Conversation

mikegrass
Copy link
Contributor

Description:

  • New accessors added for querying information about the established TLS session: issuerPeerCertificate(), ciphersuiteId(), ciphersuiteString(), tlsVersion().
  • access_log_formatter.cc and header_formatter.cc updated with new variables for exposing downstream TLS information.
  • grpc_access_log_impl.cc updated to fill in existing (but previously-hidden) ciphersuite and tls version fields.
  • Unit tests updated to exercise the above changes.

Risk Level: Low
Testing: Unit tests and ad-hoc manual testing
Docs Changes: Updated docs/root/configuration/access_log.rst and docs/root/configuration/http_conn_man/headers.rst with information on new variables.
Release Notes: Updated docs/root/intro/version_history.rst to note the changes.

More incremental progress on #3296.

* New accessors added for querying information about the established TLS session: issuerPeerCertificate(), ciphersuiteId(), ciphersuiteString(), tlsVersion().

* access_log_formatter.cc and header_formatter.cc updated with new variables for exposing downstream TLS information.

* grpc_access_log_impl.cc updated to fill in existing (but previously-hidden) ciphersuite and tls version fields.

* Unit tests updated to exercise the above changes.

Signed-off-by: Mike Grass <mgrass@salesforce.com>
Signed-off-by: Mike Grass <mgrass@salesforce.com>
@mikegrass
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: tsan (failed build)

🐱

Caused by: a #7019 (comment) was created by @mikegrass.

see: more, trace.

@repokitteh-read-only
Copy link

🤷‍♀️ nothing to rebuild.

🐱

Caused by: a #7019 (comment) was created by @mikegrass.

see: more, trace.

Signed-off-by: Mike Grass <mgrass@salesforce.com>
@mikegrass
Copy link
Contributor Author

@mattklein123 thanks for assigning a reviewer! @zuercher looking forward to your feedback!

@mikegrass
Copy link
Contributor Author

@zuercher -- anything I can do to help move this review along?

Signed-off-by: Mike Grass <mgrass@salesforce.com>
Copy link
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

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

Sorry for the slow response. This looks good, just the one-off above and one other small change. Thanks for your patience!

case CertName::Subject:
name = X509_get_subject_name(&cert);
break;
}
Copy link
Member

Choose a reason for hiding this comment

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

Usually we'll add a default case with a NOT_REACHED_GCOVR_EXCL_LINE statement to help detect missing cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thank you!

Copy link
Member

Choose a reason for hiding this comment

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

This default shouldn't be needed at all since you cover all cases. Can you remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattklein123 Sure -- I've removed it in the latest commit.

Signed-off-by: Mike Grass <mgrass@salesforce.com>
…ing cases

Signed-off-by: Mike Grass <mgrass@salesforce.com>
zuercher
zuercher previously approved these changes May 30, 2019
Copy link
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

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

Thanks!

@mikegrass
Copy link
Contributor Author

Thanks for the review @zuercher! Is there anyone else who needs to review before this can be merged?

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM w/ small nit. Great stuff!

/wait

case CertName::Subject:
name = X509_get_subject_name(&cert);
break;
}
Copy link
Member

Choose a reason for hiding this comment

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

This default shouldn't be needed at all since you cover all cases. Can you remove?

Signed-off-by: Mike Grass <mgrass@salesforce.com>
@mattklein123
Copy link
Member

@mikegrass friendly request to not force push in the future, it makes reviews more difficult. Thank you!

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Nice!

@mattklein123 mattklein123 merged commit a42273b into envoyproxy:master May 31, 2019
@mikegrass
Copy link
Contributor Author

@mikegrass friendly request to not force push in the future, it makes reviews more difficult. Thank you!

@mattklein123 apologies for that! I had moved to a new computer just yesterday and had neglected to run the support/bootstrap script to set up git hooks, so my last commit was missing DCO. I followed the instructions at https://github.com/envoyproxy/envoy/blob/master/CONTRIBUTING.md#fixing-dco to fix DCO on that last commit.

Thank you for the review!

@mikegrass mikegrass deleted the tls-headers branch May 31, 2019 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants