[
https://issues.apache.org/jira/browse/NIFI-14384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Handermann resolved NIFI-14384.
-------------------------------------
Fix Version/s: 2.7.0
Resolution: Fixed
> Add Force Path Style property to S3 Bundle Persistence Provider for Registry
> ----------------------------------------------------------------------------
>
> Key: NIFI-14384
> URL: https://issues.apache.org/jira/browse/NIFI-14384
> Project: Apache NiFi
> Issue Type: Improvement
> Components: NiFi Registry
> Environment: S3 server implemented using MinIO
> Reporter: Hervé Barrault
> Priority: Major
> Fix For: 2.7.0
>
> Attachments: S3BundlePersistenceProvider.java, diff.txt
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> My s3 provider is a private minio thus providing a *path style access* to
> bucket.
> I'm trying to configure the S3BundlePersistenceProvider.
> The configuration is like
> <extensionBundlePersistenceProvider>
> <class>org.apache.nifi.registry.aws.S3BundlePersistenceProvider</class>
> <propertyname="Region">us-east-1</property>
> <propertyname="Bucket Name">nifireg</property>
> <propertyname="Key Prefix"></property>
> <propertyname="Credentials Provider">STATIC</property>
> <propertyname="Access Key">MY_LOGIN</property>
> <propertyname="Secret Access Key">MY_PASSWORD</property>
> <propertyname="Endpoint
> URL">[http://s3.minio:9000|http://127.0.0.1:9000/]</property>
> </extensionBundlePersistenceProvider>
>
> without success as the client always use the domain style bucket management
> (which is the default). It seems the unit test does not fail due to 127.0.0.1
> IP usage.
>
> I checked on the code here (on main branch)
> [https://github.com/apache/nifi/blob/main/nifi-registry/nifi-registry-extensions/ni[…]a/org/apache/nifi/registry/aws/S3BundlePersistenceProvider.java|https://github.com/apache/nifi/blob/main/nifi-registry/nifi-registry-extensions/nifi-registry-aws/nifi-registry-aws-extensions/src/main/java/org/apache/nifi/registry/aws/S3BundlePersistenceProvider.java]
> there is no condition to allow path style usage.
> On s3 sdk, the api to call is here :
> [https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/S3ClientOptions.Builder.html#setPathStyleAccess-boolean-]
>
> In order to allow such integration a new properties shall be introduced like
> "Path Style" which is false by default but configurable and trigger the
> pathstyleaccess configuration.
> I did a small successful test in patching the S3BundlePersistenceProvider,
> with the used API in your code, it is forcePathStyle configuration.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)