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

[CQF] findAndModify/update with $where clause fails with authorization error

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • QO 2022-10-03

    Description

      This bug is specific to the new optimizer Bonsai. For a test like this one, the server asserts with the following errmsg:

      "Authorization Session contains more authorization checks then permitted by contract.",
      

      After a brief investigation, the callstack looks like we're building the WhereMatchExpression which holds a JsFunction. The JsFunction loads the stored functions which reads from the system.js collection (find command) and eventually causes the assertion. It could be that the existing translation through aggregate is causing issues with auth and translating directly from the find command would fix this.

      Attachments

        Activity

          People

            hana.pearlman@mongodb.com Hana Pearlman
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: