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

Option to read runtime config values from secrets files #2885

Open
1 task done
septatrix opened this issue Nov 15, 2024 · 0 comments
Open
1 task done

Option to read runtime config values from secrets files #2885

septatrix opened this issue Nov 15, 2024 · 0 comments

Comments

@septatrix
Copy link
Contributor

Describe the feature

Many deployment environments offer the ability to provide secrets via files (e.g. Docker and Kubernetes Secrets, systemd Credentials). Nitro should be able to pick these up and read read their contents automatically.

The location where these files are placed is not fully standardized. Docker places them under /run/secrets, systemd under $CREDENTIALS_DIRECTORY (which is /run/credentials for system units), and Kubernetes allows mounting them at arbitrary places. The best way to support all these (and more) is likely to use special environment variables which contain the paths to the secrets files. E.g. NUXT_API_SECRET_FILE=/run/secrets/apikey would automatically be detected as an env var for a secrets file due to the _FILE suffix. Another approach is to use a value prefix like NUXT_API_SECRET=file:/run/secrets/apikey where the file: prefix of the value would indicate that it is a path to a secrets file.

Motivation:
Passing secrets/credentials as files is preferred over environment variables as they offer better access control and are less likely to leak (printed in logs, inherited by child processes, included in core dumps etc.)

Additional information

  • Would you be willing to help implement this feature?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant