Automation config encryption protects sensitive credentials in the Automation Agent's local backup configuration file. When the agent stores a backup of the cluster configuration on disk, it encrypts sensitive fields—including passwords and authentication keys—using AES-256-GCM rather than writing them in plaintext.
This feature helps organizations meet compliance requirements for frameworks such as PCI-DSS, HIPAA, and SOC 2.
Encryption is disabled by default. Existing deployments remain unencrypted until you explicitly enable this feature.
Encryption Methods
Ops Manager supports three encryption methods for the automation config:
Method | Best for | Key encryption key (KEK) source |
|---|---|---|
Online (KMIP) | Environments with KMIP infrastructure | Customer-managed KMIP server |
Offline | Air-gapped or standalone environments | Machine-derived key |
Default | Automatic compliance alignment | Follows Encryption at Rest settings |
Online (KMIP)
Tip
Use Online (KMIP) mode when KMIP infrastructure is available. It provides the strongest security because the master key never leaves your HSM.
Online mode is best for environments with KMIP infrastructure. The master key resides in an external KMIP-compatible HSM and never touches disk. A separate bootstrap key secures the KMIP certificate credentials locally, enabling unattended restarts.
Note
This method requires an existing KMIP-compatible server.
You must configure client certificate (mTLS)
authentication, matching MongoDB Enterprise Advanced's
security.kmip.* configuration.
To use online mode, set encryptionMethod to ONLINE_KMS
and provide your KMIP server details.
Parameter | Description | Required |
|---|---|---|
| KMIP server hostname or IP | Yes |
| KMIP server port. Default: | No |
| CA certificate path (Unix) | Yes |
| CA certificate path (Windows) | Conditional |
| Client certificate path (Unix) | Yes |
| Client certificate path (Windows) | Conditional |
| Client certificate password (if PEM is encrypted) | No |
| UUID of an existing key on the KMIP server. If empty, the agent creates a new key automatically. | No |
| Use KMIP 1.0/1.1 (Create+Get) instead of KMIP 1.2 (Encrypt/Decrypt). Use when the KMIP server does not support KMIP 1.2. | No |
Configuration Schema
{ "configEncryption": { "encryptionMethod": "ONLINE_KMS", "kmip": { "serverName": "<hostname>", "port": 5696, "serverCAFile": "<path-unix>", "serverCAFileWindows": "<path-windows>", "clientCertificateFile": "<path-unix>", "clientCertificateFileWindows": "<path-windows>", "clientCertificatePassword": "<password>", "keyIdentifier": "<optional-uuid>", "useLegacyProtocol": false } } }
Before You Begin
Verify the following before you enable online KMIP encryption:
TLS handshake: Run the following command and confirm the handshake succeeds and the certificate is accepted:
openssl s_client -connect <serverName>:<port> \ -CAfile <serverCAFile> -cert <clientCertificateFile> Certificate permissions: Confirm the client certificate is authorized for the required KMIP operations. Check your KMIP server's admin console or logs.
Network reachability: Confirm the agent host can reach the KMIP server on the configured port. Verify firewall rules, security groups, and DNS resolution.
Certificate expiry: Ensure both the server CA and client certificates are not expired. To check, run:
openssl x509 -enddate -noout -in <certFile>
KMIP Server Permissions
The client certificate must be authorized for the following operations on the KMIP server:
KMIP mode | Required operations |
|---|---|
Default (KMIP 1.2) | Create, Encrypt, Decrypt on symmetric keys |
Legacy ( | Create, Get on symmetric keys |
If you provide keyIdentifier, the Create permission is
not required. Consult your KMIP server documentation to
configure the appropriate permissions for the client
certificate.
Offline
Offline mode is best for air-gapped or standalone environments. The agent derives an encryption key from a customer-provided UUID combined with physical machine parameters. This method requires no external dependencies.
To use offline mode, set encryptionMethod to
OFFLINE_SOFTWARE and provide the following parameter:
Parameter | Description | Required |
|---|---|---|
| UUID used for key derivation. Acts as the rotation trigger. | Yes |
Dynamic Salt UUID
The dynamicSalt is a cryptographically random UUID that
serves as an additional input to the key derivation process.
Ops Manager UI: Click Generate to produce a new UUID automatically.
Public API: Provide a cryptographically random UUID (Version 4). Use a secure random generator. Avoid predictable, sequential, or hardcoded UUIDs.
Changing the dynamic salt to a new UUID triggers key re-derivation, which is the primary rotation mechanism for offline mode.
Configuration Schema
{ "configEncryption": { "encryptionMethod": "OFFLINE_SOFTWARE", "dynamicSalt": "<UUID>" } }
Default
If Encryption at Rest (security.enableEncryption) is
enabled for any process in the deployment, offline encryption
activates automatically without requiring explicit
configuration. Otherwise, the configuration remains
unencrypted.
Note
Default mode does not support manual key rotation.
Configure Encryption
You can configure automation config encryption using the Ops Manager UI or the Public API.
Via the Ops Manager UI
Configure encryption at the project level in Ops Manager.
Fill in the required fields for your chosen method.
For field descriptions, see Online (KMIP) or Offline.
Via the Public API
You can manage automation config encryption through the Ops Manager automation config endpoint.
Endpoint: PUT /groups/{PROJECT-ID}/automationConfig
Include the configEncryption object in the automation
config request body. To learn more about the full request
and response, see Update the Automation Configuration.
You must have the Project Automation Admin role
to use this endpoint.
Request Body
Include a configEncryption object in the automation
config request body. See
Online (KMIP) or
Offline for complete
field references.
Online (KMIP):
{ "configEncryption": { "encryptionMethod": "ONLINE_KMS", "kmip": { "serverName": "kmip.example.com", "serverCAFile": "/path/to/ca.pem", "clientCertificateFile": "/path/to/client.pem" } } }
Offline:
{ "configEncryption": { "encryptionMethod": "OFFLINE_SOFTWARE", "dynamicSalt": "<UUID>" } }
Response Codes
For the full response specification, see
Update the Automation Configuration. The following error
codes are specific to configEncryption validation:
HTTP code | Description | Notes |
|---|---|---|
| Configuration saved as a draft. | Returns an empty JSON object: |
|
| Returned if the |
|
| Returned if the project is restricted by an externally managed lock. |
Disable Encryption
To disable automation config encryption, set the encryption method to Default.
Note
If no deployments in the project use Encryption at Rest, encryption is disabled after you deploy this change.
Encrypted Fields
Only sensitive fields are encrypted. Non-sensitive operational data such as ports, log paths, and topology remains in plaintext.
Category | Fields |
|---|---|
Authentication | auth.keyauth.newKeyauth.autoPwdauth.newAutoPwdauth.autoKerberosWindowsPassword |
User credentials | auth.usersWanted.[].initPwdauth.usersWanted.[].scramSha1Creds.saltauth.usersWanted.[].scramSha1Creds.storedKeyauth.usersWanted.[].scramSha1Creds.serverKeyauth.usersWanted.[].scramSha256Creds.saltauth.usersWanted.[].scramSha256Creds.storedKeyauth.usersWanted.[].scramSha256Creds.serverKey |
TLS |
|
LDAP | ldap.bindQueryPasswordldap.newBindQueryPassword |
Prometheus | prometheus.passwordprometheus.passwordHashprometheus.passwordSaltprometheus.tlsPemPassword |
BI Connector |
|
Encryption providers | encryptionProviders.awsKms.accessKeyIdencryptionProviders.awsKms.secretAccessKeyencryptionProviders.awsKms.sessionTokenencryptionProviders.azureKeyVault.clientIdencryptionProviders.azureKeyVault.tenantIdencryptionProviders.azureKeyVault.secretencryptionProviders.googleCloudKMS.serviceAccountKey |
Config encryption |
|
File Artifacts
The agent stores two files in its configured backup directory. The agent user must have read/write access to this directory.
File | Description | Permissions (Unix / Windows) |
|---|---|---|
| Cluster config with sensitive fields encrypted inline |
|
| Wrapped encryption key(s) (JSON) |
|
The agent writes files using an atomic pattern (write to a temp file, then rename). The agent persists the config file before the key file to ensure consistent rollback if a crash occurs during writes.
Warning
Do not modify these files. The agent uses them to recover from a restart when Ops Manager is unreachable.
Key Rotation
The agent supports both manual and automatic key rotation.
Manual Rotation
To manually rotate encryption keys, use the following triggers:
Mode | Trigger |
|---|---|
Online (KMIP) | Update any KMIP configuration property in Ops Manager |
Offline | Generate a new dynamic salt UUID in Ops Manager |
Default | Switch to Online or Offline mode first |
Automatic Rotation
The agent automatically rotates encryption keys when:
The agent process restarts.
The agent version changes (upgrade or downgrade).
When to Rotate
Rotate keys in the following situations:
Suspected key compromise
Scheduled rotation per your organization's security policy
Personnel changes involving infrastructure access
Considerations
The following conditions may affect automation config encryption in your deployment.
Hardware changes: Replacing hardware or migrating VMs may leave the local backup inaccessible to the agent. The agent automatically recovers by fetching fresh configuration from Ops Manager.
VM cloning: Cloned VMs retain the same machine identity and may decrypt Offline-encrypted data. Use Online (KMIP) mode for clone-isolated security.
Agent upgrades and downgrades: Changing the agent version invalidates encryption artifacts. The agent fetches fresh configuration from Ops Manager automatically to re-encrypt.
Ops Manager connectivity: If the agent cannot decrypt local files and Ops Manager is unreachable, it enters an error state and retries until connectivity is restored.
KMIP server availability: The KMIP server must be reachable during agent operations for key wrapping and unwrapping.
Kubernetes Operator: Operator mode disables encryption. The Kubernetes Operator manages secrets separately.
Lazy migration: Existing deployments move to default mode on upgrade. If Encryption at Rest is enabled for any process, offline encryption activates automatically.
Security Architecture
The encryption system uses envelope encryption with a Data Encryption Key (DEK) that encrypts fields and a Key Encryption Key (KEK) that protects the DEK. In Online mode, the KEK resides in your KMIP-compatible HSM and never touches disk. In Offline mode, the agent derives the KEK from machine-specific attributes, binding the encrypted data to the physical host.
Cryptographic Algorithms
The following table lists the cryptographic algorithms used at each stage of the encryption process.
Purpose | Algorithm | Details |
|---|---|---|
Field encryption | AES-256-GCM | 256-bit key, 96-bit nonce, 128-bit authentication tag. Each field uses a unique nonce and is bound to its configuration path via authenticated data (AAD), preventing tampering or field relocation. |
KEK derivation (Offline) | PBKDF2-HMAC-SHA256 | Derives the KEK using a high iteration count for computational hardening against brute-force attacks. |
DEK wrapping | AES Key Wrap (RFC 3394) | NIST-approved algorithm for protecting the DEK under the KEK. Produces a wrapped key with an 8-byte integrity check value. |
DEK wrapping (Online KMIP 1.2) | KMIP server-side Encrypt/Decrypt | The master key never leaves the KMIP server. The server wraps and unwraps the DEK directly. |
DEK wrapping (Online KMIP legacy) | AES Key Wrap (RFC 3394) | The agent retrieves the key from the KMIP server and uses it locally for AES Key Wrap, then zeros it from memory. |
Security Properties
The automation config encryption system provides the following security guarantees.
Online mode bootstrap: A separate locally wrapped key protects the KMIP certificate credentials stored in the config. This enables the agent to authenticate to your KMIP server during unattended restarts without storing plaintext secrets on disk.
Atomic writes: The agent writes configuration and key files using a crash-safe atomic pattern. The agent can fully recover from a failure at any point during the write.
No plaintext secrets on disk: When you enable encryption, the agent replaces all credential fields in the backup file with encrypted values. The
master.keyfile contains only wrapped (encrypted) keys.
Security Best Practices
Follow these recommendations to strengthen your automation config encryption deployment.
Prefer Online (KMIP) when KMIP infrastructure is available. It provides the strongest security.
Use KMIP 1.2 (default) over the legacy protocol. The master key never leaves the HSM.
Rotate keys regularly per your organization's policy.
Restrict filesystem access to the agent's config directory.
Ensure Ops Manager connectivity before hardware changes or VM migrations in Offline mode. The agent recovers automatically by fetching fresh configuration on the next successful poll.
Troubleshooting
The following sections cover common issues, forced recovery steps, and agent log tags.
Common Issues
The following table lists common symptoms, their likely causes, and resolution steps.
Symptom | Likely cause | Resolution |
|---|---|---|
Agent enters error state on startup | Hardware or machine identity changed (Offline mode) | Restore Ops Manager connectivity. The agent recovers automatically. |
Agent enters error state on startup | KMIP server unreachable or certificate expired (Online mode) | Verify KMIP connectivity and certificate validity.
Update credentials in Ops Manager if needed. Run
|
Log shows "Could not locate object: KEY_ID" | Encryption key unavailable in KMIP | Use one of the following options:
|
| TLS handshake rejected | Verify |
| KMIP server rejected the operation | Verify the client certificate has the required
permissions (Create/Encrypt/Decrypt or Create/Get).
Verify the key UUID in |
Backup files not updating | Insufficient file permissions or disk space | Verify the agent user has write access to the config directory. |
Decryption failure after upgrade or downgrade | Encryption artifacts are version-bound | The agent fetches fresh config from Ops Manager automatically. |
Forced Recovery
If the agent cannot decrypt its local backup and Ops Manager is reachable, you can reset the encryption state.
Warning
Ops Manager must be reachable before you start the agent. Without connectivity, the agent has no configuration to fall back to and enters an error state.
To disable encryption as part of recovery, see Disable Encryption.
Log Tags
The following log tags identify encryption-related events in the agent logs.
Tag | Level | Description |
|---|---|---|
| INFO | Write operation initiated |
| DEBUG | Write completed |
| INFO | Read/decrypt operation initiated |
| DEBUG | Read/decrypt completed |
| DEBUG | Encryption key served from cache |
| INFO | Key not cached; regenerating |
| INFO | Key rotation triggered |
| ERROR | Key rotation failed |
| INFO | Encryption method changed |
| DEBUG | Encryption key wrapped (includes method) |
| DEBUG | Encryption key unwrapped (includes method) |
| DEBUG | Field path encrypted (path only, no values) |
| DEBUG | Field path decrypted (path only, no values) |
| ERROR | Encryption operation failed |
| ERROR | Decryption operation failed |
| ERROR | Unexpected error in encryption subsystem |
| DEBUG | KMIP TLS connection established |
| ERROR | KMIP TLS connection failed (includes server, port, retry count) |
| DEBUG | KMIP operation completed (operation type, key ID, duration) |
| ERROR | KMIP operation failed (operation type, key ID, error) |
| INFO | New key created on KMIP server (key ID) |
| DEBUG | Existing KMIP key reused (key ID, source) |
| DEBUG | KMIP TLS config built (cert paths, password-protected flag) |
Note
Ops Manager never logs sensitive values.