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

FLE2 find does not work on secondaries

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Server Security
    • ALL

      When a client sends a find command on an FLE2 encrypted collection directly to a secondary (e.g by way of readPreference {mode: "secondary"} ), the server always returns the error code NotPrimaryNoSecondaryOk with error message "not master and slaveOk=false". Cursory debugging reveals that this error happens on a count command; and occurs when rewriteQuery() starts an internal transaction that calls queryImpl->countDocuments() here.

            Assignee:
            backlog-server-security [DO NOT USE] Backlog - Security Team
            Reporter:
            erwin.pe@mongodb.com Erwin Pe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: