-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
NIFI-12061: allow using AWS Secrets Manager without ListSecrets permi… #9483
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for putting together these changes for the main
branch @grishick. The general approach looks good, I noted several stylistic recommendations.
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
...roviders/src/main/java/org/apache/nifi/parameter/aws/AwsSecretsManagerParameterProvider.java
Outdated
Show resolved
Hide resolved
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.
Besides David's useful review, I've just found one minor change that's not needed when targeting main
.
When those pending comments are addressed, the overall PR looks good to me. Thank you for working on this @grishick.
@@ -117,13 +178,15 @@ public class AwsSecretsManagerParameterProvider extends AbstractParameterProvide | |||
|
|||
private static final String DEFAULT_USER_AGENT = "NiFi"; | |||
private static final Protocol DEFAULT_PROTOCOL = Protocol.HTTPS; | |||
private static final List<PropertyDescriptor> PROPERTIES = List.of( | |||
private static final List<PropertyDescriptor> PROPERTIES = Collections.unmodifiableList(Arrays.asList( |
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.
For the main
branch the declaration of PROPERTIES
can remain to use List.of
.
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.
OK. I switched it back to List.of
Co-authored-by: David Handermann <[email protected]>
Thanks a lot for the reviews and suggestions and apologies for the messy commits! I've addressed the comments and pushed the update. |
Summary
NIFI-12061
Add
Secret Name
parameter toAwsSecretsManagerParameterProvider
to allow the provider to work withoutListSecrets
permission. Original behavior where the provider lists all secrets and matches them toSecret Name Pattern
is preserved by leavingSecret Name
parameter undefined. The new behavior will skip listing secrets and ignoreSecret Name Pattern
only ifSecret Name
is provided. I made this change in Anetac's Nifi fork months ago and we are using it in production.Corresponding PR for 1.x branch: #9386
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-12061
NIFI-12061
Pull Request Formatting
support/nifi-1.x
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation