-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat: allow endpoint override for secrets manager plugin #707
Conversation
67e3c9a
to
53c4969
Compare
.endpointOverride(endpointURI) | ||
.region(region) | ||
.build(); | ||
} catch (URISyntaxException e) { |
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.
is this the only exception we can have from the endpoint override?
What happens if the syntax is ok but the endpoint doesn't lead anywhere?
is there a way to see all the exceptions this call can throw?
@@ -36,6 +36,7 @@ AwsCredentialsManager.nullProvider=The configured AwsCredentialsProvider was nul | |||
AwsSdk.unsupportedRegion=Unsupported AWS region ''{0}''. For supported regions please read https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html | |||
|
|||
# AWS Secrets Manager Connection Plugin | |||
AwsSecretsManagerConnectionPlugin.endpointOverrideMisconfigured=The provided endpoint could not be used to create a URI: ``{0}``. |
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.
NIT: is it worth using a scarier word like incorrect or invalid?
@@ -72,6 +74,9 @@ public class AwsSecretsManagerConnectionPlugin extends AbstractConnectionPlugin | |||
public static final AwsWrapperProperty REGION_PROPERTY = new AwsWrapperProperty( | |||
"secretsManagerRegion", "us-east-1", | |||
"The region of the secret to retrieve."); | |||
public static final AwsWrapperProperty ENDPOINT_PROPERTY = new AwsWrapperProperty( |
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.
NIT: should we add SECRETS_MANAGER prefix to both properties?
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.
I think it's ok without the prefix, since these properties are only used in the plugin and there isn't any ambiguity on what the they are.
|--------------------------|:------:|:--------------------------------------------------------:|:-------------------------------------------------------------------------|:------------------------|---------------| | ||
| `secretsManagerSecretId` | String | Yes | Set this value to be the secret name or the secret ARN. | `secretId` | `null` | | ||
| `secretsManagerRegion` | String | Yes unless the `secretsManagerSecretId` is a Secret ARN. | Set this value to be the region your secret is in. | `us-east-2` | `us-east-1` | | ||
| `secretsManagerEndpoint` | String | No | Set this value to be the endpoint override to retrieve your secret from. | `http://localhost:1234` | `null` | |
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.
We need to indicate that it is a URL in the description, and also indicate which formats are OK or not (ex: port mandatory or not)
e869b09
to
0e838c9
Compare
0e838c9
to
d7e26bd
Compare
Summary
Allow endpoint override for secrets manager plugin
Description
secretsManagerEndpoint
to allow users to set the endpoint override for secret retrieval in the secrets manager pluginAddresses #630
Additional Reviewers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.