Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCRAM-SHA-1 auth mechanism is only supported in single mongod instance, not yet in replication set instances. #69

Closed
ceshannon opened this issue May 3, 2015 · 7 comments

Comments

@ceshannon
Copy link

When I test SCRAM-SHA-1 auth mechanism in single mongod instance, it seems everything goes well. But when I setup a replica set cluster and connect one member in the cluster, it report "not authorized on xxx collection to execute command xxx" when I issue a COUNT command.

@comtihon
Copy link
Owner

I'll check it.

@wcreek
Copy link

wcreek commented Jun 12, 2015

I'm experiencing the same issue:
** exception error: {bad_query,{'$err',<<"not authorized for query on ppns2.apps">>,
code,13}}
in function mc_connection_man:process_error/2 (src/connection/mc_connection_man.erl, line 57)
in call from mc_action_man:read_one/2 (src/core/mc_action_man.erl, line 22)

@comtihon
Copy link
Owner

Could you please try mongodb java driver with your configuration?

@wcreek
Copy link

wcreek commented Jun 14, 2015

I'm using it with a Ruby driver 2.0.5 and it works fine:
DEBUG -- : MONGODB | COMMAND | namespace=ppns2.$cmd selector={:saslStart=>1, :autoAuthorize=>1, :payload=><BSON::Binary:0x70222595582220 type=generic data=n,,n=wri...>, :mechanism=>"SCRAM-SHA-1"} flags=[] limit=-1 skip=0 project=nil

@alttagil
Copy link
Contributor

It seems that I hit all the walls. I try to insert some data to collection to the replica set of mongod 3 and I get

mongo:insert(Conn3, <<"aux">>, bson:document( Data )).
** exception error: {bad_query,{write_failure,13,
<<"not authorized for insert on mi-aux.aux">>}}
in function mc_connection_man:process_error/2 (src/connection/mc_connection_man.erl, line 56)
in call from mongo:insert/3 (src/api/mongo.erl, line 86)
in call from mongo:insert/3 (src/api/mongo.erl, line 83)

@comtihon
Copy link
Owner

For now I advice you to use 2.6 auth in 3 mongo set. I have lack of time, so I can't fix it immediately.

@comtihon
Copy link
Owner

fixed in #82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants