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 user autoprovisioning via libreGraph #3860

Merged
merged 8 commits into from
May 24, 2022
Merged

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented May 24, 2022

Description

When removing the accounts service we lost the user autoprovision feature. This re-introduces it. When autoprovisioning is enabled (via PROXY_AUTOPROVISION_ACCOUNTS, as in the past) accounts that are not resolvable via cs3 will be provsioned via the libregraph API.

Related Issue:

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

rhafer added 3 commits May 24, 2022 13:22
They were also added by the ExtractAccountUUID for the /drives endpoint.
We'll need some on other endpoints as well (for automatic user
provisioning).
When trying to create a user that already exist return a proper
error, that clients can check for.
@update-docs
Copy link

update-docs bot commented May 24, 2022

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.

@mmattel
Copy link
Contributor

mmattel commented May 24, 2022

If applicapable, in case "new" env's are coming in, do not forget to give them a description and a default.

@rhafer
Copy link
Contributor Author

rhafer commented May 24, 2022

If applicapable, in case "new" env's are coming in, do not forget to give them a description and a default.

There are no new config settings coming in with this. PR. I am still checking whether other parts of the docs need updating.

@rhafer rhafer marked this pull request as ready for review May 24, 2022 13:28
extensions/graph/pkg/middleware/auth.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@kobergj kobergj left a comment

Choose a reason for hiding this comment

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

Found some points, but looks good in general!

extensions/graph/pkg/middleware/auth.go Outdated Show resolved Hide resolved
extensions/proxy/pkg/command/server.go Show resolved Hide resolved
extensions/proxy/pkg/user/backend/cs3.go Show resolved Hide resolved
extensions/proxy/pkg/user/backend/cs3.go Outdated Show resolved Hide resolved
extensions/proxy/pkg/user/backend/cs3.go Outdated Show resolved Hide resolved
rhafer and others added 3 commits May 24, 2022 16:25
When removing the accounts service we lost the user autoprovision
feature. This re-introduces it. When autoprovisioning is enabled (via
PROXY_AUTOPROVISION_ACCOUNTS, as in the past) accounts that are not
resolvable via cs3 will be provsioned via the libregraph API.

Closes: owncloud#3540
Co-authored-by: David Christofas <[email protected]>
@rhafer rhafer requested a review from kobergj May 24, 2022 14:26
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@rhafer rhafer merged commit 201767c into owncloud:master May 24, 2022
@micbar micbar mentioned this pull request May 25, 2022
25 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.

Ocis with keycloak&nginx problem
4 participants