Open kfox1111 opened 1 month ago
Can you clarify the use case here? I think what you're asking for is that the OIDC Discovery Provider use a server certificate provided by the Workload API? So callers would need to have a bundle to authenticate that SVID? Seems a little chicken-and-eggy to need a bundle to authenticate the connection to the provider in order to obtain the bundle material presented by the provider?
Thats what I'm asking for yeah. We have some configs where we spire-helper -> certs -> spiffe-oidc-discovery-provider
It would be much easier to manage if it was naitively supported.
The chicken and the egg problem is real, but there are solutions to that too, such as running the spire-agent on the host to fetch the spiffe x509 bundles for validation. I'm doing that for the Kubernetes integration stuff I've been working on.
Hey @kfox1111, do you have an arch diagram or something that spells out the use case clearly that you can share (either here or privately in slack with the maintainer group)? Before we consider taking this we'd like to see if there are alternatives.
After some discussion we're leaning towards not taking this feature as long as a viable workaround exists. Maybe an alternate path forward is to try and effect a change upstream in Kubernetes that provides an alternate path for obtaining the JWKS used to validate tokens (e.g. from disk?).
I asked the sig-auth channel already. They said any further changes in that part of the code are highly unlikely.
@kfox1111 can you propose some config changes to support this feature? Wondering what that will look like and the experience around it.
There are two configurations currently: https://github.com/spiffe/spire/blob/main/support/oidc-discovery-provider/config.go#L57-L63 acme and providing a cert/key.
Thinking a new option that is something like: TLSUseSPIFFE = true/false
If true, it would use https://github.com/spiffe/spire/blob/main/support/oidc-discovery-provider/config.go#L71 (WorkloadAPIConfig) to get the tls key/cert in addition to the jwks.
There are a bunch of ways to configure the cert on the service. One option missing would be to use the workload api to grab a cert and use that. We're already doing that using the spiffe-helper but adds a lot of potential unneeded complexity to the setup.