[keycloak-user] Resource sharing using Keycloak

Vishnu Prakash vishnuprakash323 at gmail.com
Wed Sep 18 08:37:05 EDT 2019


Hi,

I am new to keycloak. I am trying to do resources sharing using Permission
Management feature in Protection API.

The resource server is accessed from a public client app(keycloak public
client). But using the token issued to the client app, I am not able to do
resource sharing from my resource server. It is throwing following error.

{"error":"invalid_clientId","error_description":"Client application
[CALL-CENTER-UI] is not registered as a resource server."}

Please find my code below,

PermissionTicketRepresentation permissionTicketRepresentation = new
PermissionTicketRepresentation();
      permissionTicketRepresentation.setRequester(
"5cb1f43c-d28c-457f-9491-b358f63a8362");
permissionTicketRepresentation.setRequesterName("vishnu");
permissionTicketRepresentation.setOwner("albin");
      permissionTicketRepresentation.setResource(
"0fb7bfe1-78de-46eb-9e75-4632a67d1afb");
permissionTicketRepresentation.setResourceName("Pro-02-05091019");
permissionTicketRepresentation.setScope("project:view");
permissionTicketRepresentation.setScopeName("project:view");
permissionTicketRepresentation.setGranted(true);


AuthzClient.create().protection(token).permission().create(permissionTicketRepresentation);

Is to possible to share resources between users without using “Keycloak
account app”.

Any help will be appreciated.

Thanks & Regards,

Vishnu Prakash


More information about the keycloak-user mailing list