Skip to content

Customising the host of the presigned URL #447

@LarsSven

Description

@LarsSven

Minio provides presigned URLs through the getPresignedObjectUrl function. This generates URLs such as:

http://localhost:31000/integration-tester/BasicTestcase/add.out?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioaccess%2F20250605%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250605T131638Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=355e91cc4344971919f38c7cfae6e0d6e6d151259fa651cdde491a557dcda3d9

However this presigned URL enforces the host to be localhost. So if I for example want to access the minio presigned URL from a different testcontainer, I need to access it through the host.testcontainers.internal host. However if I change localhost to host.testcontainers.internal , the URL verification fails. So I would either need to not have host included in verification, or be able to change the generated hostname for the presigned URL.

I tried using the quarkus.minio.devservices.host config parameter, however this doesn't seem to be changing the host in the generated presigned URL. How can I get the generated URL to change to host.testcontainers.internal for an injected MinioClient?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions