Package org.apache.activemq.security
Class DefaultAuthorizationMap
- java.lang.Object
-
- org.apache.activemq.filter.DestinationMap
-
- org.apache.activemq.security.DefaultAuthorizationMap
-
- All Implemented Interfaces:
AuthorizationMap
- Direct Known Subclasses:
XBeanAuthorizationMap
public class DefaultAuthorizationMap extends DestinationMap implements AuthorizationMap
Represents a destination based configuration of policies so that individual destinations or wildcard hierarchies of destinations can be configured using different policies. Each entry in the map represents the authorization ACLs for each operation.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_GROUP_CLASSprotected StringgroupClass-
Fields inherited from class org.apache.activemq.filter.DestinationMap
ANY_CHILD, ANY_DESCENDENT
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthorizationMap()DefaultAuthorizationMap(List<DestinationMapEntry> authorizationEntries)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ObjectcreateGroupPrincipal(String name, String groupClass)Setget(ActiveMQDestination key)Looks up the value(s) matching the given Destination key.Set<Object>getAdminACLs(ActiveMQDestination destination)Returns the set of all ACLs capable of administering the given destinationprotected Set<AuthorizationEntry>getAllEntries(ActiveMQDestination destination)AuthorizationEntrygetDefaultEntry()protected Class<? extends DestinationMapEntry>getEntryClass()Returns the type of the allowed entries which can be set via theDestinationMap.setEntries(List)method.AuthorizationEntrygetEntryFor(ActiveMQDestination destination)StringgetGroupClass()Set<Object>getReadACLs(ActiveMQDestination destination)Returns the set of all ACLs capable of reading (consuming from) the given destinationSet<Object>getTempDestinationAdminACLs()Returns the set of all ACLs capable of administering temp destinationTempDestinationAuthorizationEntrygetTempDestinationAuthorizationEntry()Set<Object>getTempDestinationReadACLs()Returns the set of all ACLs capable of reading from temp destinationSet<Object>getTempDestinationWriteACLs()Returns the set of all ACLs capable of writing to temp destinationSet<Object>getWriteACLs(ActiveMQDestination destination)Returns the set of all ACLs capable of writing to the given destinationvoidsetAuthorizationEntries(List<DestinationMapEntry> entries)Sets the individual entries on the authorization mapvoidsetDefaultEntry(AuthorizationEntry defaultEntry)voidsetGroupClass(String groupClass)voidsetTempDestinationAuthorizationEntry(TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry)-
Methods inherited from class org.apache.activemq.filter.DestinationMap
chooseValue, findWildcardMatches, findWildcardMatches, getQueueRootChildCount, getQueueRootNode, getRootNode, getTempQueueRootNode, getTempTopicRootNode, getTopicRootChildCount, getTopicRootNode, isEmpty, put, remove, removeAll, reset, setEntries, union, unsynchronizedGet, unsynchronizedPut, unsynchronizedRemove
-
-
-
-
Field Detail
-
DEFAULT_GROUP_CLASS
public static final String DEFAULT_GROUP_CLASS
- See Also:
- Constant Field Values
-
groupClass
protected String groupClass
-
-
Constructor Detail
-
DefaultAuthorizationMap
public DefaultAuthorizationMap()
-
DefaultAuthorizationMap
public DefaultAuthorizationMap(List<DestinationMapEntry> authorizationEntries)
-
-
Method Detail
-
setTempDestinationAuthorizationEntry
public void setTempDestinationAuthorizationEntry(TempDestinationAuthorizationEntry tempDestinationAuthorizationEntry)
-
getTempDestinationAuthorizationEntry
public TempDestinationAuthorizationEntry getTempDestinationAuthorizationEntry()
-
getTempDestinationAdminACLs
public Set<Object> getTempDestinationAdminACLs()
Description copied from interface:AuthorizationMapReturns the set of all ACLs capable of administering temp destination- Specified by:
getTempDestinationAdminACLsin interfaceAuthorizationMap
-
getTempDestinationReadACLs
public Set<Object> getTempDestinationReadACLs()
Description copied from interface:AuthorizationMapReturns the set of all ACLs capable of reading from temp destination- Specified by:
getTempDestinationReadACLsin interfaceAuthorizationMap
-
getTempDestinationWriteACLs
public Set<Object> getTempDestinationWriteACLs()
Description copied from interface:AuthorizationMapReturns the set of all ACLs capable of writing to temp destination- Specified by:
getTempDestinationWriteACLsin interfaceAuthorizationMap
-
getAdminACLs
public Set<Object> getAdminACLs(ActiveMQDestination destination)
Description copied from interface:AuthorizationMapReturns the set of all ACLs capable of administering the given destination- Specified by:
getAdminACLsin interfaceAuthorizationMap
-
getReadACLs
public Set<Object> getReadACLs(ActiveMQDestination destination)
Description copied from interface:AuthorizationMapReturns the set of all ACLs capable of reading (consuming from) the given destination- Specified by:
getReadACLsin interfaceAuthorizationMap
-
getWriteACLs
public Set<Object> getWriteACLs(ActiveMQDestination destination)
Description copied from interface:AuthorizationMapReturns the set of all ACLs capable of writing to the given destination- Specified by:
getWriteACLsin interfaceAuthorizationMap
-
getEntryFor
public AuthorizationEntry getEntryFor(ActiveMQDestination destination)
-
get
public Set get(ActiveMQDestination key)
Looks up the value(s) matching the given Destination key. For simple destinations this is typically a List of one single value, for wildcards or composite destinations this will typically be a Union of matching values.- Overrides:
getin classDestinationMap- Parameters:
key- the destination to lookup- Returns:
- a Union of matching values or an empty list if there are no matching values.
-
setAuthorizationEntries
public void setAuthorizationEntries(List<DestinationMapEntry> entries)
Sets the individual entries on the authorization map
-
getDefaultEntry
public AuthorizationEntry getDefaultEntry()
-
setDefaultEntry
public void setDefaultEntry(AuthorizationEntry defaultEntry)
-
getEntryClass
protected Class<? extends DestinationMapEntry> getEntryClass()
Description copied from class:DestinationMapReturns the type of the allowed entries which can be set via theDestinationMap.setEntries(List)method. This allows derived classes to further restrict the type of allowed entries to make a type safe destination map for custom policies.- Overrides:
getEntryClassin classDestinationMap
-
getAllEntries
protected Set<AuthorizationEntry> getAllEntries(ActiveMQDestination destination)
-
getGroupClass
public String getGroupClass()
-
setGroupClass
public void setGroupClass(String groupClass)
-
-