quarkiverse / quarkus-minio

Minio (https://min.io) Client Quarkus Extension
Apache License 2.0
16 stars 24 forks source link

Minio Client Extension to Support Flexible Endpoint, Port, and TLS Configurations #306

Closed TartanLeGrand closed 3 months ago

TartanLeGrand commented 6 months ago

This PR introduces targeted enhancements to the quarkiverse-minio extension, aimed at increasing its flexibility by allowing users to specify MinIO endpoints without requiring explicit "http://" or "https://" prefixes, configure custom port numbers, and toggle TLS security. By default, the extension now assumes port 443 for connections and enables TLS, aligning with common MinIO deployment practices. These changes facilitate easier integration with MinIO services, accommodating a variety of network and security configurations.

Changes

  1. Simplified Endpoint Configuration: Updated MinioRuntimeConfiguration to gracefully handle MinIO server URLs without the need for "http://" or "https://" prefixes, simplifying configuration files.
  2. Custom Port and TLS Toggle: Introduced optional configurations for custom port numbers and a TLS toggle. This enhancement allows developers to easily switch between standard and custom ports and choose between secure (TLS) and non-secure connections based on their deployment requirements.
  3. Default Settings for Port and TLS: Set default values for the port (443) and TLS (enabled) to ensure out-of-the-box security and compatibility with standard MinIO server deployments.

Motivation

The primary motivation for these updates is to provide Quarkus developers with a more adaptable and user-friendly way to configure MinIO client connections, catering to the diverse setups found in real-world applications. These enhancements are a step towards supporting the comprehensive set of use cases documented in the MinIO Java Client API, making the extension more versatile.

Next Steps

While this PR addresses specific aspects of MinIO client configuration, future enhancements should aim to support the full spectrum of use cases outlined in the MinIO Java Client API documentation. This includes anonymous access, authenticated access with different security mechanisms, region specification, and the use of custom HTTP clients. Planning and implementing these features will further solidify the quarkiverse-minio extension as a robust and comprehensive solution for MinIO integration in Quarkus applications.

How to Test

  1. Configure your application.properties to connect to a MinIO server, specifying the endpoint without the "http://" or "https://" prefix, and adjust the port and TLS settings as needed.
  2. Deploy your Quarkus application and ensure it can successfully communicate with the specified MinIO server.

Documentation

The documentation has been updated to reflect these new configuration options, offering guidance on how to leverage the simplified endpoint configuration, custom port numbers, and TLS settings.

TartanLeGrand commented 6 months ago

@jtama 👋

jtama commented 6 months ago

Yes I saw the PR, but I want to be sure what you want can't be achieved with what we already have.

It would be great to help users use the minio client rightfully (particularly intersted in your next step).

But i'm not sure I want to drop url controls all the way, also you did change the code but not the tests, pretty sure it will fail.

TartanLeGrand commented 6 months ago

Hi @jtama,

but according to the minio doc you can put a url without http/https.

TartanLeGrand commented 6 months ago

It's not a breaking change, because the builder make an HttpUtils.getBaseUrl(endpoint);.

jtama commented 6 months ago

OK, but the test and devservices still have to be impacted as well as the documentation.

TartanLeGrand commented 6 months ago

Hello @jtama 👋, I have made some changes can you relaunch the pipe ?

Why you dont let the pipeline for every PR ? 🤔

jtama commented 6 months ago

Hello @jtama 👋, I have made some changes can you relaunch the pipe ?

Why you dont let the pipeline for every PR ? 🤔

It's the classical quarkiverse setup.

Sorry I don't have much time this week will have more next one.

In the doc could you clarify that the port can be assigned with the host directly or via the dedicated property ?

jtama commented 6 months ago

Sorry I didn't saw you last push. They aren't enough though. It should be better with the following patch (I don't have write access to your fork)

port-tls.patch

jtama commented 5 months ago

@TartanLeGrand ?

jtama commented 5 months ago

@TartanLeGrand Did you had a chance to check the patch ? https://github.com/quarkiverse/quarkus-minio/pull/306#issuecomment-2022433905