[SERVER-73112] Move NamespaceString constructors private Created: 19/Jan/23  Updated: 29/Oct/23  Resolved: 29/Mar/23

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

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

Issue Links:
Depends
depends on SERVER-74827 Do not run multitenancy_test_authzn.j... Closed
depends on SERVER-74828 Ensure parseResourcePattern creates N... Closed
depends on SERVER-74829 Use tenantId when constructing placeh... Closed
depends on SERVER-74830 Ensure agg and views unit tests that ... Closed
depends on SERVER-74831 Ensure DatabseClonerTest passes tenan... Closed
Duplicate
is duplicated by SERVER-65457 Require tenantId in NamespaceString w... Closed
Problem/Incident
Related
related to SERVER-73834 NamespaceString constants: immortalit... Closed
is related to SERVER-73880 Make DatabaseName constants Closed
Assigned Teams:
Serverless
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-02-06, Server Serverless 2023-02-20, Server Serverless 2023-03-06, Server Serverless 2023-03-20, Server Serverless 2023-04-03
Participants:
Linked BF Score: 152
Story Points: 8

 Description   

In order to enforce the correct behavior every time we construct a NamespaceString, we need to check global options. We must check these options from outside the NSS class itself, so we'll privatize the constructors and enforce construction through NamespaceStringUtil (which will need to be a friend class). There are some places that we construct an NSS today that are not yet ready for the behavior checks to be enforced, specifically some parts of the auth system. We may need to create specific functions to allow these to be constructed for now, and leave TODOs to remove those functions in the future.



 Comments   
Comment by Githook User [ 29/Mar/23 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-73112 Make NamespaceString constructors private
Branch: master
https://github.com/mongodb/mongo/commit/4326f194dcd67e1053e7e57dae003831aacc5f2c

Comment by Githook User [ 26/Feb/23 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-73112 Avoid constructing global namespaces directly
Branch: master
https://github.com/mongodb/mongo/commit/728500f59d1a6be4fd95b8ffa7d3c7dd122b25be

Comment by Githook User [ 08/Feb/23 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-73112 Expose function to construct NamespaceString in unit tests
Branch: master
https://github.com/mongodb/mongo/commit/567bcd0e4822d726aea15f0338c89c49de2a56b5

Comment by Githook User [ 02/Feb/23 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-73112 Create function to construct system.views namespace
Branch: master
https://github.com/mongodb/mongo/commit/0a57474bc1b4fad893ebd9a4b63d03d0e7380da8

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