Introduction
ActiveMQ embedded web console is jetty. In enterprise applications, plain http is not recommended. Thus we should enable HTTPS. In my previous blogs, I have demonstrated how to enable nio+ssl for mutual authentication or one-way authentication. In this blog, I am going to show you how to enable HTTPS for the embedded ActiveMQ console.Configuration Changes
The configuration file we need to change is ${AMQ_HOME}/conf/jetty.xml. Uncomment out the bean with id of "SecureConnecor" and remove the id with "Connector" as shown below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <beans> ... <bean id= "Server" depends-on= "jettyPort" class= "org.eclipse.jetty.server.Server" init-method= "start" destroy-method= "stop" > <property name= "connectors" > <list> <bean id= "SecureConnector" class= "org.eclipse.jetty.server.ssl.SslSelectChannelConnector" > <property name= "port" value= "8162" > <property name= "keystore" value= "file:${activemq.conf}/broker.ks" > <property name= "password" value= "amqadmin@" > </property></property></property></bean> </list> </property> <property name= "handler" > <bean id= "handlers" class= "org.eclipse.jetty.server.handler.HandlerCollection" > <property name= "handlers" > <list> <ref bean= "contexts" > <ref bean= "securityHandler" > </ref></ref></list> </property> </bean> </property> </bean> </beans> |
Run The ActiveMQ
Start ActiveMQ the same way as before. Go to brower with URL of https://hostname:8162, use the same user id and password [admin/admin].
No comments:
Post a Comment