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 Traffic Policy - support of the several CA certificates for mTLS authentification? #5369

Open
mdekhtiarenko opened this issue Feb 27, 2025 · 1 comment
Labels

Comments

@mdekhtiarenko
Copy link

Description:
I have configured ClientTrafficPolicy with optional mTLS to allow two dev and prod cluster certificates.
When each one of these is configured alone everything works as expected. But when both are defined at the same time certificate verification only works for one of them.

Is it intended behavior? In docs I see:

A single reference to a Kubernetes ConfigMap or a Kubernetes Secret,
with the CA certificate in a key named ca.crt is currently supported.

So I assume yes - that's a bit weird because the contract that allows the list is misleading.

Is there any workaround for my case?

Here is an example of my Client Traffic Policy:


apiVersion: gateway.envoyproxy.io/v1alpha1
kind: ClientTrafficPolicy
metadata:
  name: eg-default-clienttraffic
  namespace: envoy-gateway
spec:
  enableProxyProtocol: true
  headers:
    xForwardedClientCert:
      certDetailsToAdd:
        - Subject
      mode: SanitizeSet
  healthCheck:
    path: /ready
  targetRef:
    group: gateway.networking.k8s.io
    kind: Gateway
    name: eg-default
  tls:
    clientValidation:
      caCertificateRefs:
        - group: ""
          kind: Secret
          name: dev-ca
          namespace: envoy-gateway
        - group: ""
          kind: Secret
          name: prod-ca
          namespace: envoy-gateway
      optional: true

@arkodg
Copy link
Contributor

arkodg commented Feb 27, 2025

the list was supported to support the rotation case
we do append the CAs together in the gateway-api layer

for _, caCertRef := range tlsParams.ClientValidation.CACertificateRefs {

if this isnt working, its a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants