-
Notifications
You must be signed in to change notification settings - Fork 5
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
priority of decrypt: kms > arn > use dd_api_key #478
Conversation
Great catch |
bottlecap/src/secrets/decrypt.rs
Outdated
@@ -43,7 +40,7 @@ pub async fn resolve_secrets(config: Arc<Config>, aws_config: &AwsConfig) -> Opt | |||
} | |||
} | |||
} else { | |||
return None; | |||
Some(config.api_key.clone()) |
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.
Will this resolve to None since the API key wouldn't be set either?
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.
Not sure what you mean.
Why shouldn't it be set? And how would it resolve to None?
I moved the cleanup code inside, so maybe it's less confusing
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.
If it's empty, we should send None
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.
One more thing 🍎
1cc631e
to
0370d64
Compare
Current logic was ignoring kms/secret arn when dd_api was set, but from the docs and goagent behavior it should be the other way around
https://docs.datadoghq.com/serverless/libraries_integrations/cli/
Also remove the 32 char hex validation