You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (Jira)" <ji...@apache.org> on 2022/06/27 13:28:00 UTC

[jira] [Comment Edited] (PROTON-2561) User/Pass connection to ActiveMQ Artemis from Ruby doesn't work

    [ https://issues.apache.org/jira/browse/PROTON-2561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17559166#comment-17559166 ] 

Justin Ross edited comment on PROTON-2561 at 6/27/22 1:27 PM:
--------------------------------------------------------------

This worked for me with Artemis:
{code:java}
container.connect(@conn_url, {:user => "alice", :password => "secret", :sasl_allow_insecure_mechs => true})
{code}
If you are not connecting over TLS (or some other secure transport), the Ruby client won't let you send a password on the wire.  The "sasl_allow_insecure_mechs" option overrides it.

 


was (Author: justi9):
This worked for me with Artemis:

 
{code:java}
container.connect(@conn_url, {:user => "alice", :password => "secret", :sasl_allow_insecure_mechs => true})
{code}
If you are not connecting over TLS (or some other secure transport), the Ruby client won't let you send a password on the wire.  The "sasl_allow_insecure_mechs" option overrides it.

 

> User/Pass connection to ActiveMQ Artemis from Ruby doesn't work
> ---------------------------------------------------------------
>
>                 Key: PROTON-2561
>                 URL: https://issues.apache.org/jira/browse/PROTON-2561
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: ruby-binding
>    Affects Versions: proton-c-0.36.0, proton-c-0.37.0
>         Environment: MacOS, Ubuntu
>            Reporter: Alexandr Kovalenko
>            Assignee: Alan Conway
>            Priority: Minor
>
> ActiveMQ Artemis 2.22.0
> File {{login.config}} contains:
> {code:java}
> activemq {
>    org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule sufficient
>        debug=false
>        reload=true
>        org.apache.activemq.jaas.properties.user="artemis-users.properties"
>        org.apache.activemq.jaas.properties.role="artemis-roles.properties";
> };{code}
> Ruby {{helloworld.rb}}
> Set user/pass connection in the past line of code
> {code:java}
> Qpid::Proton::Container.new(HelloWorld.new('amqp://artemis:artemis@localhost:5672', 'examples')).run{code}
> The message isn't sent and i see in the Artemis's logs:
> {code:java}
>  2022-06-13 12:07:09,253 WARN  [org.apache.activemq.artemis.core.server] AMQ222216: Security problem while authenticating: AMQ229031: Unable to validate user from /172.19.0.1:59864. Username: null; SSL certificate subject DN: unavailable
> artemis_1  | 2022-06-13 12:07:09,254 WARN  [org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext] AMQ229031: Unable to validate user from /172.19.0.1:59864. Username: null; SSL certificate subject DN: unavailable: ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ229031: Unable to validate user from /172.19.0.1:59864. Username: null; SSL certificate subject DN: unavailable]{code}
> So Artemis says that it receives username {*}null{*}.
> ----
> If i try to do the same in Python example - it works correct.
> Python {{helloworld.py}}
> Set user/pass connection in the past line of code
> {code:java}
> Container(HelloWorld("amqp://artemis:artemis@localhost:5672", "examples")).run(){code}
> As a result - the message sent and in Artemis's logs all is ok:
> {code:java}
> artemis_1  | 2022-06-13 11:46:30,860 INFO  [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841000: created connection: org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection@151ad103
> artemis_1  | 2022-06-13 11:46:30,970 INFO  [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841010: routed message with ID: 8589934599, result: NO_BINDINGS
> artemis_1  | 2022-06-13 11:46:30,972 INFO  [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841002: created session name: 778f929c-eb0e-11ec-8863-0242ac130002, session connectionID: 933989dd
> artemis_1  | 2022-06-13 11:46:30,990 INFO  [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841010: routed message with ID: 8589934600, result: NO_BINDINGS
> artemis_1  | 2022-06-13 11:46:30,992 INFO  [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841003: closed session with session name: 778f929c-eb0e-11ec-8863-0242ac130002, failed: false
> artemis_1  | 2022-06-13 11:46:30,993 INFO  [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841001: destroyed connection: org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection@151ad103{code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org