Class GlassfishRoleMapper
- java.lang.Object
-
- com.sun.enterprise.security.web.integration.GlassfishRoleMapper
-
- All Implemented Interfaces:
org.glassfish.exousia.modules.locked.AuthorizationRoleMapper
public class GlassfishRoleMapper extends Object implements org.glassfish.exousia.modules.locked.AuthorizationRoleMapper
Glassfish role mapper NB: mapper only supports disjunctive (as apposed to conjunctive principal 2 role mappings. IOW, there is no way to require 2 or more principals to be in a Role.- Author:
- monzillo
-
-
Constructor Summary
Constructors Constructor Description GlassfishRoleMapper(Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanarePrincipalsInRole(String pcid, Principal[] principals, String roleName)booleanarePrincipalsInRole(SecurityRoleMapper srm, Principal[] principals, String roleName)Set<String>getDeclaredRoles(String pcid)Set<Principal>getPrincipalsInRole(String pcid, String roleName)BitSetgetRolesOfPrincipals(String pcid, String[] roles, Principal[] principals)Set<String>getRolesOfPrincipals(String pcid, Principal[] principals)BitSetgetRolesOfSubject(String pcid, String[] roles, Subject s)Set<String>getRolesOfSubject(String pcid, Subject s)booleanisSubjectInRole(String pcid, Subject s, String roleName)
-
-
-
Constructor Detail
-
GlassfishRoleMapper
public GlassfishRoleMapper(Logger logger)
-
-
Method Detail
-
arePrincipalsInRole
public boolean arePrincipalsInRole(SecurityRoleMapper srm, Principal[] principals, String roleName) throws SecurityException
- Throws:
SecurityException
-
isSubjectInRole
public boolean isSubjectInRole(String pcid, Subject s, String roleName) throws SecurityException
- Throws:
SecurityException
-
arePrincipalsInRole
public boolean arePrincipalsInRole(String pcid, Principal[] principals, String roleName) throws SecurityException
- Throws:
SecurityException
-
getRolesOfSubject
public Set<String> getRolesOfSubject(String pcid, Subject s) throws SecurityException, UnsupportedOperationException
-
getRolesOfPrincipals
public Set<String> getRolesOfPrincipals(String pcid, Principal[] principals) throws SecurityException, UnsupportedOperationException
-
getRolesOfSubject
public BitSet getRolesOfSubject(String pcid, String[] roles, Subject s) throws SecurityException, UnsupportedOperationException
-
getRolesOfPrincipals
public BitSet getRolesOfPrincipals(String pcid, String[] roles, Principal[] principals) throws SecurityException, UnsupportedOperationException
-
getPrincipalsInRole
public Set<Principal> getPrincipalsInRole(String pcid, String roleName) throws SecurityException, UnsupportedOperationException
- Specified by:
getPrincipalsInRolein interfaceorg.glassfish.exousia.modules.locked.AuthorizationRoleMapper- Throws:
SecurityExceptionUnsupportedOperationException
-
-