Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-84355

Resolve Circular Dependency in order to use a ValidatedTenancyScope for (de)serialization

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2024-01-08, Service Arch 2024-01-22

      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.

            Assignee:
            mathis.bessa@mongodb.com Mathis Bessa (Inactive)
            Reporter:
            mathis.bessa@mongodb.com Mathis Bessa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: