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


##########
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/strategies/AssumeRoleCredentialsStrategy.java:
##########
@@ -190,29 +202,27 @@ public AWSCredentialsProvider 
getDerivedCredentialsProvider(final Map<PropertyDe
     }
 
     @Override
-    public AwsCredentialsProvider getAwsCredentialsProvider(final 
Map<PropertyDescriptor, String> properties) {
+    public AwsCredentialsProvider getAwsCredentialsProvider(final 
PropertyContext propertyContext) {
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public AwsCredentialsProvider getDerivedAwsCredentialsProvider(final 
Map<PropertyDescriptor, String> properties,
-                                                                   
AwsCredentialsProvider primaryCredentialsProvider) {
-        final String assumeRoleArn = properties.get(ASSUME_ROLE_ARN);
-        final String assumeRoleName = properties.get(ASSUME_ROLE_NAME);
-        String rawMaxSessionTime = properties.get(MAX_SESSION_TIME);
-        rawMaxSessionTime = rawMaxSessionTime == null ? 
MAX_SESSION_TIME.getDefaultValue() : rawMaxSessionTime;
-        final Integer maxSessionTime = 
Integer.parseInt(rawMaxSessionTime.trim());
-        final String assumeRoleExternalId = 
properties.get(ASSUME_ROLE_EXTERNAL_ID);
-        final String assumeRoleSTSEndpoint = 
properties.get(ASSUME_ROLE_STS_ENDPOINT);
-        final String stsRegion = properties.get(ASSUME_ROLE_STS_REGION);
+    public AwsCredentialsProvider getDerivedAwsCredentialsProvider(final 
PropertyContext propertyContext,
+                                                                   final 
AwsCredentialsProvider primaryCredentialsProvider) {
+        final String assumeRoleArn = 
propertyContext.getProperty(ASSUME_ROLE_ARN).getValue();
+        final String assumeRoleName = 
propertyContext.getProperty(ASSUME_ROLE_NAME).getValue();
+        final int maxSessionTime = 
propertyContext.getProperty(MAX_SESSION_TIME).asInteger();
+        final String assumeRoleExternalId = 
propertyContext.getProperty(ASSUME_ROLE_EXTERNAL_ID).getValue();
+        final String assumeRoleSTSEndpoint = 
propertyContext.getProperty(ASSUME_ROLE_STS_ENDPOINT).getValue();
+        final String stsRegion = 
propertyContext.getProperty(ASSUME_ROLE_STS_REGION).getValue();
 
         final StsAssumeRoleCredentialsProvider.Builder builder = 
StsAssumeRoleCredentialsProvider.builder();
 
         // If proxy variables are set, then create Client Configuration with 
those values
         final ApacheHttpClient.Builder httpClientBuilder = 
ApacheHttpClient.builder();

Review Comment:
   The `org.apache.http.conn.ssl.SSLConnectionFactory` can be configured with 
an `SSLContext` from `SSLContextService` and provided to the 
`httpClientBuilder` using the `socketFactory()` method.



-- 
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