Amazon DocumentDB connections
Amazon DocumentDB is MongoDB-compatible. DataMasque masks Amazon DocumentDB collections in place.
Required privileges
A DataMasque connection for Amazon DocumentDB requires:
- A user with
readWriterole on the target database.
use admin
db.createUser({
user: "<connection user>",
pwd: "<password>",
roles: [{ role: "readWrite", db: "<target database>" }]
})
Amazon DocumentDB connections use the same parameters as MongoDB connections, with the following considerations:
- Amazon DocumentDB CA Certificate: Amazon DocumentDB presents a certificate signed by the Amazon RDS certificate authority, which is not in the system trust store. Upload the Amazon RDS CA bundle and select it under Advanced Settings once TLS is enabled. See MongoDB Encrypted Connections for the upload procedure.
- Retryable writes: Retryable writes are always off for Amazon DocumentDB connections. A
retry_writesvalue oftrueis ignored. - Use SRV record: Not offered for Amazon DocumentDB, which publishes no SRV records. An
srvvalue oftrueis refused when the connection is saved.
For more information, see AWS's documentation: https://docs.aws.amazon.com/documentdb/latest/developerguide/connect.html.
Nested fields
Nested fields on Amazon DocumentDB are discovered and masked as on MongoDB;
see Nested fields on the MongoDB connection page.
Keys are not masked, so an object keyed by data, such as customer email addresses, keeps those keys.
Amazon DocumentDB stores -0.0 as 0.0 when it writes a field,
so a -0.0 inside a field masked with a json mask loses its sign.
Encrypted connections
Amazon DocumentDB uses the same encrypted connection settings as MongoDB. See MongoDB connections -> Encrypted connections.