hcvault: SOPS_VAULT_TOKEN_FILE environment variable#2169
Draft
Dexmachi wants to merge 4 commits intogetsops:mainfrom
Draft
hcvault: SOPS_VAULT_TOKEN_FILE environment variable#2169Dexmachi wants to merge 4 commits intogetsops:mainfrom
Dexmachi wants to merge 4 commits intogetsops:mainfrom
Conversation
Signed-off-by: Caio Rocha de Oliveira <caiorocoli@gmail.com>
Signed-off-by: Caio Rocha de Oliveira <caiorocoli@gmail.com>
Contributor
|
This PR has the same problem that #2163 fixes for age: the file is read more than once, and thus it won't work with fifos etc. |
Author
To solve this issue without bringing changes from #2163, I had to essentially replicate the fix I made over there I'd say against merging this PR until we decide how to go through with that PR in order to avoid duplicate logic. As such, I'll make this into a draft. |
Signed-off-by: Caio Rocha de Oliveira <caiorocoli@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #2168
Implements the
SOPS_VAULT_TOKEN_FILEenvironment variable to decide which path to read the vault token from.Details
If the env variable is set, SOPS will attempt to read only from the provided path, no fallbacks.
If the env variable is set and SOPS fails to read it, it returns an explicit error.
If the env variable is not set, it uses the current bahaviour, falling back to ~/.vault-token and returns no error if there is an error reading it.
Supports ephemerally bound files (e.g., FDs)
All automated tests passing