[SERVER-9226] Cannot authenticate in 2.4.1 Created: 03/Apr/13 Updated: 10/Dec/14 Resolved: 03/Apr/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security |
| Affects Version/s: | 2.4.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Donald Dumais | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
UNIX Deb |
||
| Operating System: | Linux |
| Steps To Reproduce: | 1. Start first set of core mongod nodes using auth and keyFile: 2. Setup replica set s1: , {"_id" : 1, "host" : "localhost:37018"}, {"_id" : 2, "host" : "localhost:37019"}] 3. Start second set of core mongod nodes using auth and keyFile: 4. Setup replica set s2: , {"_id" : 1, "host" : "localhost:47018"}, {"_id" : 2, "host" : "localhost:47019"}] 5. Start config servers using --auth and --keyFile: 6. Start mongos process: 7. Add shards: ); ); 8. Switch to use admin database: 9. Add user (I try to add an admin user with full access for testing purposes): ); 10. Attempt to log in as the user I just created. This is where the problem seems to be, mongo will not authenticate the user and returns an error " } |
| Participants: |
| Description |
|
I cannot log into mongos (authenticate) after creating a user. |
| Comments |
| Comment by Donald Dumais [ 03/Apr/13 ] |
|
Did not realize mongos had to be started with keyFile. That was that the issue, I am now able to authenticate the user. As a side note, an earlier attempted to start the mongos with --keyFile and --auth failed, instead of excluding the --auth parameter, I inadvertently excluded both keyFile and auth parameters. Thank you. |
| Comment by Spencer Brody (Inactive) [ 03/Apr/13 ] |
|
From the command lines you posted, it doesn't look like you started mongos with --keyFile. All components of the sharded system, including all mongoses, need to be started with identical keyFiles. Can you try adding the keyFile to mongos and see if that fixes things for you? |