[bucket] Fix s3manager endpoint mismatch with COSI credentials by IvanHunters · Pull Request #2211 · cozystack/cozystack

@IvanHunters

…Info

The deployment template was constructing the S3 endpoint from the tenant's
namespace host (e.g. s3.freedom.infra.example.com), while COSI credentials
are issued for the actual SeaweedFS endpoint (e.g. s3.infra.example.com).
This mismatch caused 'invalid credentials' errors when users tried to log
in with valid credentials from the bucket secret.

Now the endpoint is resolved from BucketInfo (same source as credentials),
with a fallback to the constructed namespace host for first-time deploys
before BucketAccess secrets are created.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>

@dosubot dosubot bot added the size:S

This PR changes 10-29 lines, ignoring generated files.

label

Mar 12, 2026

@dosubot dosubot bot added the bug

Something isn't working

label

Mar 12, 2026

gemini-code-assist[bot]

@dosubot dosubot bot added the lgtm

This PR has been approved by a maintainer

label

Mar 12, 2026

sircthulhu

@kvaps kvaps deleted the fix/bucket-s3manager-endpoint branch

March 13, 2026 15:23

kvaps added a commit that referenced this pull request

Mar 13, 2026
…COSI credentials (#2215)

# Description
Backport of #2211 to `release-1.1`.