liveBook · Manning

authCheck event

As explained in MongoDB 8.0 in Action, Third Edition

An authCheck event is an audit event recording an attempted database authorization check, including attempts to read or write data.

An authCheck event records a database authorization attempt, including reads and writes that either succeed or fail. It complements authentication events, which record login attempts. section 20.4

Use authCheck auditing with these operational considerations:

  • Audit logs record operations such as aggregate, insert, update, and delete, along with the namespace, command, users, roles, network endpoints, and result. section 20.4
  • MongoDB records failed authorization attempts by default; enable auditAuthorizationSuccess when successful reads and writes must also be investigated. section 20.4
  • Full success logging can generate high log volume and add processing overhead on busy clusters, so enable it only for a clear monitoring need. section 20.4
  • Review events in the Atlas UI or retrieve them through the Atlas API, then combine them with broader monitoring workflows. section 20.4
  • Database auditing is unavailable for M0 and Flex clusters. section 20.4

Reading an authCheck record

A sample event records sampleUser successfully issuing find against sample_training.routes. The JSON includes atype authCheck, timestamp, server and client addresses, the command, result 0, and the user’s readWrite role. section 20.4

{
  "atype": "authCheck",
  "ts": {"$date": "2024-10-28T10:15:30.123Z"},
  "local": {
    "ip": "192.168.1.1",
    "port": 27017
  },
  "remote": {
    "ip": "203.0.113.42",
    "port": 53245
  },
  "param": {
    "ns": "sample_training.routes",
    "command": "find",
    "args": {},
    "result": 0
  },
  "users": [
    {
      "user": "sampleUser",
      "db": "admin"
    }
  ],
  "roles": [
    {
      "role": "readWrite",
      "db": "sample_training"
    }
  ]
}

Inspect the complete JSON event to see how authorization type, timestamp, namespace, command, result, users, roles, and network endpoints are represented. section 20.4

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains event fields, logged operations, default failure-only behavior, success logging, performance costs, and Atlas access paths.
Examples
Uses a sample_training.routes find event and a JSON filter covering authentication plus find, insert, delete, and update operations.
What it assumes
Assumes basic Atlas and MongoDB security familiarity while defining authorization events, authentication events, users, roles, and audit outcomes.
What you can do after
Operate/configure Atlas auditing, inspect authCheck records, and balance successful-access visibility against log volume and performance.
How it connects
Connects database auditing with authentication, encryption, Control Plane auditing, and least-privilege access control.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.