[keycloak-user] Policy-API - How to Set a User Policy

stefan.wachter stefan.wachter at bosch-si.com
Wed Jul 18 04:43:20 EDT 2018


Hi,

how can one set a user policy, (i.e. a set of users) to a user managed 
resource? Looking at the class 
org.keycloak.representations.idm.authorization.UmaPermissionRepresentation 
I do not see a field that could be used for specifiying a set of user ids.


public class UmaPermissionRepresentationextends AbstractPolicyRepresentation {
     
     private Stringid;
     private Stringdescription;
     private Set<String>roles;
     private Set<String>groups;
     private Set<String>clients;
     private Stringcondition;
...
}

public class AbstractPolicyRepresentation {

     private Stringid;
     private Stringname;
     private Stringdescription;
     private Stringtype;
     private Set<String>policies;
     private Set<String>resources;
     private Set<String>scopes;
     private Logiclogic = Logic.POSITIVE;
     private DecisionStrategydecisionStrategy = DecisionStrategy.UNANIMOUS;
     private Stringowner;
...

}

BTW: Why does the derived UmaPermissionRepresentation class have an id 
and description field of its own? I think these fields are inherited 
from its base class AbstractPolicyRepresentation.

-- 

Best regards,

*Stefan Wachter
INST-ICM/BSV-BS*

Tel.  +49(711)811-58477

*Be**QIK
*



More information about the keycloak-user mailing list