Class GlassfishRoleMapper
- java.lang.Object
-
- com.sun.enterprise.security.jacc.provider.GlassfishRoleMapper
-
- All Implemented Interfaces:
JACCRoleMapper
public class GlassfishRoleMapper extends Object implements JACCRoleMapper
Glassfish role mapperNB: 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
-
-
Field Summary
-
Fields inherited from interface com.sun.enterprise.security.jacc.provider.JACCRoleMapper
CLASS_NAME, HANDLER_KEY
-
-
Constructor Summary
Constructors Constructor Description GlassfishRoleMapper(Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanarePrincipalsInRole(String contextId, Principal[] principals, String roleName)booleanarePrincipalsInRole(org.glassfish.deployment.common.SecurityRoleMapper srm, Principal[] principals, String roleName)Set<String>getDeclaredRoles(String contextId)Set<Principal>getPrincipalsInRole(String contextId, String roleName)BitSetgetRolesOfPrincipals(String contextId, String[] roles, Principal[] principals)Set<String>getRolesOfPrincipals(String contextId, Principal[] principals)BitSetgetRolesOfSubject(String contextId, String[] roles, Subject subject)Set<String>getRolesOfSubject(String contextId, Subject subject)booleanisSubjectInRole(String contextId, Subject subject, String roleName)
-
-
-
Constructor Detail
-
GlassfishRoleMapper
public GlassfishRoleMapper(Logger logger)
-
-
Method Detail
-
arePrincipalsInRole
public boolean arePrincipalsInRole(org.glassfish.deployment.common.SecurityRoleMapper srm, Principal[] principals, String roleName) throws SecurityException- Throws:
SecurityException
-
getDeclaredRoles
public Set<String> getDeclaredRoles(String contextId)
- Specified by:
getDeclaredRolesin interfaceJACCRoleMapper
-
isSubjectInRole
public boolean isSubjectInRole(String contextId, Subject subject, String roleName) throws SecurityException
- Specified by:
isSubjectInRolein interfaceJACCRoleMapper- Throws:
SecurityException
-
arePrincipalsInRole
public boolean arePrincipalsInRole(String contextId, Principal[] principals, String roleName) throws SecurityException
- Specified by:
arePrincipalsInRolein interfaceJACCRoleMapper- Throws:
SecurityException
-
getRolesOfSubject
public Set<String> getRolesOfSubject(String contextId, Subject subject) throws SecurityException, UnsupportedOperationException
- Specified by:
getRolesOfSubjectin interfaceJACCRoleMapper- Throws:
SecurityExceptionUnsupportedOperationException
-
getRolesOfPrincipals
public Set<String> getRolesOfPrincipals(String contextId, Principal[] principals) throws SecurityException, UnsupportedOperationException
- Specified by:
getRolesOfPrincipalsin interfaceJACCRoleMapper- Throws:
SecurityExceptionUnsupportedOperationException
-
getRolesOfSubject
public BitSet getRolesOfSubject(String contextId, String[] roles, Subject subject) throws SecurityException, UnsupportedOperationException
- Specified by:
getRolesOfSubjectin interfaceJACCRoleMapper- Throws:
SecurityExceptionUnsupportedOperationException
-
getRolesOfPrincipals
public BitSet getRolesOfPrincipals(String contextId, String[] roles, Principal[] principals) throws SecurityException, UnsupportedOperationException
- Specified by:
getRolesOfPrincipalsin interfaceJACCRoleMapper- Throws:
SecurityExceptionUnsupportedOperationException
-
getPrincipalsInRole
public Set<Principal> getPrincipalsInRole(String contextId, String roleName) throws SecurityException, UnsupportedOperationException
- Specified by:
getPrincipalsInRolein interfaceJACCRoleMapper- Throws:
SecurityExceptionUnsupportedOperationException
-
-