-
Notifications
You must be signed in to change notification settings - Fork 72
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
Client Credentials Grant / machine-to-machine auth in organizations #163
Comments
Great question. 2 ideas:
|
I can confirm, the user is not visible. I can get to the user details page (Clients->...->Service accounts roles->service-account-sample-...) but in the user details there is no option to add it to an organization. Would it be possible to display these users in the "Add member" menu somehow? Or make the search find it when entering specific user ID? I will try to add this service account user through the API calls.
I think this would grant too many permissions? Since it is the admin user? I require fine grained control and multiple macine-to-macine accounts, each with specific set of permissions(roles) in the organization. I can confirm the "org-admin" user is visible and already a member of the organization. |
I used However it is rather difficult to administrate it when even the API does not show it as a member. I wonder if I am missing some api parameter to include the service accounts in the results? |
@martivo thank you for doing the validations. Regarding the "org-admin" user, you are correct. It is meant to be an organization "superuser" that has all permissions within an organization. I'll tag this as a feature request, as it would be nice to have the ability to add service accounts to organizations, it's currently encumbered by how Keycloak itself treats / "hides" those Users. |
I was just researching the same topic. Thanks for all the pointers! Managing/debugging this through the UI would be helpful, but I'm glad it is already supported. Finding the
I did try this and I can confirm the organization roles do come through when using the organization role mapper. This should work for assigning the role: curl -X PUT -H "Authorization: Bearer $ACCESS_TOKEN" https://HOST/realms/master/orgs/ORG_ID/roles/ROLE_NAME/users/USER_ID |
I can confirm that the organization is present for the client when it's service account is added to the organization. But administrating this is a nightmare - the API won't tell you if it is a member or not. Unless there is some API request that would show these hidden users. |
This method in the Keycloak Admin API gets a service account user for a specific client: https://www.keycloak.org/docs-api/23.0.6/rest-api/index.html#_get_adminrealmsrealmclientsidservice_account_user
|
This is great for finding the user ID of the clients service account user. How could I check what service account users are the members of an organization? |
the |
Hello keycloak-orgs/src/main/java/io/phasetwo/service/model/jpa/OrganizationAdapter.java Lines 198 to 203 in f863e96
Thanks |
Hello!
I am currently using Organizations successfully with "human" users, but now I have a need to authenticate machine-to-machine communication. I am strugling to figure out how to achieve this with organizations.
As far as I know, we are supposed to use clients(CLient authentication: ON, Auth flow: Service accounts flow).
How could I place this client into an Organization? Or the service account created/used by this Client?
I am also unable to assign an organization role to a Client. Only the regular KK roles are availabe.
Has anyone done something like this or can point me to the right direction?
The text was updated successfully, but these errors were encountered: