question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include x-forwarded-client-certificate header

See original GitHub issue

Please describe your use case / problem.

When client-certificate verification is used, the x-forwarded-client-certificate (XFCC) header is not being set (or any equivalent one), so the client app can’t know the identity of the user making the request. I think this is required for client certificate validation to be useful.

Describe the solution you’d like

In the TLSContext definition, add a property that enables setting the XFCC header.

  apiVersion: ambassador/v1
  kind: TLSContext
  name: myapp-tls-context
  hosts:
  - myapp.blabla.org
  secret: myapp-server-tls
  ca_secret: myapp-cacert
  cert_required: true / false
  xfcc: true / false  <<== for example

The configuration could go further, and allow mapping Envoy’s “forward_client_cert_details” and “set_current_client_cert_details” properties.

https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/network/http_connection_manager/v2/http_connection_manager.proto.html?highlight=forward_client_cert_details#enum-config-filter-network-http-connection-manager-v2-httpconnectionmanager-forwardclientcertdetails

Describe alternatives you’ve considered

I couldn’t find any.

Additional context

Nothing.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:9
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ovkcommented, Oct 25, 2019

It looks like there is a possible workaround to add client certificate to headers.

I stumbled upon the following special field from Envoy:

https://github.com/envoyproxy/envoy/blob/92c085afaeeed138067f289fa9294d56afc91e25/source/common/router/header_formatter.cc#L261

that appear to work fine with Ambassador.

For example:

  add_request_headers:
    x-forwarded-client-cert: "%DOWNSTREAM_PEER_CERT%"
0reactions
stale[bot]commented, Mar 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP header manipulation - Envoy Proxy
x -forwarded-client-cert (XFCC) is a proxy header which indicates certificate information of part or all of the clients or proxies that a request...
Read more >
Configuring X-Forwarded-Client-Cert (XFCC) headers in ...
XFCC is a proxy header indicating certificate information of part or all of the clients/proxy a request has flowed through, on its way...
Read more >
Configure the XFCC header in Aspen Mesh - AskF5
X -Forwarded-Client-Cert (XFCC) is a proxy header that dynamically adds the certificate information of the client in a request that has ...
Read more >
Mututal TLS: x-forwarded-client-cert header not being ... - GitHub
I have the following k8s infrastructure setup to allow mutual tls between proxy side cars: http:20000 (egress) https:443 https:10000 ...
Read more >
Configuring XFCC Headers :: Aspen Mesh Documentation
XFCC is a proxy header which indicates certificate information of part or all of the clients or proxies that a request has flowed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found