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

OAuth: remove hard coded groups_by_applications and users cache from OAuthCookieFilter #1585

Open
bamthomas opened this issue Oct 2, 2024 · 0 comments

Comments

@bamthomas
Copy link
Collaborator

bamthomas commented Oct 2, 2024

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

This is related to the PR #1583
For projects ACL's and api key we use a user cache in Redis. This cache is overridden at each login.
The project ACL is used for example by DocumentRessource to check if users have access to a project by getProjects/getProjectNames in User.java. It is finally using the field groups_by_applications returned by the Identity Provider.

Describe the solution you'd like

  1. the cache should be made by another implementation class so the line writableUsers().saveOrUpdate(datashareUser); could be in a subclass of the OAuth2CookieFilter.processOAuthApiResponse
  2. the user field containing the project could have another location in the json. It is now in groups_by_applications.datashare but it could be located elsewhere in the json returned by the Identity Provider. That could allow other deployments to use the IP configuration for project ACL without using another persistence location.

Additional context
see
When cache has been introduced #504.
latest refactor #1395

@bamthomas bamthomas changed the title OAuth: remove hard coded groups_by_applications and users cache from OAuthCookieFilter OAuth: remove hard coded groups_by_applications and users cache from OAuthCookieFilter Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant