osm icon indicating copy to clipboard operation
osm copied to clipboard

Allow users to provide a CA bundle for configuring the mutatingWebhookConfiguration in OSM

Open snehachhabria opened this issue 4 years ago • 10 comments

Please describe the Improvement and/or Feature Request Extend OSM, whereby a user is allowed to provide or bring their own CA bundle for the mwhc in OSM. This can be enabled/disabled using a feature flag.

In the scenario when a user brings their own CA bundle the lifecycle and management of the mwhc is the responsibility of the mesh owner.

Scope (please mark with X where applicable)

  • New Functionality [X]
  • Install [X]
  • SMI Traffic Access Policy [ ]
  • SMI Traffic Specs Policy [ ]
  • SMI Traffic Split Policy [ ]
  • Permissive Traffic Policy [ ]
  • Ingress [ ]
  • Egress [ ]
  • Envoy Control Plane [ ]
  • CLI Tool [ ]
  • Metrics [ ]
  • Certificate Management [ ]
  • Sidecar Injection [ ]
  • Logging [ ]
  • Debugging [ ]
  • Tests [ ]
  • CI System [ ]
  • Project Release [ ]

Possible use cases Provides ore flexibility for the creation and management of the mwhc

snehachhabria avatar Nov 03 '20 05:11 snehachhabria

This is a prerequisite for #507

draychev avatar Dec 08 '20 23:12 draychev

I have some more information from customers I believe is related to this issue. We're seeing a growing need for customers to have a need for certificates issued in the mesh to have the common name and SAN share the same domain as their current PKI infrastructure Eg .com. Is this issue targeting the same use case?

phillipgibson avatar May 18 '22 16:05 phillipgibson

No this would be separate. We can create a new issue for custom trust domains, I don't believe that's currently captured

steeling avatar May 18 '22 16:05 steeling

Ok I'll create an issue outlining the use case.

phillipgibson avatar May 18 '22 16:05 phillipgibson

Added default label kind/needed. Please consider re-labeling this issue appropriately.

github-actions[bot] avatar Jul 13 '22 00:07 github-actions[bot]

So right now custom trust domains leave an awkward story with respect to the webhooks, which require a certificate SAN of <service>.<namespace>.svc

So this would alleviate that issue for customers that may need to integrate with their own PKI.

steeling avatar Jul 15 '22 19:07 steeling

So right now custom trust domains leave an awkward story with respect to the webhooks, which require a certificate SAN of <service>.<namespace>.svc

So this would alleviate that issue for customers that may need to integrate with their own PKI.

Hey @steeling! I'm trying to get a better understanding of this issue. Could you share some documentation about Kubernetes webhooks requirements for certificate SANs? Should custom certs be allowed for all webhooks? Could you elaborate on the awkward story here with respect to custom trust domains?

jaellio avatar Jul 19 '22 23:07 jaellio

K8s requires that the SAN is of the form <service>.<namespace>.<svc>

This is a problem for users who are integrated with a PKI setup where they are required to leverage a custom trust domain. Enabling a "Bring your own Control plane certs", would allow these certs to not go through their custom PKI setup.

Alternatively we could have some flags or something that allows 2 cert managers, 1 for a PKI, and maybe one that leverages tresor, although I'm not sure which customers would prefer. The former would allow users to leverage whatever cert requirements they may have, but brings the overhead of managing the lifespan of the cert, while tresor could leverage auto rotation.

steeling avatar Jul 20 '22 16:07 steeling

https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#configure-admission-webhooks-on-the-fly

steeling avatar Jul 20 '22 16:07 steeling

@jaellio Does the current cert-rotation work enable this? My guess is no

keithmattix avatar Sep 07 '22 19:09 keithmattix

This issue will be closed due to a long period of inactivity. If you would like this issue to remain open then please comment or update.

github-actions[bot] avatar Feb 02 '23 00:02 github-actions[bot]

Issue closed due to inactivity.

github-actions[bot] avatar Feb 09 '23 00:02 github-actions[bot]