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

Securely provide password for private key/PFX via Environment Variable #18277

Closed
anrossi opened this issue Sep 27, 2021 · 3 comments · Fixed by #18498
Closed

Securely provide password for private key/PFX via Environment Variable #18277

anrossi opened this issue Sep 27, 2021 · 3 comments · Fixed by #18498
Labels

Comments

@anrossi
Copy link
Contributor

anrossi commented Sep 27, 2021

I am looking to add PFX support for certificates in the future, and the customer has a requirement that the password not be stored in the configuration file because they randomly generate it, and the PFX, at run time.
The existing methods for providing the password don't meet the customer's requirements of a random one-use password, and being generated at run time.
The preferred solution to this would be extending the DataSource API to include an environment variable field, in addition to the existing fields. It would read the environment variable data and store as bytes.

@envoyproxy/api-shepherds I'd appreciate your feedback on this, as I am proposing an API change.

@anrossi anrossi added the triage Issue requires triage label Sep 27, 2021
@htuch
Copy link
Member

htuch commented Sep 27, 2021

Something like this was added for Wasm extensions recently, #15136 (#15136 (comment) for a relevant thread).

I'm not sure how opinionated I would want to be about forcing the use of env vars for a feature, but it seems reasonable to support it as a data source to me.

@anrossi
Copy link
Contributor Author

anrossi commented Sep 27, 2021

To be clear, I would not force the use of environment variable to hold the PFX password. I intend for the PFX support feature to accept all current methods for specifying password, but would like to also support environment variable as well.

@mattklein123
Copy link
Member

Yeah I think adding env as an additional data source seems reasonable to me.

@mattklein123 mattklein123 added area/tls help wanted Needs help! and removed triage Issue requires triage labels Oct 3, 2021
htuch pushed a commit that referenced this issue Oct 19, 2021
Add support to DataSource to read data from environment variables.

Risk Level: Low
Testing: Unit test for well-known environment variable, no environment variable, and empty environment variable.
Docs Changes: N/A
Release Notes: config: added environment_variable to the DataSource.
Platform Specific Features: N/A

Fixes #18277

Signed-off-by: Anthony Rossi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants