[SERVER-40315] Fix SASL mechanism acquisition in tests for __system user Created: 22/Mar/19  Updated: 29/Oct/23  Resolved: 08/May/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1.11

Type: Bug Priority: Major - P3
Reporter: Shreyas Kalyan Assignee: Spencer Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2019-04-22, Security 2019-05-06, Security 2019-05-20
Participants:
Linked BF Score: 13

 Description   

In our tests, we rely on the fact that when accessing a mongos as the `__system` user, we have to connect to the admin database. However, we don't account for this in the authorization manager code for acquire user.

 

```
StatusWith<UserHandle> AuthorizationManagerImpl::acquireUser(OperationContext* opCtx,
const UserName& userName){
if(userName == internalSecurity.user->getName())

{ return internalSecurity.user; }

```



 Comments   
Comment by Githook User [ 08/May/19 ]

Author:

{'email': 'spencer.jackson@mongodb.com', 'name': 'Spencer Jackson', 'username': 'spencerjackson'}

Message: SERVER-40315 Fix SASL mechanism acquisition for __system in tests
Branch: master
https://github.com/mongodb/mongo/commit/aa4743c301bea04b7b14ee125e14bd850f8b44e5

Generated at Thu Feb 08 04:54:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.