# test before adding user
$ bin/artemis producer --user myuser --password mypassword --url tcp:Connection failed::AMQ229031: Unable to validate user from /127.0.0.1:40966. Username: myuser; SSL certificate subject DN: unavailable
# create anycast address FOO
curl -k --user admin:admin -H "Origin: http: "http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22/createAddress(java.lang.String,java.lang.String)/FOO/ANYCAST"
# create security settings for address FOO
curl -k --user admin:admin -H "Origin: http: "http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22/addSecuritySettings(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)/FOO/myrole/myrole/myrole/myrole/myrole/myrole/myrole"
# create user 'myuser' with password 'mypassword'
curl -k --user admin:admin -H "Origin: http: "http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22/addUser(java.lang.String,java.lang.String,java.lang.String,boolean)/myuser/mypassword//false"
# add role 'myrole' to 'myuser'
curl -k --user admin:admin --user admin:admin -H "Origin: http: "http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22/resetUser(java.lang.String,java.lang.String,java.lang.String)/myuser/mypassword/myrole"
# check roles
curl -k --user admin:admin --user admin:admin -H "Origin: http: "http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=%220.0.0.0%22/getRoles(java.lang.String)/FOO"
# re-test
$ bin/artemis producer --user myuser --password mypassword --url tcp:
# restart broker
# re-test
$ bin/artemis producer --user myuser --password mypassword --url tcp: