[SERVER-37520] "too many users are authenticated" after getSiblingDB() and auth() Created: 09/Oct/18 Updated: 09/Oct/18 Resolved: 09/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.0.1, 4.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Daniel Smedegaard Buus [X] | Assignee: | Nick Brewer |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | This is how I fare with MongoDB 4.0: ~$ mongo mongodb://daniel:mahpass@127.0.0.1:27017/admin }}) |
||||||||
| Participants: | |||||||||
| Description |
|
With MongoDB versions 4 (4.0.1 and 4.0.2 tested), I cannot switch to another db, authenticate, and operate with that db. In MongoDB 3.6, I can successfully do this: ~$ mongo mongodb://daniel:mahpass@127.0.0.1:27017/admin }}) }} > My user was created on the admin database first, with "dbOwner" and "userAdminAnyDatabase" rights, and then on the "mother" database with "dbOwner" rights. In other words, these are two different users, one on each db. Googling the error, I only get four hits, one in Chinese, and the remaining I cannot see how are related. I've searched through the 4.0 changes, and cannot find any documented change that would cause this restriction — if indeed it is a restriction? Maybe this isn't a bug, and it's just me misbehaving? Thanks Daniel |
| Comments |
| Comment by Nick Brewer [ 09/Oct/18 ] |
|
Daniel Smedegaard Buus This behavior is indeed expected - by design, logical sessions cannot have more than one user authenticated on a single connection. The fix to prevent this behavior is detailed here: This change will make it into the 3.6 branch in version 3.6.9. -Nick |
| Comment by Daniel Smedegaard Buus [X] [ 09/Oct/18 ] |
|
This may be worth noting. I get the same error even if not accessing the sibling db: MongoDB shell version v4.0.2 : |
| Comment by Daniel Smedegaard Buus [X] [ 09/Oct/18 ] |
|
And here's the other one: ~$ mongo mongodb://daniel:mahpass@127.0.0.1:27017/admin > |
| Comment by Daniel Smedegaard Buus [X] [ 09/Oct/18 ] |
|
Okay, there's something wrong with the editor here — my "preformatted" text is clearly converted to randomness. Also, I don't see an edit link here, so I'm adding comment instead. Here's the first block that I tried to preformat: ~$ mongo mongodb://daniel:mahpass@127.0.0.1:27017/admin > |