As I said in my previous email I think this is overusing and confusing the concept of a group.
Users should be able use groups freely for their organizations without it conflicting with groups Keycloak uses to define permissions.
As I proposed we could introduce the concept of an organization/domain. An admin would then have one or more roles associated with an domain. The organization/domain would simply be a namespace within the Keycloak namespace:
org.keycloak/<organization>/view-clients
org.keycloak/<organization>/manage-clients
...
One issue with changing "permissions" on the admin endpoints is that currently we have a duplicated set of these as the master realm and each individual realm can have these. This is error prone, insecure and just outright confusing IMO. We should get rid of the master realm and simply have the admin endpoints and console hosted under a specific realm. This would also simplify the URLs for other things. So the URLs become:
* <realm>/admin
* <realm>/protocols
* <realm>/...