p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
https://phasetwo.io
Other
389 stars 66 forks source link

Groups per organisation #25

Closed janhaesen closed 1 year ago

janhaesen commented 1 year ago

It would be nice to have the ability to have groups available per organisation. The reasoning behind it would be that in general Keycloak roles (to which I'd prefer to refer to as permission, but won't for sake of terminology) will be grouped into a role, e.g. Admin, Support, Finance Ops, etc. This way this could be assigned to a user under the organisation.

The idea would be that there's a general set of groups that are by default provided but can be amended (overruled/overridden) by the organisation, for instance because they'd want to make it more/less restrictive. This functionality is already available in Keycloak itself, but would be nice to have on an organisation level as well.

Another way this is sometimes achieved, but likely would be less intuitive, is the composite roles in Keycloak.

xgp commented 1 year ago

@janhaesen Agreed that it is a nice to have. We initially considered replicating the whole Keycloak group, role, composite role, etc. model on a per-organization basis, but we didn't have the need from customers at the time. Part of the initial priority was to make the model fairly simple to understand and reason. We're open to PRs, but this one is unlikely to be done by us in the short-term.

xgp commented 1 year ago

https://github.com/p2-inc/phasetwo-java/pull/3

https://github.com/a8t3r/keycloak-orgs-copy/tree/support-organization-groups

https://github.com/p2-inc/keycloak-orgs/compare/main...a8t3r:keycloak-orgs-copy:support-organization-groups

xgp commented 1 year ago

Closing in favor of https://github.com/p2-inc/keycloak-orgs/issues/48