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

Pass serialization context into agg parseFromBSON from auth

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Serverless 2023-09-18

      checkAuthForCreateOrModifyView calls aggregation_request_helper::parseFromBSON without a serialization context, which can cause us failure in passing the serialization flags from the original request to the aggregation request.  checkAuthForCreateOrModifyView is accessed via a regular db command and as a sharded command, the latter of which is out of scope.

      checkAuthForCreateOrModifyView
          checkAuthForCreate
              CmdCreate::Invocation::doCheckAuthorization
              CreateCmd::Invocation::doCheckAuthorization    <-- sharded
          checkAuthForCollMod
              ShardsvrCollModCommand::checkAuthForOperation  <-- sharded
              CollectionModCmd::checkAuthForOperation        <-- sharded

      Where we have access to the original request, we should use the serialization context from that.  Otherwise, we can pass in a default serialization context for sharded calls.

            Assignee:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Reporter:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: