-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support parseutil.ParsePath for sensitive values in wrapper configs #272
base: main
Are you sure you want to change the base?
Conversation
Will subsequently update the go.mod deps to a tagged version of go-kms-wrapping/v2 |
|
||
func ParsePaths(fields ...*string) error { | ||
for i := 0; i < len(fields); i++ { | ||
if newVal, err := parseutil.ParsePath(*fields[i]); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this trap errors.Is(err, ErrNotAUrl)
and not return it leaving whatever the field value was previously?
I'm just wondering if we considered with these little tidbits but all three are me trying to poke holes and I don't feel strongly about them.
- If we were given any values that started or ended with spaces they will no longer work as ParsePath will trim them.
- It's a little unfortunate that with
env://
values we don't get an error back saying it didn't exist which may be hard for operators to diagnose connection issues in the future, but we do for file based schemas - Obviously if the values being passed in had values beginning with file:// or env:// that were for some reason meant to be passed to the underlying wrapper there is no way out now.
Quite a few operators have asked for the ability to pull sensitive values into seal/managed key configs from separate files, feeling env vars or direct config isn't secure. ParsePath gives them the option to get values from a separate file while being non-invasive to existing configs.