Wharfbase
MongoDB
MongoDB databases are found in containers by their image, and on the host by their process and config files (host scan).
| Plan | Community (every plan) |
| Default ports | 27017 |
| Also recognized | Percona Server for MongoDB, Bitnami MongoDB |
| Credential hints from | MONGO_INITDB_ROOT_USERNAME, MONGODB_ROOT_USER, MONGODB_USERNAME, MONGO_INITDB_ROOT_PASSWORD, MONGODB_ROOT_PASSWORD, MONGODB_PASSWORD, MONGO_INITDB_ROOT_PASSWORD_FILE, MONGODB_ROOT_PASSWORD_FILE, MONGO_INITDB_DATABASE, MONGODB_DATABASE |
| Data in the container | /data/db, /bitnami/mongodb |
| On the host (host scan) | mongod |
What you can do
Section titled “What you can do”A document view and a grid of the inferred fields; edit documents (Extended JSON, conflict-checked); a shell-like console (db.coll.find(…), aggregate, runCommand from a read list).
A least-privilege user
Section titled “A least-privilege user”Wharfbase works with any user; give it only what you want it to do.
Read only
Section titled “Read only”db.getSiblingDB('admin').createUser({ user: 'wharfbase_ro', pwd: '…', roles: [{ role: 'read', db: 'app' }],});Read and write
Section titled “Read and write”Use { role: 'readWrite', db: 'app' } instead of read.
For other features
Section titled “For other features”- Live consumers: add
{ role: 'clusterMonitor', db: 'admin' }. - Backups (
mongodump): thereadrole on the database is enough.
Checked against MongoDB 8: reads, refused inserts, $currentOp with clusterMonitor, and mongodump.