-
Notifications
You must be signed in to change notification settings - Fork 487
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
[spiffe-oidc-discovery-provider] Issuer issues #5719
Comments
@kfox1111, thanks for the proposal.
|
Hi @jer8me,
So, say, server-a and server-b, they may want to do something like: as a user then, you hit: https://example.org/oidc/server-a/.well-known/openid-configuration The routing by default in most proxies would then to just grab the path from the request and send that along, like /oidc/server-a/.well-known/openid-configuration to the backend provider. but that doesn't normally exist in the discovery provider. only /.well-known/openid-configuration today. So, some http routers support stripping off a prefix off of the url. so, strip /oidc/server-a off the request before it goes through to the other side. That works when the http router supports it. Unfortunately, some common ones don't support rewriting, just matching. :( k8s ingress doesn't have a native way of doing it. (some implementations like ingress-nginx support it via annotations...) So, having the user be able to give the prefix to listen on to the discovery provider, lets it be used by all the http routers, not just the advanced ones that support url rewriting. The code is pretty simple around it. So, the juice is worth the squeeze IMHO. |
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: