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

Make ValidatedTenancyScope a required parameter of IDLParseContext

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch
    • Service Arch 2024-02-19, Service Arch 2024-03-04, Service Arch 2024-03-18, Service Arch 2024-04-01, Service Arch 2024-04-15, Service Arch 2024-04-29
    • 4

      In order to ensure that the tenancy scope is always considered when parsing database strings (NamespaceString, DatabaseName), we should improve the IDlParserContext to require a ValidatedTenancyScope parameter. This means we must always have access to an opCtx, or have stashed a ValidatedTenancyScope somewhere convenient, before attempting to parse BSON into an IDL shape. There are valid use cases for not using a ValidatedTenancyScope when parsing, but by making the parameter required we force users to explicitly mark the cases where we don't care about tenant domain while parsing (a good example is in unit tests).

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: