hasura / hasura/graphql-engine
Default to more secure with the CLI
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
I was surprised to see my db credentials in the _metadata/databases/databases.yaml_ when using the cli. It would have been very easy to commit these.
### Describe the solution you'd like
Default to a more secure option.
Ex. Warn when these are being written to a file, ask for confirmation, and point to the usage of environment variables and have the default written file write to those environment variables.
### Describe alternatives you've considered
You could support hasura managed crypto keys for the organization. Allowing encrypted substitution variables to be used. Then the env values wouldn't be useful without being used on your server.
Ex.
postgresql://postgres:${secretKey1:c2VjcmV0IQ==}@somedomain:5432/postgres
Server-side, hasura would decrypt the value and use it with variables.
This would require a commandline encryption tool, and right management...
Ex.
$ hasura pro encrypt --keyName secretKey1 --value secret!
c2VjcmV0IQ==
### If the feature is approved, would you be willing to submit a PR?
Possibly, I haven't looked at the source yet as I'm looking at this as a cloud product.
Contributor guide
Research direction
Start by tracing the CLI path that writes _metadata/databases/databases.yaml and how database credentials are sourced. The issue proposes warnings, confirmation, environment-variable guidance, and possibly managed encryption, so the completed scope and security design would need maintainer agreement before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- cli, databases, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100