title: How does MongoDB store user passwords
body: <p>When I query the collection storing users in a MongoDB database I get a document like this</p>
  
  <p><code>{
    "_id": "admin.123",
    "user": "123",
    "db": "admin",
    "credentials": {
      "SCRAM-SHA-1": {
        "iterationCount": 10000,
        "salt": "f9SdPCCcBOwk71/xDkj6Sw==",
        "storedKey": "83mNhTYctOdlYsL1sbnfpiA0uxw=",
        "serverKey": "09H9aEKKufaoCDxqUkHntx6EqrE="
      }
    },
    "roles": []
  }</code></p>
  
  <ul>
  <li><p>How is this data used to authenticate a user? I get the salt is
  stored in base64 and iterationCount is the amount of times it is
  concatenated to itself but what do both key fields represent?</p></li>
  <li><p>Is this information even publicly available as I couldn't find
  anything in the docs?</p></li>
  </ul>