[SERVER-84355] Resolve Circular Dependency in order to use a ValidatedTenancyScope for (de)serialization Created: 20/Dec/23  Updated: 15/Jan/24  Resolved: 15/Jan/24

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

Type: Task Priority: Major - P3
Reporter: Mathis Bessa Assignee: Mathis Bessa
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-83797 Introduce DatabaseNameUtil (de)serial... In Code Review
is depended on by SERVER-84742 Refactor the ValidatedTenancyScope cl... Closed
is depended on by SERVER-83798 Create a serialization/deserializatio... Needs Scheduling
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2024-01-08, Service Arch 2024-01-22
Participants:

 Description   

In order to replace the use of a SerializationContext we have taken actions into using a ValidatedTenancyScope as our single source of truth in order to serialize / deserialize namespacestring and databasename objects.

As part of the process we are now replacing the use of a SerializationContext when serializing / deserializing a DatabaseName.

In order to achieve that we have to include and link a ValidatedTenancyScope as part of the namespace_string_database_name_util library.

One solution is to cleanup the library dependencies to no longer depend on the namespace_string_database_name_util library and to be able to include the 'security_token' library as part of the utility library. 

The other solution is to create an intermediate data structure (such as ValidatedTenancydata) that will only contain a flag related to the Tenant Protocol (if the operation comes from Atlas proxy or not) and the tenantId associated to it. This information is already on the ValidatedTenancyScope. This would avoid any work to try to refactor all the auth libraries.

See comments for extra details.



 Comments   
Comment by Githook User [ 15/Jan/24 ]

Author:

{'name': 'mathisbessamdb', 'email': '91484595+mathisbessamdb@users.noreply.github.com', 'username': 'mathisbessamdb'}

Message: SERVER-84355 Resolve Circular Dependency in order to use a ValidatedTenancyScope for (de)serialization (#17982)

GitOrigin-RevId: 937056cf742374abe38766b4d15c8547c09af19c
Branch: master
https://github.com/mongodb/mongo/commit/93b4007764553abb70c14f7ba6f45af12846b63c

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