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

network ext_authz filter: support include_tls_session option from http variant #33105

Merged
merged 4 commits into from
Mar 26, 2024

Conversation

AdamEAnderson
Copy link
Contributor

Commit Message: network ext_authz filter: support include_tls_session option from http variant
Additional Description: the http ext_authz filter supports including tls session details in the check request. This PR ports that functionality over to the network ext_authz filter using the exact same mechanisms and the same field in the check request.
Risk Level: low
Testing: unit tests included
Docs Changes: docs are included in the protodoc for api changes. Slightly altered the protodoc for the check request attribute to link to both filters' config.
Release Notes: included as a new feature
Platform Specific Features: n/a

Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #33105 was opened by AdamEAnderson.

see: more, trace.

@AdamEAnderson
Copy link
Contributor Author

CI currently failing due to flakes/failures not related to this PR. I will merge from main and rerun everything once I have a review to get things working again.

Copy link
Contributor

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

Looks good overall. Thanks!

/wait

@@ -242,6 +242,15 @@ void CheckRequestUtils::createTcpCheck(
include_peer_certificate);
setAttrContextPeer(*attrs->mutable_destination(), cb->connection(), server_name, true,
include_peer_certificate);
if (include_tls_session) {
if (cb->connection().ssl() != nullptr) {
Copy link
Contributor

@ggreenway ggreenway Mar 26, 2024

Choose a reason for hiding this comment

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

Please extract this into a helper function called from both http and network paths, so that if more tls session fields are added later, they are added for both the network and http variants. (Yes, it will be a 4 line function for now).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, that makes sense

@ggreenway ggreenway self-assigned this Mar 26, 2024
@mattklein123
Copy link
Member

/lgtm api

@mattklein123 mattklein123 removed their assignment Mar 26, 2024
Copy link
Contributor

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

LGTM

@ggreenway ggreenway enabled auto-merge (squash) March 26, 2024 15:31
@ggreenway
Copy link
Contributor

Can you please merge main? There was a build break yesterday that you need the fix for.

@yanavlasov
Copy link
Contributor

/wait

…rk-authz-tls-details

Signed-off-by: Adam Anderson <[email protected]>
@AdamEAnderson
Copy link
Contributor Author

Can you please merge main? There was a build break yesterday that you need the fix for.

@ggreenway merged main and most stuff works, but we're failing per-extension code coverage for extensions I haven't touched

@ggreenway
Copy link
Contributor

Can you please merge main? There was a build break yesterday that you need the fix for.

@ggreenway merged main and most stuff works, but we're failing per-extension code coverage for extensions I haven't touched

Looking into it; when it's fixed, you'll need to merge main one more time.

@ggreenway
Copy link
Contributor

The coverage issue should be fixed in main now; please merge main once more and hopefully CI will now pass.

/wait

…rk-authz-tls-details

Signed-off-by: Adam Anderson <[email protected]>
@ggreenway ggreenway merged commit 9a575d8 into envoyproxy:main Mar 26, 2024
52 of 53 checks passed
@AdamEAnderson AdamEAnderson deleted the network-authz-tls-details branch March 26, 2024 21:21
@marc-barry
Copy link
Contributor

I created envoyproxy/go-control-plane#936 to have this added to the go-control-plane.

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.

5 participants