Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

fix: when claim-based OIDC is configured, treat unknown roleArn as claim-based auth - #21512

#21512
Merged
harshavardhana merged 1 commit into
minio:masterminio/minio:masterfrom
ianroberts:fix/treat-invalid-role-as-noneianroberts/minio:fix/treat-invalid-role-as-noneCopy head branch name to clipboard
Aug 8, 2025
Merged

fix: when claim-based OIDC is configured, treat unknown roleArn as claim-based auth#21512
harshavardhana merged 1 commit into
minio:masterminio/minio:masterfrom
ianroberts:fix/treat-invalid-role-as-noneianroberts/minio:fix/treat-invalid-role-as-noneCopy head branch name to clipboard

Conversation

@ianroberts

Copy link
Copy Markdown
Contributor

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.

Description

RoleARN is a required parameter in AssumeRoleWithWebIdentity, according to the standard AWS implementation, and the official AWS SDKs and CLI will not allow you to assume a role from a JWT without also specifying a RoleARN. This meant that it was not possible to use the official SDKs for claim-based OIDC with Minio (#21421), since Minio required you to omit the RoleARN in this case.

#21468 attempted to fix this by disabling the validation of the RoleARN when a claim-based provider was configured, but this had the side effect of making it impossible to have a mixture of claim-based and role-based OIDC providers configured at the same time - every authentication would be treated as claim-based, ignoring the RoleARN entirely.

This is an alternative fix, whereby:

  • if the RoleARN is one that Minio knows about, then use the associated role policy
  • if the RoleARN is not recognised, but there is a claim-based provider configured, then ignore the role ARN and attempt authentication with the claim-based provider
  • if the RoleARN is not recognised, and there is no claim-based provider, then return an error.

Motivation and Context

Necessary to allow claim-based and role-based OIDC providers to co-exist in the same minio instance.

How to test this PR?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

…aim-based auth

RoleARN is a required parameter in AssumeRoleWithWebIdentity, according to the standard AWS implementation, and the official AWS SDKs and CLI will not allow you to assume a role from a JWT without also specifying a RoleARN.  This meant that it was not possible to use the official SDKs for claim-based OIDC with Minio (minio#21421), since Minio required you to _omit_ the RoleARN in this case.

minio#21468 attempted to fix this by disabling the validation of the RoleARN when a claim-based provider was configured, but this had the side effect of making it impossible to have a mixture of claim-based and role-based OIDC providers configured at the same time - every authentication would be treated as claim-based, ignoring the RoleARN entirely.

This is an alternative fix, whereby:

- _if_ the `RoleARN` is one that Minio knows about, then use the associated role policy
- if the `RoleARN` is not recognised, but there is a claim-based provider configured, then ignore the role ARN and attempt authentication with the claim-based provider
- if the `RoleARN` is not recognised, and there is _no_ claim-based provider, then return an error.

@0xMALVEE 0xMALVEE left a comment

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.

lgtm, approved

@harshavardhana
harshavardhana merged commit b44b2a0 into minio:master Aug 8, 2025
21 of 24 checks passed
@ianroberts
ianroberts deleted the fix/treat-invalid-role-as-none branch August 11, 2025 08:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.