0
# Security Integration
1
2
ActiveMQ provides comprehensive security features through JAAS and Apache Shiro integration for authentication and authorization in enterprise environments.
3
4
## Capabilities
5
6
### JAAS Authentication
7
8
```java { .api }
9
public class PropertiesLoginModule implements LoginModule {
10
public boolean login() throws LoginException;
11
public boolean commit() throws LoginException;
12
public void initialize(Subject subject, CallbackHandler callbackHandler,
13
Map<String,?> sharedState, Map<String,?> options);
14
}
15
16
public class LDAPLoginModule extends PropertiesLoginModule {
17
public void setConnectionURL(String connectionURL);
18
public void setUserBase(String userBase);
19
public void setRoleBase(String roleBase);
20
}
21
```
22
23
### Apache Shiro Integration
24
25
```java { .api }
26
public class ShiroPlugin implements BrokerPlugin {
27
public Broker installPlugin(Broker broker) throws Exception;
28
public void setIniResourcePath(String iniResourcePath);
29
}
30
31
public class ActiveMQPermissionResolver implements PermissionResolver {
32
public Permission resolvePermission(String permissionString);
33
}
34
```
35
36
### Broker Security
37
38
```java { .api }
39
public interface AuthorizationMap {
40
Set<GroupPrincipal> getAdminACLs(ActiveMQDestination destination);
41
Set<GroupPrincipal> getReadACLs(ActiveMQDestination destination);
42
Set<GroupPrincipal> getWriteACLs(ActiveMQDestination destination);
43
}
44
45
public class SimpleAuthorizationMap implements AuthorizationMap {
46
public void setAdminACLs(Map<ActiveMQDestination, Set<GroupPrincipal>> adminACLs);
47
public void setReadACLs(Map<ActiveMQDestination, Set<GroupPrincipal>> readACLs);
48
public void setWriteACLs(Map<ActiveMQDestination, Set<GroupPrincipal>> writeACLs);
49
}
50
```