G T
G T

Reputation: 75

How to add multiple owners on single resource in keycloak

I am working with keycloak UMA. With the help of keycloak I can create the resources in keycloak Authorization option with some basic details name, type, URI, scope, etc and we also have the option for resource owner, with UI we are not able to change the owner,

But I've some question regarding resource owner:

I've also tried with below CURL, but I am not able to add multiple owner names.

curl -v -X POST \
  http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set \
  -H 'Authorization: Bearer '$pat \
  -H 'Content-Type: application/json' \
  -d '{
     "name":"Alice Resource",
     "owner": "alice"
  }'

Upvotes: 3

Views: 1390

Answers (1)

Akshay Jain
Akshay Jain

Reputation: 790

  • You can't assign multiple users as owners to a single resource. you can assign all the resource scopes to access to any users associated within keycloak.
  • Another user can able to share the resources with others on behalf of the resource owner if that particular user has the resource owner's token. You can get the resource owner token with the help token exchange or Impersonation feature provided by keycloak.
  • You can refer keycloak official documentation

Upvotes: 2

Related Questions