0
0
MongoDBquery~20 mins

Encryption at rest concept in MongoDB - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Encryption at Rest Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the main purpose of encryption at rest in MongoDB?

Encryption at rest protects data stored on disk. What does it mainly prevent?

AUnauthorized users reading data files directly from the storage device
BUnauthorized users accessing data through the MongoDB query interface
CData loss due to hardware failure
DData corruption caused by software bugs
Attempts:
2 left
💡 Hint

Think about what happens if someone steals the physical hard drive.

query_result
intermediate
2:00remaining
What output shows that encryption at rest is enabled in MongoDB?

After running db.adminCommand({ getCmdLineOpts: 1 }), which output indicates encryption at rest is active?

MongoDB
db.adminCommand({ getCmdLineOpts: 1 })
A{"parsed": {"security": {"enableEncryption": false}}}
B{"parsed": {"security": {"enableEncryption": true}}}
C{"parsed": {"storage": {"dbPath": "/data/db"}}}
D{"parsed": {"net": {"bindIp": "127.0.0.1"}}}
Attempts:
2 left
💡 Hint

Look for a security setting that shows encryption is turned on.

📝 Syntax
advanced
2:00remaining
Which MongoDB configuration snippet correctly enables encryption at rest?

Choose the valid YAML configuration to enable encryption at rest with a key file.

A
security:
  enableEncryption: true
  encryptionKeyFile: /etc/mongodb/keyfile
B
security:
  enableEncryption: yes
  encryptionKeyFile: /etc/mongodb/keyfile
C
security:
  enableEncryption: true
  encryptionKey: /etc/mongodb/keyfile
D
security:
  encryption: true
  encryptionKeyFile: /etc/mongodb/keyfile
Attempts:
2 left
💡 Hint

Check the exact option names and boolean values.

optimization
advanced
2:00remaining
How can enabling encryption at rest impact MongoDB performance?

What is a common performance effect when encryption at rest is enabled?

ALower memory usage by MongoDB
BReduced network latency for queries
CFaster disk read/write speeds
DIncreased CPU usage due to encryption and decryption processes
Attempts:
2 left
💡 Hint

Think about what extra work the server does when encrypting data.

🔧 Debug
expert
2:00remaining
Why does MongoDB fail to start after enabling encryption at rest with this config?

Given this config snippet, MongoDB fails to start. What is the likely cause?

security:
  enableEncryption: true
  encryptionKeyFile: /etc/mongodb/keyfile
  encryptionCipherMode: AES256-CBC
AencryptionCipherMode must be set to AES128-GCM instead of AES256-CBC
BThe encryptionKeyFile path is incorrect and MongoDB cannot read the key
CThe cipher mode AES256-CBC is deprecated and not supported in current MongoDB versions
DenableEncryption must be set to false to start MongoDB
Attempts:
2 left
💡 Hint

Check MongoDB documentation for supported cipher modes.