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

Add OIDC token introspection endpoint (RFC 7662) to Vault's OIDC identity provider #187

Open
siepkes opened this issue Mar 7, 2024 · 0 comments
Assignees
Labels

Comments

@siepkes
Copy link
Contributor

siepkes commented Mar 7, 2024

Is your feature request related to a problem? Please describe.

I think (unless I'm missing something here) in it's current state it is very hard to securely use OpenBaos OIDC identity provider (ie. it's IDP) to protect an API such as a REST or gRPC endpoint.

When protecting an endpoint the endpoint will require the caller to use an access_token. The id_token is not really suited for this purpose. To keep it brief, reasons as to why this is are described in articles such as ID Token and Access Token: What's the Difference?.

So that means the endpoint will need to validate the access_token. This means the endpoint probably needs to know at least the following things:

  • Is the token valid now? Has it been revoked?
  • What is the intended audience of the token? Is this token intended to be used with this specific endpoint?
  • What is the expiry time of the token? Is this token still valid and how long can we cache certain results?

Describe the solution you'd like

I would like for OpenBao to offer a OIDC token introspection endpoint (RFC 7662). The token introspection endpoint is an optional part of the OIDC spec but implemented by almost all IDP's (Keycloak, Hydra, etc.).

Describe alternatives you've considered

I've evaluated using the "token lookup" API (since OpenBao access_token's are actually OpenBao batch tokens). While that does tell if the token is valid and what the expiry time is there is no way to tell the intended audience of the token. Meaning that if a token gets stolen from service A there is no way for service B to validate if the token is actually valid for service B or only is only valid for service A.

OpenBao's OIDC UserInfo endpoint only offers additional information about the identity (name, email, etc.). It does not tell much about the token. At the most it tells if the token is valid when you call the endpoint. But there is no expiry time or intended audience information for example. Which makes sense since that's the job of the token introspection endpoint.

Explain any additional use-cases

While a optional piece of the OIDC spec a good chunk of applications will expect the token introspection endpoint to be callable. It will probably be a win for overall compatibility.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant