-
Notifications
You must be signed in to change notification settings - Fork 31
Introduce new attribute connection.mtls #425
Conversation
control/include/http/check_data.h
Outdated
@@ -42,6 +42,9 @@ class CheckData { | |||
// Get request HTTP headers | |||
virtual std::map<std::string, std::string> GetRequestHeaders() const = 0; | |||
|
|||
// Returns true if connection is mutual TLS enabled. | |||
virtual bool IsMutualTlsEnabledConnection() const = 0; |
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.
Can we just use "IsMutualTLS"
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.
Done.
control/include/http/report_data.h
Outdated
@@ -29,6 +29,9 @@ class ReportData { | |||
public: | |||
virtual ~ReportData() {} | |||
|
|||
// Get upstream tcp connection ip and port. | |||
virtual bool GetDestinationIpPort(std::string* ip, int* port) const = 0; |
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.
please comment on the format of ip in bytes
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.
Done.
Please take a look. Thanks. |
/test mixerclient-presubmit |
7ca20a1
to
6ff5cf3
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiwzhang The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. |
Automatic merge from submit-queue. Support Mixer filter to send connection.mtls attribute. **What this PR does / why we need it**: This is a followup PR which implements functions defined in PR #[425](istio/old_mixerclient_repo#425). This support Mixer client to send connection.mtls attribute in Check() and Report() calls. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
What this PR does / why we need it: Introduce new mixer attribute "connection.mtls" which indicates whether connection is mutual TLS enabled. Add virtual function bool IsMutualTlsEnabledConnection() into http/check_data.h and tcp/check_data.h, and call this function inside AttributesBuilder::ExtractCheckAttributes(). Add another virtual function bool GetDestinationIpPort(std::string* ip, int* port) to report destination IP and port from HTTP filter.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #426Special notes for your reviewer:
Release note: