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

client cert is not sent to ext auth service. #3989

Closed
magictoken opened this issue Dec 23, 2021 · 2 comments
Closed

client cert is not sent to ext auth service. #3989

magictoken opened this issue Dec 23, 2021 · 2 comments
Labels
stale Issue is stale and will be closed t:feature New feature or enhancement request

Comments

@magictoken
Copy link

Describe the bug
In emissary I am trying to do custom client cert validation in the ext_authz gRPC service. We noticed that the client certificate is not available to the service

To Reproduce

log request attributes in ext authz service:

b, err := json.MarshalIndent(req.Attributes, "", " ")
if err == nil {
log.Println("Request Attributes: ")
log.Println((string(b)))
}

Expected behavior

Certificate attribute should be logged:

"certificate": "-----BEGIN%20CERTIFICATE-----.....-----END%20CERTIFICATE-----%0A"

Versions (please complete the following information):

  • Ambassador: 2.0.4
  • Kubernetes environment: bare metal
  • Version 1.19.15

Additional context

to fix:

diff --git a/python/ambassador/envoy/v3/v3httpfilter.py b/python/ambassador/envoy/v3/v3httpfilter.py
index 59fdde90d..7d0bb84a9 100644
--- a/python/ambassador/envoy/v3/v3httpfilter.py
+++ b/python/ambassador/envoy/v3/v3httpfilter.py
@@ -348,6 +348,7 @@ def V3HTTPFilter_authv1(auth: IRAuth, v3config: 'V3Config'):
                     },
                     'timeout': "%0.3fs" % (float(auth.timeout_ms) / 1000.0)
                 },
+                'include_peer_certificate': True,
                 'transport_api_version': protocol_version.replace("alpha", "").upper(),
             }
         }
@cindymullins-dw
Copy link
Contributor

Thanks for raising this to our attention. I'll leave this open as a feature request. Since you've already found a solution, it would be awesome if you'd open a PR for this as well. You can join our #emissary-dev channel in our Slack at a8r.io/slack if you want to discuss further.

@cindymullins-dw cindymullins-dw added the t:feature New feature or enhancement request label Apr 15, 2022
@dosubot dosubot bot added the stale Issue is stale and will be closed label Jul 3, 2024
@kflynn
Copy link
Member

kflynn commented Feb 14, 2025

Closed by #5823!! with thanks to @isker 🙂

@kflynn kflynn closed this as completed Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue is stale and will be closed t:feature New feature or enhancement request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants