Alexandr Kovalenko created PROTON-2561:
------------------------------------------

             Summary: 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.37.0, proton-c-0.36.0
         Environment: MacOS, Ubuntu
            Reporter: Alexandr Kovalenko
            Assignee: Alan Conway


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}
----
If i try to do the same in Python example - it works.

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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to