Investigate changes in SERVER-102285: Issuing a getMore with a different namespace from find fails on a replica set & succeeds on a sharded cluster

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Won't Do
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      Original Downstream Change Summary

      Harmonize the behavior of getMore when called on a cursor with a wrong namespace: This ticket changes mongos to have the same validateNamespace check as mongod has, returning ErrorCodes::Unauthorized in case the namespace validation fails.

      Description of Linked Ticket

      We have a check on mongod, validateNamespce, that checks whether the user is issuing a getMore against the same namespace than the initial cursor was established on. On mongod, doing this will hit this check and cause a failure. On mongos, we will just look up the cursor and ignore the the provided namespace, and re-write the request with the correct namespace. This isn't an issue security-wise, as we still have an auth check for the read privileges on the mongos, but it is a bit weird from a UX perspective to have different behaviors here.

              Assignee:
              Unassigned
              Reporter:
              Backlog - Core Eng Program Management Team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: