-
Notifications
You must be signed in to change notification settings - Fork 35
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
New system config flag to disable user creation in soft auto provisioning #954
Conversation
lib/Service/ProvisioningService.php
Outdated
@@ -149,6 +109,17 @@ public function provisionUser(string $tokenUserId, int $providerId, object $idTo | |||
if ($existingLocalUser !== null) { | |||
$user = $existingLocalUser; | |||
} else { | |||
// if disable_account_creation is true, user_oidc should not manage user | |||
// - no user creation | |||
// - do not use the existing users managed by the user_oidc backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum but what if user_oidc created some users and then I enable the new option, these users disappear? Or at least cannot login anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can't login... I took the easy way. I can change that behaviour. Do you think it makes more sense to let them in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no I just had another read of the code. It's fine. If some users were created by user_oidc before disable_account_creation was switched on, they can still connect after. The comment was wrong and is now fixed.
131c502
to
f77068a
Compare
f81e27c
to
40317da
Compare
…n soft auto provisioning Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
40317da
to
a7eb94f
Compare
We are missing a use case in soft auto provisioning. Some people might want to only accept Oidc logins from users that already exist in other backends (like when auto provisioning is disabled) but still want user_oidc to set the mapped attributes to the user (like when soft auto provisioning is enabled and the user already exists in another backend).
There were 2 ways to do that:
force_attribute_provisioning
)We chose 2. with @come-nc thinking it's slightly easier to grasp when configuring user_oidc.