Skip to Content
Unified docs shell with shared Classifyre tokens and acid-green highlight accents.
SourcesMongo DB

Mongo DB

Schema-driven source documentation.

MONGODB41 fields3 examples
Commonly Asked Questions
Assistant knowledge mapped to this source type from assistant_knowledge.json.

Required
Fields required for a valid configuration payload under `config.required`.
PathTypeRequiredDescriptionDefaultConstraints
requiredobjectYes
Masked
Sensitive fields under `config.masked` (secrets/credentials).
PathTypeRequiredDescriptionDefaultConstraints
maskedobjectYes
Optional
Optional configuration fields under `config.optional`.
PathTypeRequiredDescriptionDefaultConstraints
optionalobjectNono extra properties
optional.connectionobjectNoMongoDB connection and authentication tuning options.no extra properties
optional.connection.app_namestringNoMongoDB appName (Atlas and driver telemetry label)
optional.connection.auth_mechanismenumNoMongoDB authentication mechanism Allowed values: DEFAULT, SCRAM-SHA-1, SCRAM-SHA-256, MONGODB-AWS, MONGODB-X509, GSSAPI, PLAIN
optional.connection.auth_sourcestringNoAuthentication database/source (for example, admin)
optional.connection.connect_timeout_msintegerNoMongoDB connection timeout in milliseconds10000min 100, max 120000
optional.connection.direct_connectionbooleanNoConnect directly to a single host instead of topology discovery
optional.connection.optionsobjectNoAdditional pymongo.MongoClient keyword arguments (advanced usage).{}
optional.connection.replica_setstringNoReplica set name for on-prem deployments
optional.connection.tlsbooleanNoEnable TLS for on-prem connections when required
optional.scopeobjectNoMongoDB database and collection selection scope.no extra properties
optional.scope.collection_limitintegerNoOptional cap on number of collections extracted per databasemin 1
optional.scope.databasestringNoSingle database to scan (optional when include_all_databases is true)
optional.scope.exclude_collectionsarrayNoOptional collection denylist. Accepted forms: collection or database.collection
optional.scope.exclude_collections[]stringNo
optional.scope.exclude_databasesarrayNoDatabase denylist (exact database names)["admin","config","local"]
optional.scope.exclude_databases[]stringNo
optional.scope.include_all_databasesbooleanNoScan all visible databases except excluded system databasestrue
optional.scope.include_collectionsarrayNoOptional collection allowlist. Accepted forms: collection or database.collection
optional.scope.include_collections[]stringNo
optional.scope.include_system_collectionsbooleanNoInclude system.* collections when truefalse
Examples
Reference payloads generated from shared source examples JSON.
MongoDB Atlas document scan
Extract MongoDB collections from Atlas with SCRAM authentication and random document sampling

Schedule

{
  "enabled": true,
  "preset": "weekday_morning",
  "cron": "34 6 * * 1-5",
  "timezone": "UTC"
}

Config Payload

{
  "type": "MONGODB",
  "required": {
    "deployment": "ATLAS",
    "cluster_host": "finanzen.rtlj1gu.mongodb.net"
  },
  "masked": {
    "username": "OstapBender_db_user",
    "password": "masked-db-password"
  },
  "optional": {
    "connection": {
      "auth_mechanism": "SCRAM-SHA-256",
      "app_name": "finanzen"
    },
    "scope": {
      "database": "finanzen",
      "include_all_databases": false,
      "include_collections": [
        "transactions",
        "users"
      ]
    }
  },
  "sampling": {
    "strategy": "RANDOM",
    "limit": 30
  }
}
MongoDB on-prem latest-doc scan
Scan an on-prem MongoDB deployment and prioritize newest documents per collection

Schedule

{
  "enabled": true,
  "preset": "nightly",
  "cron": "24 2 * * *",
  "timezone": "UTC"
}

Config Payload

{
  "type": "MONGODB",
  "required": {
    "deployment": "ON_PREM",
    "host": "some-test-company.example.com",
    "port": 27017
  },
  "masked": {
    "username": "mongo_reader",
    "password": "masked-reader-password"
  },
  "optional": {
    "connection": {
      "auth_mechanism": "SCRAM-SHA-256",
      "auth_source": "admin",
      "tls": false
    },
    "scope": {
      "database": "analytics",
      "exclude_collections": [
        "system.profile"
      ]
    }
  },
  "sampling": {
    "strategy": "LATEST",
    "limit": 25
  }
}
MongoDB Atlas all-databases scan with secrets detection
Scan every database in an Atlas cluster for secrets and sensitive data using random document sampling

Schedule

{
  "enabled": true,
  "preset": "nightly",
  "cron": "0 3 * * *",
  "timezone": "UTC"
}

Config Payload

{
  "type": "MONGODB",
  "required": {
    "deployment": "ATLAS",
    "cluster_host": "bigfree.zaz2dbb.mongodb.net"
  },
  "masked": {
    "username": "classifyre_scanner",
    "password": "masked-atlas-password"
  },
  "optional": {
    "connection": {
      "app_name": "BIGFREE"
    },
    "scope": {
      "include_all_databases": true,
      "exclude_databases": [
        "admin",
        "config",
        "local"
      ]
    }
  },
  "sampling": {
    "strategy": "RANDOM",
    "limit": 20
  },
  "detectors": [
    {
      "type": "SECRETS",
      "enabled": true
    }
  ]
}