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

Restrict login to users matching a certain group #867

Open
bergerar opened this issue May 13, 2024 · 0 comments
Open

Restrict login to users matching a certain group #867

bergerar opened this issue May 13, 2024 · 0 comments

Comments

@bergerar
Copy link

We would like to limit access to Nextcloud to users having certain groups. So when a user authenticates with OAuth, it should check the groups coming from the OAuth provider before a user is created / allowed to login in. If the user is not on a whitelist (regex), the user login is rejected.

Background

We have a member database containing many members from different divisions. Some divisions have their own Nextcloud instance, and it would be great to allow them to use the member database for login. But other divisions should not be able to use the Nextcloud instance. The user story is described in hitobito/hitobito_jubla#74 (german)

Proposal

  • Add a new field in the settings for setting a whitelist regex for which groups (gid) are synchronized with Nextcloud
  • Add a new checkbox in the settings "Restrict login for users without whitelisted groups"
  • During the authentication process, check if the user is in at least one group that is part of the whitelist
  • During the group synchronisation, only add and remove groups that are whitelisted. (this would also solve Group provisioning: delete only groups created by the plugin #866)

What do you think about this proposal?

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

No branches or pull requests

1 participant