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

Consider enabling UserInfo cache by default for OAuth2 providers #39553

Closed
sberyozkin opened this issue Mar 19, 2024 · 1 comment · Fixed by #39967
Closed

Consider enabling UserInfo cache by default for OAuth2 providers #39553

sberyozkin opened this issue Mar 19, 2024 · 1 comment · Fixed by #39967
Labels
area/oidc kind/enhancement New feature or request
Milestone

Comments

@sberyozkin
Copy link
Member

Description

Right now, if any of the Oauth2 providers which give only an access token, Quarkus does an indirect access token verification to allow an access to Quarkus, by requesting UserInfo which is a provider specific JSON representing someting about the authenticated user.
To control the rate limiting, one has to enable the cache which can be considered suboptimal.
@Sanne and @FroMage propose to have the cache enabled by default, with Sanne suggesting to warn in the logs to make sure the users are aware, and if the users want they can then explicitly disable it.

Implementation ideas

What needs to be decided if what kind of cache is enabled by default in this case, the default in-mem one or a stateless one where UserInfo is kept in the encrypted cookie.

I guess if the encryption is enabled with a proper secret key size, then it can be kept in the generated ID token in the encrypted cookie.

In the short term, as proposed by @Sanne, a log message advising to enable the cache will be of help

@sberyozkin sberyozkin added the kind/enhancement New feature or request label Mar 19, 2024
Copy link

quarkus-bot bot commented Mar 19, 2024

/cc @gwenneg (cache)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oidc kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant