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

ocis_keycloak: Add ocis roles as realm roles #5750

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Mar 7, 2023

This adds the roles ocisAdmin, ocisSpaceAdmin, ocisUser and ocisGuest as realm roles to the the oCIS realm. It also assigns those roles to the demo users.

Additionally the missing demo user "Katherine Johnson" is added with the role of "ocisSpaceAdmin".

The changes to actually evaluate the roles from ocis will follow in a later PR.

This adds the roles ocisAdmin, ocisSpaceAdmin, ocisUser and ocisGuest as realm roles
to the the oCIS realm. It also assigns those roles to the demo users.

Additionally the missing demo user "Katherine Johnson" is added with the role of
"ocisSpaceAdmin".
@update-docs
Copy link

update-docs bot commented Mar 7, 2023

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.

@rhafer rhafer self-assigned this Mar 7, 2023
@rhafer rhafer requested review from wkloucek and micbar March 7, 2023 10:39
@rhafer
Copy link
Contributor Author

rhafer commented Mar 7, 2023

related to #5669

Copy link
Contributor

@wkloucek wkloucek left a comment

Choose a reason for hiding this comment

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

👍 looks great

One also has the flexibility to not directly assign a role to a user but to a group. Therefore the group needs the role mapper and every group member will receive this role. Will oCIS have a logic to use the "highest privileges role" (if there is something like an order of privileges!?)

What do we do about OCIS_ADMIN_USER_ID is that still needed for other usecases? Because if you're using Keycloak, you won't need that somewhat constrained setting anymore.

@rhafer
Copy link
Contributor Author

rhafer commented Mar 7, 2023

Will oCIS have a logic to use the "highest privileges role" (if there is something like an order of privileges!?)

Good question. I guess we'll somehow need to add that to ocis, yes.

What do we do about OCIS_ADMIN_USER_ID is that still needed for other usecases? Because if you're using Keycloak, you won't need that somewhat constrained setting anymore.

The keycloak deployment it not really uses OCIS_ADMIN_USER_ID. The admin user basically works for keycloak because it is already provisioned in ocis at startup.

OCIS_ADMIN_USER_ID is currently still needed for setups using an external LDAP server with the builtin IDP.

@butonic butonic merged commit b575046 into owncloud:master Mar 8, 2023
ownclouders pushed a commit that referenced this pull request Mar 8, 2023
Author: Ralf Haferkamp <rhaferkamp@owncloud.com>
Date:   Wed Mar 8 12:11:21 2023 +0100

    ocis_keycloak: Add ocis roles as realm roles (#5750)

    * ocis_keycloak: Add ocis roles as realm roles

    This adds the roles ocisAdmin, ocisSpaceAdmin, ocisUser and ocisGuest as realm roles
    to the the oCIS realm. It also assigns those roles to the demo users.

    Additionally the missing demo user "Katherine Johnson" is added with the role of
    "ocisSpaceAdmin".

    * Expose realm_roles in "roles" claim of id tokens and userinfo
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.

3 participants