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

OIDC: New tenant specific service to map a TokenCredential to a SecurityIdentity #24069

Closed
knutwannheden opened this issue Mar 3, 2022 · 3 comments · Fixed by #36631
Closed
Assignees
Milestone

Comments

@knutwannheden
Copy link
Contributor

Description

With #24051 an attempt was made to allow the OidcIdentityProvider to be used to parse an access token and map it to a SecurityIdentity. However, the OidcIdentityProvider implements multi-tenancy and to determine the applicable tenant it needs the Vert.x RoutingContext (cf. DefaultTenantConfigResolver#resolveContext()), which thus won't work when there is no request (e.g. when processing is triggered from the scheduler).

Thus, this issue requests a new injectable service which represents a tenant-specific configuration (request scoped), which would allow mapping a TokenCredential (or TokenAuthenticationRequest?) to a SecurityIdentity. A dedicated annotation would allow injecting the service for the default tenant configuration or a named tenant configuration (name as given in Quarkus configuration).

Implementation ideas

The PR #24051 provides a test case that may serve as an example and basis for a test for this feature.

@quarkus-bot
Copy link

quarkus-bot bot commented Mar 3, 2022

/cc @pedroigor, @sberyozkin

@sberyozkin sberyozkin self-assigned this Feb 16, 2023
@sberyozkin
Copy link
Member

sberyozkin commented Oct 5, 2023

@michalvavrik Just FYI, please add to your queue if it can be of interest. I think this can indeed be a useful enhancement - it is about verifying the bearer access after the request has been completed, I've seen more than one query about it.

@michalvavrik
Copy link
Contributor

I'm on it.

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