Add backwards compatible changes to ParsePath for extra behaviors #154
+102
−15
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.
go-kms-wrapping wants to use ParsePath to supply sensitive values from out
of band means. But there are three differences that could cause the
inability to supply a value exactly as stored in a file or ENV var with the
existing mechanism or debug misconfigured uses.
could be significant.
difficult to debug mistaken env var names or unset env vars.
that has one of the URL prefixes.
This PR adds an options pattern to solve #1 and #2 by being able to disable
trimming and enable error on missing env var. The status quo is unchanged.
Adds a "string://" url scheme that returns everything following that prefix
untouched, so you can write a value that contains a URL prefix supported by
ParsePath. This does have the limitation of not supporting leading/trailing
spaces in the value after string://, as that's invalid in the URL schema.