Hello,

I followed a tutorial online to implement a custom JAAS-based login module
for ActiveMQ.

Steps:

1) Make the jar, which contains MyCustomLoginModule.class, and copy it into
apache-activemq-5.10.0/lib/

2) Add this to activemq.xml:

...
         <plugins>
                <jaasAuthenticationPlugin
configuration="MyCustomLoginModule"/>
         </plugins>
</broker>

3) Add this to login.config:

MyCustomLoginModule {
     com.my.custom.MyCustomLoginModule required;
};

Result:

When I fire up ActiveMQ, there's no suggestion of my custom module having
been loaded correctly. Additionally, when I try to connect to the broker, I
get the following output:

2015-02-04 16:11:13,588 | WARN  | Failed to add Connection
ID:ip-10-0-1-61-51705-1423066260871-2:9 |
org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
tcp:///<connecting_ip>@1883
java.lang.SecurityException: User name [user1] or password is invalid.
        at
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:80)[activemq-broker-5.10.0.jar:5.10.0]
        at org.apache.activemq.broker.MutableBrok...

Basically, it appears that a different login module is being used, not the
custom one I specify.

When I remove this from activemq.xml, I can connect without a
username/password.

<plugins>
                <jaasAuthenticationPlugin
configuration="MyCustomLoginModule"/>
 </plugins>

Any help is appreciated.

Thanks,
Sevag



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Custom-Jaas-Plug-in-tp4691055.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to