Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-5385

make ebucketmigrator support sasl auth

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1-release-candidate
    • Fix Version/s: 1.8.1
    • Component/s: ns_server
    • Security Level: Public
    • Labels:

      Description

      SUBJ

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        thuan Thuan Nguyen added a comment -

        Integrated in github-ns-server-2-0 #357 (See http://qa.hq.northscale.net/job/github-ns-server-2-0/357/)
        MB-5385: fixed standalone bucketmigrator to support sasl auth (Revision e1bbcb0f2d5f602c777d8472dc9a076fa3631865)
        MB-5385: added support for specifying password on cmdline (Revision da52c53f7d9388330ea0b5a15d4a48204f706ea2)

        Result = SUCCESS
        Aliaksey Kandratsenka :
        Files :

        • src/ebucketmigrator.erl

        Aliaksey Kandratsenka :
        Files :

        • src/ebucketmigrator.erl
        Show
        thuan Thuan Nguyen added a comment - Integrated in github-ns-server-2-0 #357 (See http://qa.hq.northscale.net/job/github-ns-server-2-0/357/ ) MB-5385 : fixed standalone bucketmigrator to support sasl auth (Revision e1bbcb0f2d5f602c777d8472dc9a076fa3631865) MB-5385 : added support for specifying password on cmdline (Revision da52c53f7d9388330ea0b5a15d4a48204f706ea2) Result = SUCCESS Aliaksey Kandratsenka : Files : src/ebucketmigrator.erl Aliaksey Kandratsenka : Files : src/ebucketmigrator.erl
        Hide
        farshid Farshid Ghods (Inactive) added a comment - - edited

        i can agree with you but all our memcached command lines allow the user to pass the password as an argument.

        in any case this is a one time patch i am going to give to the customer so appreciate if you can add the option to read the password from the cli.

        also i noticed that if bucket name is != default and sasl password is empty string ebucketmigrator does not work. in my case i changed the password to be non-empty and after that script worked but not sure if we can ask the customer to also change their password if its empty string

        PATH=/opt/couchbase/bin:$PATH /opt/couchbase/bin/ebucketmigrator -h 10.1.2.31:11210 -A -V -t -b 778 -d 10.1.2.35:11210 -a third -v
        Ignoring "-A" flag
        ...

        Unknown error {'EXIT',<0.57.0>,
        {badmatch,

        {memcached_error,auth_error,<<"Auth failure">>}

        }}

        Show
        farshid Farshid Ghods (Inactive) added a comment - - edited i can agree with you but all our memcached command lines allow the user to pass the password as an argument. in any case this is a one time patch i am going to give to the customer so appreciate if you can add the option to read the password from the cli. also i noticed that if bucket name is != default and sasl password is empty string ebucketmigrator does not work. in my case i changed the password to be non-empty and after that script worked but not sure if we can ask the customer to also change their password if its empty string PATH=/opt/couchbase/bin:$PATH /opt/couchbase/bin/ebucketmigrator -h 10.1.2.31:11210 -A -V -t -b 778 -d 10.1.2.35:11210 -a third -v Ignoring "-A" flag ... Unknown error {'EXIT',<0.57.0>, {badmatch, {memcached_error,auth_error,<<"Auth failure">>} }}
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        Disagree. Its still pretty simple to script. Its kind of insecure to have password on cmdline. Ie it'll be visible to all users of system.

        Let me know however if you insist.

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - Disagree. Its still pretty simple to script. Its kind of insecure to have password on cmdline. Ie it'll be visible to all users of system. Let me know however if you insist.
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        it makes it hard for scripting doesn't it ?
        memcached commands cbstats for instance allows the user to pass the bucket name and password in the command line without having to enter it through stdin

        Show
        farshid Farshid Ghods (Inactive) added a comment - it makes it hard for scripting doesn't it ? memcached commands cbstats for instance allows the user to pass the bucket name and password in the command line without having to enter it through stdin
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        Yes. Note however that password is read from stdin. So you'll need something like

        (auth as admin and then select particular bucket)

        echo _admin | ./ebucketmigrator -a _admin --bucket-name my-bucket

        or

        (auth as user = bucket name that'll automagically select bucket)
        echo | ./ebucketmigrator -a my-bucket

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - Yes. Note however that password is read from stdin. So you'll need something like (auth as admin and then select particular bucket) echo _admin | ./ebucketmigrator -a _admin --bucket-name my-bucket or (auth as user = bucket name that'll automagically select bucket) echo | ./ebucketmigrator -a my-bucket
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        Aliaksey,
        bucket sasl password can also be an empty string ?
        does this change consider that as well ?

        Show
        farshid Farshid Ghods (Inactive) added a comment - Aliaksey, bucket sasl password can also be an empty string ? does this change consider that as well ?
        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - http://review.couchbase.org/16447

          People

          • Assignee:
            alkondratenko Aleksey Kondratenko (Inactive)
            Reporter:
            alkondratenko Aleksey Kondratenko (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes