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

Make the JWT issuer configurable in the OIDC Discovery Provider #5480

Open
jer8me opened this issue Sep 9, 2024 · 5 comments
Open

Make the JWT issuer configurable in the OIDC Discovery Provider #5480

jer8me opened this issue Sep 9, 2024 · 5 comments
Assignees
Labels
good first issue Issues with this label are good candidates for first-time contributions help wanted Issues with this label are ready to start work but are in need of someone to do it priority/backlog Issue is approved and in the backlog

Comments

@jer8me
Copy link

jer8me commented Sep 9, 2024

The issuer returned by the OIDC Discovery Provider is currently dynamically built based on the request host: https://github.com/spiffe/spire/blob/v1.10.3/support/oidc-discovery-provider/handler.go#L66

There are a couple of issues with this approach:

  1. Only host-based issuers are supported. We cannot use a path component to support multiple issuers per host. For instance:
  1. If the OIDC Discovery Provider service is reachable via more than one host, it will return a different issuer based on the host used for the request. This does not really make sense from an OIDC point of view because a SPIRE server is configured with exactly one jwt_issuer. The issuer returned by the OIDC Discovery Provider should match the one configured in the server.
@amartinezfayo amartinezfayo added the triage/in-progress Issue triage is in progress label Sep 10, 2024
@azdagron
Copy link
Member

The issuer returned by the OIDC Discovery Provider should match the one configured in the server.

This is the biggest sticking point for me on why this should be configurable.

We'd accept a change here.

@azdagron azdagron added good first issue Issues with this label are good candidates for first-time contributions help wanted Issues with this label are ready to start work but are in need of someone to do it priority/backlog Issue is approved and in the backlog and removed triage/in-progress Issue triage is in progress labels Sep 19, 2024
@aluthra-37
Copy link

I talked to @jer8me about this issue. We were thinking that we could add an optional configuration item in the OIDC provider to set the jwt_issuer.
If missing, we would keep the existing behavior but if set, we could use it as the jwt_issuer, bypassing the dynamic logic.
If this sounds good, could you please assign this issue to me

@azdagron
Copy link
Member

azdagron commented Oct 1, 2024

Sounds great. Thanks @aluthra-37 .

@kfox1111
Copy link
Contributor

@aluthra-37, I have a need to resolve this too. Do you have time to work on this soon? If not, would you mind if I write up a pr for it?

@aluthra-37
Copy link

Hey @kfox1111. I'm currently working on a PR for this. I should have one out soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues with this label are good candidates for first-time contributions help wanted Issues with this label are ready to start work but are in need of someone to do it priority/backlog Issue is approved and in the backlog
Projects
None yet
Development

No branches or pull requests

5 participants