Class LegacyLDAPSecuritySettingPlugin
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.impl.LegacyLDAPSecuritySettingPlugin
-
- All Implemented Interfaces:
Serializable,SecuritySettingPlugin
public class LegacyLDAPSecuritySettingPlugin extends Object implements SecuritySettingPlugin
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classLegacyLDAPSecuritySettingPlugin.LDAPNamespaceChangeListener
-
Field Summary
Fields Modifier and Type Field Description static StringADMIN_PERMISSION_VALUEstatic StringALLOW_QUEUE_ADMIN_ON_READstatic StringAUTHENTICATIONstatic StringCONNECTION_PASSWORDstatic StringCONNECTION_PROTOCOLstatic StringCONNECTION_URLstatic StringCONNECTION_USERNAMEstatic StringDESTINATION_BASEstatic StringENABLE_LISTENERstatic StringFILTERstatic StringINITIAL_CONTEXT_FACTORYstatic StringMAP_ADMIN_TO_MANAGEstatic StringREAD_PERMISSION_VALUEstatic StringROLE_ATTRIBUTEstatic StringWRITE_PERMISSION_VALUE
-
Constructor Summary
Constructors Constructor Description LegacyLDAPSecuritySettingPlugin()
-
Method Summary
-
-
-
Field Detail
-
INITIAL_CONTEXT_FACTORY
public static final String INITIAL_CONTEXT_FACTORY
- See Also:
- Constant Field Values
-
CONNECTION_URL
public static final String CONNECTION_URL
- See Also:
- Constant Field Values
-
CONNECTION_USERNAME
public static final String CONNECTION_USERNAME
- See Also:
- Constant Field Values
-
CONNECTION_PASSWORD
public static final String CONNECTION_PASSWORD
- See Also:
- Constant Field Values
-
CONNECTION_PROTOCOL
public static final String CONNECTION_PROTOCOL
- See Also:
- Constant Field Values
-
AUTHENTICATION
public static final String AUTHENTICATION
- See Also:
- Constant Field Values
-
ROLE_ATTRIBUTE
public static final String ROLE_ATTRIBUTE
- See Also:
- Constant Field Values
-
FILTER
public static final String FILTER
- See Also:
- Constant Field Values
-
DESTINATION_BASE
public static final String DESTINATION_BASE
- See Also:
- Constant Field Values
-
ADMIN_PERMISSION_VALUE
public static final String ADMIN_PERMISSION_VALUE
- See Also:
- Constant Field Values
-
READ_PERMISSION_VALUE
public static final String READ_PERMISSION_VALUE
- See Also:
- Constant Field Values
-
WRITE_PERMISSION_VALUE
public static final String WRITE_PERMISSION_VALUE
- See Also:
- Constant Field Values
-
ENABLE_LISTENER
public static final String ENABLE_LISTENER
- See Also:
- Constant Field Values
-
MAP_ADMIN_TO_MANAGE
public static final String MAP_ADMIN_TO_MANAGE
- See Also:
- Constant Field Values
-
ALLOW_QUEUE_ADMIN_ON_READ
public static final String ALLOW_QUEUE_ADMIN_ON_READ
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public LegacyLDAPSecuritySettingPlugin init(Map<String,String> options)
Description copied from interface:SecuritySettingPluginInitialize the plugin with the given configuration options. This method is called by the broker when the file-based configuration is read (seeorg.apache.activemq.artemis.core.deployers.impl.FileConfigurationParser#parseSecurity(org.w3c.dom.Element, org.apache.activemq.artemis.core.config.Configuration). If you're creating/configuring the plugin programmatically then the recommended approach is to simply use the plugin's getters/setters rather than this method.- Specified by:
initin interfaceSecuritySettingPlugin- Parameters:
options- name/value pairs used to configure the SecuritySettingPlugin instance- Returns:
thisinstance
-
getRoleAttribute
public String getRoleAttribute()
-
setRoleAttribute
public SecuritySettingPlugin setRoleAttribute(String roleAttribute)
-
getFilter
public String getFilter()
-
setFilter
public LegacyLDAPSecuritySettingPlugin setFilter(String filter)
-
getDestinationBase
public String getDestinationBase()
-
setDestinationBase
public LegacyLDAPSecuritySettingPlugin setDestinationBase(String destinationBase)
-
getAuthentication
public String getAuthentication()
-
setAuthentication
public LegacyLDAPSecuritySettingPlugin setAuthentication(String authentication)
-
getConnectionPassword
public String getConnectionPassword()
-
setConnectionPassword
public LegacyLDAPSecuritySettingPlugin setConnectionPassword(String connectionPassword)
-
getConnectionProtocol
public String getConnectionProtocol()
-
setConnectionProtocol
public LegacyLDAPSecuritySettingPlugin setConnectionProtocol(String connectionProtocol)
-
getConnectionURL
public String getConnectionURL()
-
setConnectionURL
public LegacyLDAPSecuritySettingPlugin setConnectionURL(String connectionURL)
-
getConnectionUsername
public String getConnectionUsername()
-
setConnectionUsername
public LegacyLDAPSecuritySettingPlugin setConnectionUsername(String connectionUsername)
-
getInitialContextFactory
public String getInitialContextFactory()
-
getAdminPermissionValue
public String getAdminPermissionValue()
-
setAdminPermissionValue
public LegacyLDAPSecuritySettingPlugin setAdminPermissionValue(String adminPermissionValue)
-
getReadPermissionValue
public String getReadPermissionValue()
-
setReadPermissionValue
public LegacyLDAPSecuritySettingPlugin setReadPermissionValue(String readPermissionValue)
-
getWritePermissionValue
public String getWritePermissionValue()
-
setWritePermissionValue
public LegacyLDAPSecuritySettingPlugin setWritePermissionValue(String writePermissionValue)
-
setInitialContextFactory
public LegacyLDAPSecuritySettingPlugin setInitialContextFactory(String initialContextFactory)
-
isEnableListener
public boolean isEnableListener()
-
setEnableListener
public LegacyLDAPSecuritySettingPlugin setEnableListener(boolean enableListener)
-
isMapAdminToManage
public boolean isMapAdminToManage()
-
setMapAdminToManage
public LegacyLDAPSecuritySettingPlugin setMapAdminToManage(boolean mapAdminToManage)
-
isAllowQueueAdminOnRead
public boolean isAllowQueueAdminOnRead()
-
setAllowQueueAdminOnRead
public LegacyLDAPSecuritySettingPlugin setAllowQueueAdminOnRead(boolean allowQueueAdminOnRead)
-
isContextAlive
protected boolean isContextAlive()
-
open
protected void open() throws NamingException- Throws:
NamingException
-
getSecurityRoles
public Map<String,Set<Role>> getSecurityRoles()
Description copied from interface:SecuritySettingPluginFetch the security role information from the external environment (e.g. file, LDAP, etc.) and return it.- Specified by:
getSecurityRolesin interfaceSecuritySettingPlugin- Returns:
- the Map's key corresponds to the "match" for the security setting and the corresponding value is the set of
org.apache.activemq.artemis.core.security.Roleobjects defining the appropriate authorization
-
setSecurityRepository
public void setSecurityRepository(HierarchicalRepository<Set<Role>> securityRepository)
Description copied from interface:SecuritySettingPluginThis method is called by the broker during the start-up process. It's for plugins that might need to modify the security settings during runtime (e.g. LDAP plugin that uses a listener to receive updates, etc.). Any changes made to thisHierarchicalRepositorywill be reflected in the broker.- Specified by:
setSecurityRepositoryin interfaceSecuritySettingPlugin
-
stop
public SecuritySettingPlugin stop()
Description copied from interface:SecuritySettingPluginClean up all the associated resources associated with this plugin (e.g. LDAP connections, file handles, etc.)- Specified by:
stopin interfaceSecuritySettingPlugin- Returns:
thisinstance
-
objectAdded
public void objectAdded(NamingEvent namingEvent)
Handler for new policy entries in the directory.- Parameters:
namingEvent- the new entry event that occurred
-
objectRemoved
public void objectRemoved(NamingEvent namingEvent)
Handler for removed policy entries in the directory.- Parameters:
namingEvent- the removed entry event that occurred
-
objectRenamed
public void objectRenamed(NamingEvent namingEvent)
- Parameters:
namingEvent- the renaming entry event that occurred
-
objectChanged
public void objectChanged(NamingEvent namingEvent)
Handler for changed policy entries in the directory.- Parameters:
namingEvent- the changed entry event that occurred
-
namingExceptionThrown
public void namingExceptionThrown(NamingExceptionEvent namingExceptionEvent)
Handler for exception events from the registry.- Parameters:
namingExceptionEvent- the exception event
-
-