Skip to content

Add MinIO storage profile command#317

Closed
daniel-marthaler wants to merge 1 commit intoshift7-ch:issues/83-vaultproviderfrom
daniel-marthaler:fix/minio-sts-role-chaining
Closed

Add MinIO storage profile command#317
daniel-marthaler wants to merge 1 commit intoshift7-ch:issues/83-vaultproviderfrom
daniel-marthaler:fix/minio-sts-role-chaining

Conversation

@daniel-marthaler
Copy link
Copy Markdown

Summary

  • Skip AWS-only role chaining on MinIO: STSChainedAssumeRoleRequestInterceptor now detects non-AWS STS endpoints and skips the second AssumeRole call. MinIO does not support role chaining with temporary STS credentials.
  • Add katta storageprofile minio sts CLI command: Creates MinIO storage profiles correctly without stsRoleAccessBucketAssumeRoleTaggedSession and stsSessionTag (which are AWS-only).
  • Register MinIO subcommand in StorageProfile command hierarchy.

Background

When a MinIO storage profile had stsRoleAccessBucketAssumeRoleTaggedSession set, the desktop client attempted AWS-style role chaining after AssumeRoleWithWebIdentity. MinIO does not support AssumeRole with temporary STS credentials — it uses ${jwt:client_id} policy variables instead to scope bucket access per vault.

Changes

File Change
STSChainedAssumeRoleRequestInterceptor.java Guard: skip role chaining when STS endpoint is non-AWS
StorageProfile.java Register MinIO subcommand
minio/MinIO.java New: command group for MinIO storage profiles
minio/MinioSTSStorageProfile.java New: creates correct MinIO STS profiles

Test plan

  • Verify STS flow with MinIO (AssumeRoleWithWebIdentity only, no role chaining)
  • Verify AWS STS flow still works (role chaining should still execute)
  • Test katta storageprofile minio sts command creates correct profile

🤖 Generated with Claude Code

MinIO does not support AWS-style role chaining (AssumeRole with tagged
sessions using temporary STS credentials). When stsRoleAccessBucketAssumeRoleTaggedSession
was set in a MinIO storage profile, the client attempted a second AssumeRole
call after the initial AssumeRoleWithWebIdentity, which failed.

Changes:
- STSChainedAssumeRoleRequestInterceptor: Skip role chaining when STS
  endpoint is non-AWS (custom endpoint like MinIO)
- Add MinioSTSStorageProfile CLI command to correctly create MinIO storage
  profiles without role chaining fields
- Register MinIO subcommand in StorageProfile

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -76,6 +76,11 @@ public TemporaryAccessTokens assumeRoleWithWebIdentity(final OAuthTokens oauth,
final PreferencesReader settings = HostPreferencesFactory.get(bookmark);
final TemporaryAccessTokens tokens = super.assumeRoleWithWebIdentity(this.tokenExchange(oauth), settings.getProperty(S3AssumeRoleProtocol.S3_ASSUMEROLE_ROLEARN_WEBIDENTITY));
if(StringUtils.isNotBlank(settings.getProperty(S3AssumeRoleProtocol.S3_ASSUMEROLE_ROLEARN_TAG))) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stsRoleAccessBucketAssumeRoleTaggedSession setting in the storage profile configuration is mapped to the S3AssumeRoleProtocol.S3_ASSUMEROLE_ROLEARN_TAG setting and should be already null as shown above in the CLI setup. Thus the additional check for the STS endpoint is redundant.

@dkocher dkocher changed the title Fix MinIO STS: skip role chaining and add MinIO storage profile command Add MinIO storage profile command Mar 28, 2026
@dkocher dkocher added the enhancement New feature or request label Mar 28, 2026
@dkocher dkocher added this to the 1.0.0 milestone Mar 28, 2026
@dkocher dkocher added the cli label Mar 28, 2026
@dkocher dkocher changed the base branch from main to issues/83-vaultprovider March 30, 2026 08:39
@dkocher
Copy link
Copy Markdown
Contributor

dkocher commented Mar 30, 2026

Replaced with #323.

@dkocher dkocher closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants