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 String
DEFAULT_GROUP_CLASS
protected String
groupClass
-
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 Object
createGroupPrincipal(String name, String groupClass)
Set
get(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)
AuthorizationEntry
getDefaultEntry()
protected Class<? extends DestinationMapEntry>
getEntryClass()
Returns the type of the allowed entries which can be set via theDestinationMap.setEntries(List)
method.AuthorizationEntry
getEntryFor(ActiveMQDestination destination)
String
getGroupClass()
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 destinationTempDestinationAuthorizationEntry
getTempDestinationAuthorizationEntry()
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 destinationvoid
setAuthorizationEntries(List<DestinationMapEntry> entries)
Sets the individual entries on the authorization mapvoid
setDefaultEntry(AuthorizationEntry defaultEntry)
void
setGroupClass(String groupClass)
void
setTempDestinationAuthorizationEntry(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:AuthorizationMap
Returns the set of all ACLs capable of administering temp destination- Specified by:
getTempDestinationAdminACLs
in interfaceAuthorizationMap
-
getTempDestinationReadACLs
public Set<Object> getTempDestinationReadACLs()
Description copied from interface:AuthorizationMap
Returns the set of all ACLs capable of reading from temp destination- Specified by:
getTempDestinationReadACLs
in interfaceAuthorizationMap
-
getTempDestinationWriteACLs
public Set<Object> getTempDestinationWriteACLs()
Description copied from interface:AuthorizationMap
Returns the set of all ACLs capable of writing to temp destination- Specified by:
getTempDestinationWriteACLs
in interfaceAuthorizationMap
-
getAdminACLs
public Set<Object> getAdminACLs(ActiveMQDestination destination)
Description copied from interface:AuthorizationMap
Returns the set of all ACLs capable of administering the given destination- Specified by:
getAdminACLs
in interfaceAuthorizationMap
-
getReadACLs
public Set<Object> getReadACLs(ActiveMQDestination destination)
Description copied from interface:AuthorizationMap
Returns the set of all ACLs capable of reading (consuming from) the given destination- Specified by:
getReadACLs
in interfaceAuthorizationMap
-
getWriteACLs
public Set<Object> getWriteACLs(ActiveMQDestination destination)
Description copied from interface:AuthorizationMap
Returns the set of all ACLs capable of writing to the given destination- Specified by:
getWriteACLs
in 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:
get
in 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:DestinationMap
Returns 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:
getEntryClass
in classDestinationMap
-
getAllEntries
protected Set<AuthorizationEntry> getAllEntries(ActiveMQDestination destination)
-
getGroupClass
public String getGroupClass()
-
setGroupClass
public void setGroupClass(String groupClass)
-
-