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

Pass serialization context into agg parseFromBSON from auth

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Server Serverless 2023-09-18

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: