qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-1532) Undefined method "plain" for SASL in Ruby binding
Date Fri, 11 Aug 2017 12:34:00 GMT

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

ASF GitHub Bot commented on PROTON-1532:
----------------------------------------

GitHub user gberginc opened a pull request:

    https://github.com/apache/qpid-proton/pull/116

    PROTON-1532: Allow insecure mechanism in SASL

    This commit extends SASL with the additional allow_insecure_mechs allowing users to override
the defailt (false) authentication and use the plain mechanism. It also extends the Connection
class to expose user and password that is used by the plain mechanism.
    
    Finally, this patch modifies the connect method which now avoids the use of the plain
method which is not defined on SASL. The code now more resembles the Python version.
    
    This addresses the issue reported in [PROTON-1532](https://issues.apache.org/jira/browse/PROTON-1532)
where I was trying to connect to an ActiveMQ using plain username/password authentication.
Previous code used method `plain` which does not exist.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gberginc/qpid-proton sasl_allow_insecure

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/qpid-proton/pull/116.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #116
    
----
commit e218be1f128f1c7452ca19626577043c46e53651
Author: Gregor Berginc <gregor.berginc@gmail.com>
Date:   2017-08-11T12:00:34Z

    PROTON-1532: Allow insecure mechanism in SASL
    
    This commit extends SASL with the additional allow_insecure_mechs allowing users to override
the defailt (false) authentication and use the plain mechanism. It also extends the Connection
class to expose user and password that is used by the plain mechanism.
    
    Finally, this patch modifies the connect method which now avoids the use of the plain
method which is not defined on SASL. The code now more resembles the Python version.
    
    Signed-off-by: Gregor Berginc <gregor.berginc@gmail.com>

----


> Undefined method "plain" for SASL in Ruby binding
> -------------------------------------------------
>
>                 Key: PROTON-1532
>                 URL: https://issues.apache.org/jira/browse/PROTON-1532
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: ruby-binding
>         Environment: Centos, Ubuntu
>            Reporter: Gregor Berginc
>            Assignee: Alan Conway
>
> When I try to connect to an AMQP endpoint using the URL of the form amqp://user:password@host:port,
I get an error about a missing "plain" method. This occurs in [this line|https://github.com/apache/qpid-proton/blob/master/proton-c/bindings/ruby/lib/reactor/connector.rb#L91].
This error can be reproduced simply using the following code
> {code:ruby}
> 2.3.3 :001 > require "qpid_proton"
>  => true 
> 2.3.3 :002 > transport = Qpid::Proton::Transport.new
>  => #<Qpid::Proton::Transport:0x00000002754548 @impl=#<SWIG::TYPE_p_pn_transport_t:0x00000002754520
@__swigtype__="_p_pn_transport_t", @proton_wrapper=#<Qpid::Proton::Transport:0x00000002754548
...>>> 
> 2.3.3 :003 > sasl = transport.sasl
>  => #<Qpid::Proton::SASL:0x00000002748518 @impl=#<SWIG::TYPE_p_pn_sasl_t:0x000000027484f0
@__swigtype__="_p_pn_sasl_t">> 
> 2.3.3 :004 > sasl.plain('', '')
> NoMethodError: undefined method `plain' for #<Qpid::Proton::SASL:0x00000002748518>
> from (irb):4
> from /usr/share/rvm/rubies/ruby-2.3.3/bin/irb:11:in `<main>'
> {code}
> I have tried in Ubuntu 16.04 installing Proton via system packages and gem 0.10.1 from
Rubygems as well as in Centos 7, following the source code install guide.
> I wonder if this method should be exposed by Swig somehow? Python binding does not use
it in that way, but it does set the username and password on the connection.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message