Skip to content

Disallow manual group edits if using OIDC group claims #6549

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

Open
Emyrk opened this issue Mar 10, 2023 · 9 comments
Open

Disallow manual group edits if using OIDC group claims #6549

Emyrk opened this issue Mar 10, 2023 · 9 comments

Comments

@Emyrk
Copy link
Member

Emyrk commented Mar 10, 2023

If OIDC groups claims is controlling user groups, admins should not be allowed to add/remove user's from groups manually. Any manual edits would be reverted each time the OIDC user logs in.

@Emyrk Emyrk added bug and removed bug labels Mar 10, 2023
@Emyrk
Copy link
Member Author

Emyrk commented Mar 10, 2023

We could track the group additions with a field to indicate if it came manually or from OIDC. If we decide to support both OIDC group syncing and manual group editing.

@github-actions github-actions bot added the stale This issue is like stale bread. label Jun 10, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2023
@Emyrk
Copy link
Member Author

Emyrk commented Jun 21, 2023

@sreya This might be a good one to plan

@Emyrk Emyrk reopened this Jun 21, 2023
@github-actions github-actions bot removed the stale This issue is like stale bread. label Jun 22, 2023
@github-actions github-actions bot added the stale This issue is like stale bread. label Dec 20, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2024
@Emyrk Emyrk reopened this Jan 2, 2024
@github-actions github-actions bot removed the stale This issue is like stale bread. label Jan 4, 2024
@michaelbrewer
Copy link
Contributor

Once you are using OIDC for groups, group creation, roles and user logins. All of these features should be read only.

  • user profile updates
  • roles and role mapping
  • groups and group mapping

@Emyrk
Copy link
Member Author

Emyrk commented Mar 25, 2024

I believe the roles are already read only. Agreed on the others

@michaelbrewer
Copy link
Contributor

Sorry, yes. I noticed that "roles" syncing does make it read only.

"groups" syncing does have a challenge that the "groups" have to already exist (but no users can be added or removed). Or that groups get created dynamically (but in the case of entra id, group names will be "Object Id", which is not human friendly).

For on the fly creating of "groups" a mapping should ideally exist for the "name", "display name", "description" and "icon".

@Emyrk
Copy link
Member Author

Emyrk commented Mar 26, 2024

@michaelbrewer

You can auto create missing groups: https://coder.com/docs/v2/latest/cli/server#--oidc-group-auto-create

There is a static mapping: https://coder.com/docs/v2/latest/cli/server#--oidc-group-mapping

But for dynamic groups, there is a display name already: https://coder.com/docs/v2/latest/api/schemas#codersdkgroup

So the group name might be something strange from the OIDC, but you can give it a friendly name in coder.

@michaelbrewer
Copy link
Contributor

I will test that. For my testing the group names were the Object Id. But I will see if mapping them in coders environment configuration.

@kylecarbs kylecarbs changed the title If using OIDC group claims, we should not allow manual group editing Disallow manual group edits if using OIDC group claims Apr 26, 2024
@bpmct
Copy link
Member

bpmct commented Aug 30, 2024

@Emyrk are we doing this with our oidc+group sync work?

@Emyrk
Copy link
Member Author

Emyrk commented Aug 30, 2024

@bpmct Yea, I will fix this as I redo grou sync 👍

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

3 participants