You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (JIRA)" <ji...@apache.org> on 2017/02/21 17:14:44 UTC
[jira] [Commented] (ARTEMIS-984) i don't succeed in connecting with
a new user to my broker
[ https://issues.apache.org/jira/browse/ARTEMIS-984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876306#comment-15876306 ]
Justin Bertram commented on ARTEMIS-984:
----------------------------------------
In your code you're specifying "CommerceUser" as the username:
{code:java}
mqtt.setUserName("CommerceUser");
{code}
However, in your artemis-user.properties and artemis-roles.properties files you are using "CommerceDN" as the username. Clearly these are different. Can you trying using the same value in all places?
> i don't succeed in connecting with a new user to my broker
> -----------------------------------------------------------
>
> Key: ARTEMIS-984
> URL: https://issues.apache.org/jira/browse/ARTEMIS-984
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 1.5.2
> Reporter: REGINA Patrick
> Priority: Trivial
>
> i'm using the org.fusesource.mqtt.client and i try to connect to my broker with the user i just created. But it doesn't work.
> i used the command below to create a user with the role Commerce :
> ./artemis user add
> Then in my broker file i have :
> <security-setting match="digital.paas.expertise.data">
> <permission type="createNonDurableQueue" roles="Commerce"/>
> <permission type="deleteNonDurableQueue" roles="Commerce"/>
> <permission type="createDurableQueue" roles="Commerce"/>
> <permission type="deleteDurableQueue" roles="Commerce"/>
> <permission type="consume" roles="Commerce"/>
> <permission type="browse" roles="Commerce"/>
> <permission type="send" roles="Commerce"/>
> <!-- we need this otherwise ./artemis data imp wouldn't work -->
> <permission type="manage" roles="Commerce"/>
> </security-setting>
> Then i tried to connect :
> System.out.println("Connecting to Artemis using MQTT");
> MQTT mqtt = new MQTT();
>
> mqtt.setUserName("CommerceUser");
> mqtt.setPassword("password");
>
>
> mqtt.setHost("ssl://myServer:1883");
>
> BlockingConnection connection = mqtt.blockingConnection();
> connection.connect();
> System.out.println("Connected to Artemis");
> but the code is block to connection.connect(); .
> if i change the user wiht the original user created with the broker it works fine.
> Ca you help me ?
> in my artemis-user.properties :
> Administrator = ENC(1024:02D41AC74166D1184F86ECD12EDA1AD999D6EDC46C4EE18D424C9C825F23777F:F4A471DCA21FE41E52BC48EC28235E2BF3BAA645757061B440C272426E8A34C57366837441FBF93D419BF343F055944DBA613580BFF7AEBC7A237A1D95933291)
> CommerceDN = ENC(1024:7DB89C83F5E1A21E0461C8F9A46FF4619F72F3DF526EE4D0B3BBD53594F7AEC8:29D876E9BA466BBFA26D8CFC25E4AF06E4D1F5B31D16C59A8A176F594D7A9E3FE3D9BC022BA1DA9F248CC30FC9D58E16A17BDC7B46B9969FD77E05290BA1F4F7)
> in my artemis-roles.properties:
> digital = Administrator
> Commerce = CommerceDN
> in my login.config :
> activemq {
> org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule required
> debug=false
> org.apache.activemq.jaas.properties.user="artemis-users.properties"
> org.apache.activemq.jaas.properties.role="artemis-roles.properties";
> };
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)