[SERVER-74896] Remove NamespaceString::createNamespaceStringForAuth Created: 15/Mar/23  Updated: 29/Oct/23  Resolved: 14/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Gabriel Marks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-80635 Use AuthPrevalidated for auth-specif... Closed
Related
related to SERVER-81087 Complete TODO listed in SERVER-74896 Closed
is related to SERVER-76294 Remove DatabaseName::createDatabaseNa... Closed
Assigned Teams:
Server Security
Backwards Compatibility: Fully Compatible
Sprint: Security 2023-08-07, Security 2023-08-21, Security 2023-09-04, Security 2023-09-18
Participants:

 Description   

Once the ResourcePattern and ParsedPrivilege APIs handle tenantIds, change any remaining call sites to NamespaceString::createNamespaceStringForAuth to call the appropriate method on NamespaceStringUtil to construct NamespaceStrings instead. Then, remove NamespaceString::createNamespaceStringForAuth, as it skips validation that tenantIds exist when they should.

Note that the current model for db-only resource patterns includes the db.coll delimiter.  In order to more accurately match the `NamespaceString(const DatabaseName&)` constructor's behavior, we should move auth usages of dbonly patterns to not include the delimiter.  This will require careful review of AuthorizationSessionImpl and UserManagementCommands.



 Comments   
Comment by Githook User [ 15/Sep/23 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-74896 Remove createNamespaceStringForAuth and serializeForAuth
Branch: master
https://github.com/mongodb/mongo/commit/2a364ecf02156bc3e4b2c6380a96a7414031a188

Generated at Thu Feb 08 06:28:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.