users@glassfish.java.net

Re: Role mapping issues with Glassfish 3.1.1

From: <forums_at_java.net>
Date: Tue, 6 Sep 2011 09:26:05 -0500 (CDT)

 Thanks for pointers, it helps me to investigate solutions

Unfortunately the custom Role Mapper did not help because glassfish only call
JAACRoleMapper#getPrincipalsInRole with declared role, so there seems to be
no hook here to support dynamic role names.

But I found another way, I define my own JACC provider based on the simple
one, and I updated  SimplePolicyConfiguration#doImplies to return true if
the permission is WebRoleRefPermission, and the user has a principal
corresponding to the role

Not sure if it is the right way to do it, but is seems to work.

Thanks again


--
[Message sent by forum member 'amergey']
View Post: http://forums.java.net/node/839637