MongoDB Protocol

In release 1.21.13+, we are introducing integration with the MongoDB protocol. You can now connect using your preferred IDE.

This integration serves as a proxy for a MongoDB instance, offering auditing capabilities, single sign-on authentication, and TLS offload.

Configuring

Let's establish a connection! Ensure you deploy your agent within the same network as your MongoDB instance.

hoop admin create conn mongodemo -a <agent> --type database/mongodb \
  -e HOST=<mongodb-host> \
  -e USER=<mongodb-user> \
  -e PASS=<mongodb-pwd> \
  -e DB=<mongodb-pwd>
It enables TLS connection with the remote MongoDB host by default.

Connect It

You can now forward a local port to this new instance.

hoop connect mongodemo -p 27017
It forward the port 27018 by default
connection: mongo | session: 59754161-8720-4996-9264-dd7d15b3eff8

---------------------mongo-credentials----------------------
 mongodb://noop:noop@127.0.0.1:27017/?directConnection=true
------------------------------------------------------------
ready to accept connections!

Copy the connection string and use it to connect to your IDE. You can try this with MongoDB Compass.

For a more detailed overview, please refer to the MongoDB connection documentation.