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

autoprovisioning: Manage group memberships #9458

Merged
merged 3 commits into from
Jul 8, 2024
Merged

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Jun 24, 2024

Requires: cs3org/reva#4738 ✔️

  • groupmembership are not deleted yet
  • config knobs for the group claim are missing
  • The sync process is currently triggered with every single request, we need to limit this to e.g. once per accesstoken lifetime (or once per userinfo cache ttl)
  • documentation is missing

To avoid syncing group memberships with every single incoming request I add a small ttl based cache that keeps track of when group memberships were last updated for a specific user. Currently the ttl is hardcode to 1 minute, I am still pondering whether to turn that into a configuration option.

Copy link

update-docs bot commented Jun 24, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@rhafer rhafer force-pushed the issue/5538 branch 9 times, most recently from 94620ca to f99624d Compare July 2, 2024 11:03
@rhafer rhafer changed the title [WIP] autoprovisioning: Manage group memberships autoprovisioning: Manage group memberships Jul 2, 2024
@rhafer rhafer marked this pull request as ready for review July 2, 2024 11:11
@rhafer
Copy link
Contributor Author

rhafer commented Jul 2, 2024

@mmattel Please review the README.md additions.

@rhafer rhafer requested review from micbar and kobergj July 2, 2024 11:12
services/proxy/README.md Outdated Show resolved Hide resolved
services/proxy/README.md Outdated Show resolved Hide resolved
services/proxy/README.md Outdated Show resolved Hide resolved
services/proxy/README.md Outdated Show resolved Hide resolved
services/proxy/README.md Outdated Show resolved Hide resolved
services/proxy/README.md Outdated Show resolved Hide resolved
services/proxy/README.md Outdated Show resolved Hide resolved
services/proxy/README.md Outdated Show resolved Hide resolved
kobergj
kobergj previously requested changes Jul 4, 2024
services/proxy/pkg/middleware/account_resolver.go Outdated Show resolved Hide resolved
rhafer and others added 3 commits July 8, 2024 09:32
Add support for autoprovisioning group memberships from OIDC claims.
Users are added to and removed from groups based on the value of an OIDC
claim. If a group does not exist, it is created.

Closes: owncloud#5538
Copy link

sonarcloud bot commented Jul 8, 2024

return err
default:
// group has been created meanwhile, re-read it to get the group id
lgGroup, err = c.getLibregraphGroup(newctx, lgClient, group)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tricky.

Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ScharfViktor We need to get some API tests up and running for this.

@micbar micbar dismissed kobergj’s stale review July 8, 2024 07:59

On vacation, review was implemented.

@micbar micbar merged commit f8046ab into owncloud:master Jul 8, 2024
4 checks passed
ownclouders pushed a commit that referenced this pull request Jul 8, 2024
autoprovisioning: Manage group memberships
@micbar micbar mentioned this pull request Jul 8, 2024
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants