Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External MongoDB and Secrets in MongoDB #1

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

davemyler
Copy link

@davemyler davemyler commented Sep 16, 2024

This PR contains 2 separate changes ...

External MongoDB

This is a copy of a change already in the hashgraph repo, to allow the DB_HOST envvar to contain a full connection string to MongoDB so we can use an external host, use the mongodb+srv protocol, specify username and password, and other connection options.

Store Secrets in MongoDB

Allow the SECRET_MANAGER envvar to be set to MONGODB to have secrets stored in MongoDB.

The rationale for this is that connecting to either of the recommended secrets manager options (AWS or Vault) can be complex if you're deploying outside of AWS/Azure. The option of deploying Vault locally is complex for smaller organizations without dedicated ops support.

Secrets are stored in a secrets collection in the database.

By default the secrets would be plain text, but can be encrypted by setting an encryption key in the MONGO_ENCRYPTION_KEY envvar.

Some secrets are accessed by the startup logic in various services that executes prior to establishing a connection to the database. These are picked up from the runtime environment by the MONGODB secrets management rather than loading them into the secrets table using a seeding process, as is the approach taken by other secrets handlers.

@davemyler davemyler changed the base branch from main to develop September 16, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant