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

be able to add restriction to auth oidc #2662

Open
slewislcm opened this issue Oct 1, 2024 · 1 comment
Open

be able to add restriction to auth oidc #2662

slewislcm opened this issue Oct 1, 2024 · 1 comment
Assignees
Labels
Feature - SSO Issue type - help wanted General questions on how to use the plugins, e.g. configurations etc. Plugin - auth_oidc Status - need more info Further information requested to triage the issue.

Comments

@slewislcm
Copy link

Hi,
The plugin is working pretty well for us, just tweaking the process. So the user sync creation works well, with the restriction by an Entra group. And users can access and create a new accounts by logging straight into moodle, but when they do there is no group restriction (unless I'm missing something), so it's open to anyone on our domain.
We've set the auth_oidc/userestriction to our domain, but I think it would be good to restrict by group too. So we can leave the 'account creation' on when authenticating.

thanks,
Simon

@weilai-irl
Copy link
Collaborator

Hi @slewislcm

I confirm the User Restrictions settings in the auth_oidc plugin can only work on user identifier, which is UPN for Microsoft accounts. It's impossible to extend it to support groups.

You may want to check the Prevent account creation when authenticating (authpreventaccountcreation) setting on the "Manage authentication" configuration page (https://url.to.moodle/admin/settings.php?section=manageauths). When enabled, it will prevent any authentication plugin that authenticates users from external IdPs, including but not limited to auth_oidc, to create new Moodle account on successful authentication.

The ideal configuration in your case is likely:

  • Use the restriction in the user sync task to create accounts for users from a configured group only.
  • Enable the Prevent account creation when authenticating setting so that only users with existing Moodle accounts can login to Moodle.

Please give it a try.

Regards,
Lai

@weilai-irl weilai-irl self-assigned this Oct 2, 2024
@weilai-irl weilai-irl added Issue type - help wanted General questions on how to use the plugins, e.g. configurations etc. Status - need more info Further information requested to triage the issue. Plugin - auth_oidc Feature - SSO labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature - SSO Issue type - help wanted General questions on how to use the plugins, e.g. configurations etc. Plugin - auth_oidc Status - need more info Further information requested to triage the issue.
Projects
None yet
Development

No branches or pull requests

2 participants