mgob icon indicating copy to clipboard operation
mgob copied to clipboard

Authenticatoin fails if password contains special symbols

Open lostintime opened this issue 4 years ago • 5 comments

Hello and Thanks for this great tool,

Today I've tried mgob with a mongodb instance using SCRAM-SHA-1 authentication and it was failing with:

time="2020-03-04T14:31:57Z" level=error msg="On demand backup failed mongodump log 2020-03-04T14:31:57.910+0000\tFailed: can't create session: could not connect to server: connection() : auth error: sasl conversation error: unable to authenticate using mechanism \"SCRAM-SHA-1\": (AuthenticationFailed) Authentication failed. : exit status 1" plan=all

I figured out this to be caused by password containing some special symbols: +-[>[. mongodump from docker container was working properly using same password, probably passwod is not encoded in a proper way while passed from mgob to mongodump, after changing password to alpha only - it worked.

lostintime avatar Mar 04 '20 15:03 lostintime

Any idea to make this work? this is a bummer.

cedricve avatar Apr 30 '20 17:04 cedricve

Any idea to make this work? this is a bummer.

I just used a "safe" password, and did not investigate further

lostintime avatar Apr 30 '20 18:04 lostintime

Just found out that by defining this option params: "--authenticationDatabase admin" it works as expected.

cedricve avatar Apr 30 '20 18:04 cedricve

Just found out that by defining this option params: "--authenticationDatabase admin" it works as expected.

Works like a charm!

atline avatar Nov 11 '20 07:11 atline

Just found out that by defining this option params: "--authenticationDatabase admin" it works as expected.

Thnx worked for me too

seifolah-ghaderi avatar Oct 18 '21 18:10 seifolah-ghaderi