exceptionfactory commented on code in PR #10489:
URL: https://github.com/apache/nifi/pull/10489#discussion_r2511448421


##########
nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-service-aws/src/main/java/org/apache/nifi/kafka/service/aws/AmazonMSKConnectionService.java:
##########
@@ -42,6 +72,57 @@ public class AmazonMSKConnectionService extends 
Kafka3ConnectionService {
             .defaultValue(SaslMechanism.AWS_MSK_IAM)
             .build();
 
+    public static final PropertyDescriptor AWS_WEB_IDENTITY_TOKEN_PROVIDER = 
KafkaClientComponent.AWS_WEB_IDENTITY_TOKEN_PROVIDER;
+
+    private static final int MIN_SESSION_DURATION_SECONDS = 900;
+    private static final int MAX_SESSION_DURATION_SECONDS = 3600;
+
+    public static final PropertyDescriptor AWS_WEB_IDENTITY_SESSION_TIME = new 
PropertyDescriptor.Builder()
+            .name("AWS Web Identity Session Time")
+            .description("Session time for AWS STS AssumeRoleWithWebIdentity 
(between 900 seconds and 3600 seconds).")
+            .dependsOn(
+                    KafkaClientComponent.AWS_ROLE_SOURCE,
+                    AwsRoleSource.WEB_IDENTITY_TOKEN
+            )
+            .required(false)
+            .defaultValue(String.format("%d sec", 
MAX_SESSION_DURATION_SECONDS))

Review Comment:
   ```suggestion
               .defaultValue("%d sec".formatted(MAX_SESSION_DURATION_SECONDS)))
   ```



##########
nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-service-aws/src/main/java/org/apache/nifi/kafka/service/aws/AmazonMSKConnectionService.java:
##########
@@ -42,6 +72,57 @@ public class AmazonMSKConnectionService extends 
Kafka3ConnectionService {
             .defaultValue(SaslMechanism.AWS_MSK_IAM)
             .build();
 
+    public static final PropertyDescriptor AWS_WEB_IDENTITY_TOKEN_PROVIDER = 
KafkaClientComponent.AWS_WEB_IDENTITY_TOKEN_PROVIDER;
+
+    private static final int MIN_SESSION_DURATION_SECONDS = 900;
+    private static final int MAX_SESSION_DURATION_SECONDS = 3600;
+
+    public static final PropertyDescriptor AWS_WEB_IDENTITY_SESSION_TIME = new 
PropertyDescriptor.Builder()
+            .name("AWS Web Identity Session Time")
+            .description("Session time for AWS STS AssumeRoleWithWebIdentity 
(between 900 seconds and 3600 seconds).")
+            .dependsOn(
+                    KafkaClientComponent.AWS_ROLE_SOURCE,
+                    AwsRoleSource.WEB_IDENTITY_TOKEN
+            )
+            .required(false)

Review Comment:
   It looks like this can be required based on the `dependsOn` definition and 
the default value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to