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

Remove boost::none default for RP::forAnyNormalResource() calls

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Security 2023-06-26

      Currently, the `ResourcePattern::forAnyNormalResource()` API provides a default argument value of `boost::none` for its tenantId parameter.  This must be removed as a default and all callsites must be updated to provide an appropriate tenantId based on their local context.  This will usually come from a NamespaceString or DatabaseName being active examined.

      For example, here: the privilege check is relative to the `dbname` extracted from the `request` object, so we'd change the call to:  `ResourcePattern::forAnyNormalResource(dbname.tenantId())`. 

            Assignee:
            gabriel.marks@mongodb.com Gabriel Marks
            Reporter:
            sara.golemon@mongodb.com Sara Golemon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: