[GODRIVER-1033] Authenticated connection does not have permissions to execute replSetGetStatus Created: 09/May/19 Updated: 17/Jun/19 Resolved: 17/Jun/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Authentication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jonathan Balsano | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
I'm working on a project that automates MongoDB deployments and then attempts to connect to them to check their status using the replSetGetStatus command. In this particular case the code running in a separate goroutine is:
The goroutine that concerns me is the code below, and results in two very strange symptoms:
The code (taken out of context)
The above code succeeds if I uncomment the sleep, which leads me to believe I'm catching an intermediary state in MongoDB that is unhandled. My major concern here is that the go driver doesn't let me know that authentication has failed at any point, the only thing it does tell me is that I'm not authorized to execute the command I'm trying to execute, and that my connection has no users nor roles associated with it. Additionally, I've confirmed behavior is not what I'm currently getting if:
Because of this, I've worked around this issue by checking connectionStatus for a lack of users/roles and using that to decide whether my connection has been successful. But, given that I've provided authentication credentials I'd expect either a different kind of failure from the runCommand command or for connect to fail altogether. I'm not sure how to help reproduce this issue further but if anyone on the team wants me to reproduce it for them I can consistently do so. I'm also happy to use a modified version of the go driver to get finer grained debugging output. |
| Comments |
| Comment by Jonathan Balsano [ 17/Jun/19 ] | |
|
Investigated and yes it looks like this was a duplicate of | |
| Comment by Jonathan Balsano [ 13/Jun/19 ] | |
|
esha.bhargava I haven't had a chance to investigate this issue but it's possible it still exists. Can we leave this open until then? | |
| Comment by Jonathan Balsano [ 29/May/19 ] | |
|
jeff.yemin I don't believe so, but will be investigating to see if the solution in | |
| Comment by Jeffrey Yemin [ 29/May/19 ] | |
|
jonathan.balsano is this related (or a duplicate of) | |
| Comment by Jonathan Balsano [ 23/May/19 ] | |
|
Some updates:
| |
| Comment by Jonathan Balsano [ 21/May/19 ] | |
|
Hey there! Looping back here to make this ticket a little more clear to what the actual problem was. I was very in the weeds when I wrote it, so adding a little more context to highlight the problem. |