You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by stsc <st...@emtnordic.com> on 2015/03/03 10:50:26 UTC
REST API authentication problems
Hi I'm using Apache Active MQ 5.11.1 / Java 1.8.0 u31
I can't get the authentication on the REST API to work with anything else
than admin:admin. 4 small tests illustrates the problem.
Test 1: (add message to topic with admin user, default password)
Active MQ out of the box:
Run:
curl -u *admin:admin* -d "body=message"
http://localhost:8161/api/message/STOCKS/JAVA?type=topic
Result (as expected):
topic STOCKS.JAVA created, with 1 message pending
Test 2: (add message to topic with admin user, wrong password)
Same setup as test 1
Run:
curl -u *admin:adminx* -d "body=message"
http://localhost:8161/api/message/STOCKS/JAVA?type=topic
Result (as expected):
Http error 401
Test 3: (add message to topic with admin user, changed password)
Change password in conf/user.properties: admin=adminx
Run:
curl -u *admin:adminx* -d "body=message"
http://localhost:8161/api/message/STOCKS/JAVA?type=topic
Result (not as expected):
Http error 401
Test 4: (add message to topic with admin user, default password)
Same setup as test 3
Run:
curl -u *admin:admin* -d "body=message"
http://localhost:8161/api/message/STOCKS/JAVA?type=topic
Result (as expected - but why when test 3 fails...):
Http error 401
Any ideas?
--
View this message in context: http://activemq.2283324.n4.nabble.com/REST-API-authentication-problems-tp4692334.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: REST API authentication problems
Posted by stsc <st...@emtnordic.com>.
Well, the answer may be obvious: Both Jetty (for the REST API) and Active MQ
do authentication, so the password needs to be changed both for Active MQ
(in conf/user.properties) *AND* in the Jetty Realm
(conf/jetty-realm.properties).
--
View this message in context: http://activemq.2283324.n4.nabble.com/REST-API-authentication-problems-tp4692334p4692349.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.