You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
There are multiple use cases for being able to override the issuer string that the discovery provider should return.
In #5657, the issuer was made configurable, but it also uses the same config option to perform multiple other behavioral changes that make it unusable for one of those use cases.
So, I think we need to step back and reconsider the design of these features.
There seems to be two primary use cases:
The discovery provider is behind a reverse proxy / load balancer. It cant properly detect what the issuer string should be automatically.
The discovery provider is being contacted directly, setup on an alternate dns name, and needs spire-server issued jwt's issuer property to match the returned issuer from the discovery provider.
For use case 1, there are multiple features that could be used to implement it:
The issuer returned can't be guessed by the discovery provider based on the domain / path returned by the reverse proxy / load balancer. It needs to be configurable.
The discovery provider returns an absolute url to the /keys endpoint. It needs to be configurable to route the traffic back to the right endpoint
Some reverse proxy / load balancers do not support rewriting the url before passing it to the discovery provider. The ability to specify a prefix to serve off of would allow the discovery provider to be used with more software successfully.
There is, arguably, an anti feature implemented in pr 5657 that rewrites the incoming url to look like it shows up as the issuer. This prevents the domain checking from working in all cases. I think it should probably be reverted outright.
For use case 2, we need:
The ability to set the returned issuer explicitly
The keys endpoint needs to be reachable the same way that the discovery document is. No rewriting should be done.
An example of 2 is:
configure the discovery provider:
override the jwt issuer to be the same as that spire is set to. ex: "oidc-discovery-provider.example.org"
listen on an alternate port. ex: 8181
configure /etc/hosts entry for 127.0.0.1 -> k8ssodp.example.org
configure the allowed domain names to be "k8ssodp.example.org"
configure the kubernetes apiserver
set issuer to validate to be "oidc-discovery-provider.example.org"
This allows the main issuer to be "oidc-discovery-provider.example.org" on port 443, but have local instances on k8s control planes for high availability / bootstrapping purposes.
Proposed Changes
Change the new jwt_issuer flag override just the issuer, no other behavior.
Add an advertised_url option that overrides the url returned in the discovery document for keys (advertised_url + "/keys")
Add a prefix option that defaults to / that configures where the url routes will listen on.
Revert the domain checking changes. It was intended to make things easier, but hasn't had that affect.
The text was updated successfully, but these errors were encountered:
Problem
There are multiple use cases for being able to override the issuer string that the discovery provider should return.
In #5657, the issuer was made configurable, but it also uses the same config option to perform multiple other behavioral changes that make it unusable for one of those use cases.
So, I think we need to step back and reconsider the design of these features.
There seems to be two primary use cases:
For use case 1, there are multiple features that could be used to implement it:
There is, arguably, an anti feature implemented in pr 5657 that rewrites the incoming url to look like it shows up as the issuer. This prevents the domain checking from working in all cases. I think it should probably be reverted outright.
For use case 2, we need:
An example of 2 is:
This allows the main issuer to be "oidc-discovery-provider.example.org" on port 443, but have local instances on k8s control planes for high availability / bootstrapping purposes.
Proposed Changes
jwt_issuer
flag override just the issuer, no other behavior.advertised_url
option that overrides the url returned in the discovery document for keys (advertised_url + "/keys")prefix
option that defaults to/
that configures where the url routes will listen on.The text was updated successfully, but these errors were encountered: