How can I group the permissions using Picketlink[1] in such a way that I can assign one or more especific Groups of permissions to a Role ?
Thanks in advance.
How can I group the permissions using Picketlink[1] in such a way that I can assign one or more especific Groups of permissions to a Role ?
Thanks in advance.
Have you read the official documentation before asking? If yes, showing us your efforts would make it easier to help you. If not, please take a look at this.
I'm asking you this for a reason: I think you've misunderstood the concepts of Group, Role and Permission.
A Group is used to manage collections of identity types. For instance, Alice and Bob could be User identities which are member of "employees" group.
The Role is used in various relationship types to designate authority to another identity type to perform various operations within an application. For example, Trent could be an User identity with the role of "moderator".
Permissions can be assigned to User, Groups and Roles. It's up to you to choose in which way(s) to manage permissions in your application.
Access control can be based on Groups ("only employees can use this method"), Roles ("only moderators can delete posts") or even Users ("I am the only one who can eat bacon here!"). This can be done with the use of the Permission API, as explained in the documentation linked above.
Trust me, I know it could be not so simple at first - but please make an effort; then feel free to ask anything :)
Let us know!
As you said, PicketLink's Permission API only lets you assign one permission at a time. Anyways, note that even if you have to grant one permission at a time, this doesn't mean you can't grant multiple permissions to an instance:
permissionManager.grantPermission(adminRole, resource, myPermissions.CREATE)
permissionManager.grantPermission(adminRole, resource, myPermissions.DELETE)
permissionManager.grantPermission(adminRole, resource, myPermissions.UPDATE)
grants 3 permissions to every user that has adminRole and needs to invoke resource.