MongoDB
This tutorial provides step-by-step instructions on how to rotate a MongoDB API key.
Generate a new MongoDB API key
Step 1 - Navigate to the API key page
After logging in, click the Access Manager
tab on the left-hand navbar and then the API Keys
tab.
Step 2 - Generate a new API key
2a. Click Create API Key
2b. Configure the API key
Provide a Description
, select the Organization Permissions
and then click Next
.
2c. Copy the Private Key
Replace the Leaked MongoDB API key
Replace the leaked MongoDB API key with the new one in all impacted applications and services.
Revoke the Leaked MongoDB API key
Step 1 - Navigate to the API key page
After logging in, click the Access Manager
tab on the left-hand navbar and then the API Keys
tab.
Step 2 - Revoke the API key
2a. Delete the key
Click the delete icon next to the API key you want to delete.
2b. Confirm deletion
Click the Delete
button to confirm deletion.