You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jg...@apache.org on 2022/12/15 21:43:26 UTC
[nifi] branch main updated: NIFI-10987: Added default implementation of AWS SDK V2 credentials in AWSCredentialsProviderService
This is an automated email from the ASF dual-hosted git repository.
jgresock pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new ae5d23db47 NIFI-10987: Added default implementation of AWS SDK V2 credentials in AWSCredentialsProviderService
ae5d23db47 is described below
commit ae5d23db470c5ebcd871814e55a9f51cacf2c8d1
Author: Peter Turcsanyi <tu...@apache.org>
AuthorDate: Thu Dec 15 20:57:44 2022 +0100
NIFI-10987: Added default implementation of AWS SDK V2 credentials in AWSCredentialsProviderService
Signed-off-by: Joe Gresock <jg...@gmail.com>
This closes #6787.
---
.../provider/service/AWSCredentialsProviderService.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-service-api/src/main/java/org/apache/nifi/processors/aws/credentials/provider/service/AWSCredentialsProviderService.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-service-api/src/main/java/org/apache/nifi/processors/aws/credentials/provider/service/AWSCredentialsProviderService.java
index c3d0b3e2de..80557dd83a 100644
--- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-service-api/src/main/java/org/apache/nifi/processors/aws/credentials/provider/service/AWSCredentialsProviderService.java
+++ b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-service-api/src/main/java/org/apache/nifi/processors/aws/credentials/provider/service/AWSCredentialsProviderService.java
@@ -21,6 +21,7 @@ import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processors.aws.credentials.provider.AwsCredentialsProviderService;
+import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
/**
* AWSCredentialsProviderService interface to support getting AWSCredentialsProvider used for instantiating
@@ -40,4 +41,13 @@ public interface AWSCredentialsProviderService extends AwsCredentialsProviderSer
* @see <a href="http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/AWSCredentialsProvider.html">AWSCredentialsProvider</a>
*/
AWSCredentialsProvider getCredentialsProvider() throws ProcessException;
+
+ /**
+ * Default implementation of {@link AwsCredentialsProviderService#getAwsCredentialsProvider()} throwing UnsupportedOperationException.
+ * @return always throws UnsupportedOperationException
+ */
+ @Override
+ default AwsCredentialsProvider getAwsCredentialsProvider() {
+ throw new UnsupportedOperationException("AWS Java SDK v2 credentials are not supported by this service");
+ }
}