Skip to content

STS roleArn: enable 3rd party STS services#3619

Merged
snazy merged 2 commits intoapache:mainfrom
snazy:sts-role-arn-unrestrict
Feb 3, 2026
Merged

STS roleArn: enable 3rd party STS services#3619
snazy merged 2 commits intoapache:mainfrom
snazy:sts-role-arn-unrestrict

Conversation

@snazy
Copy link
Member

@snazy snazy commented Jan 30, 2026

Certain non-AWS STS service implementations use role ARNs that look quite different from AWS ones. This change shall enable those STS implementations.

Example role ARNs that currently fail:

  • urn:ecs:sts::s3:assumed-role/s3assumeRole/user1-105-temp
  • urn:sgws:identity::12345:group/foo-bar-abcdef

Related issue #2743

Certain non-AWS STS service implementations use role ARNs that look quite different from AWS ones.
This change shall enable those STS implementations.

Example role ARNs that currently fail:
* `urn:ecs:sts::s3:assumed-role/s3assumeRole/user1-105-temp`
* `urn:sgws:identity::12345:group/foo-bar-abcdef`

Related issue apache#2743
@snazy snazy force-pushed the sts-role-arn-unrestrict branch from d1b8ffa to fac8298 Compare January 30, 2026 10:32
adutra
adutra previously approved these changes Jan 30, 2026
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jan 30, 2026
@dimas-b
Copy link
Contributor

dimas-b commented Jan 30, 2026

The AWS pattern does not appear to require even the : separators... It might be worth relaxing the check even more.

@snazy
Copy link
Member Author

snazy commented Jan 30, 2026

The AWS pattern does not appear to require even the : separators... It might be worth relaxing the check even more.

Not strictly necessary in this change though. We have these partition + accountId extractions, which could yield null in odd cases.

dimas-b
dimas-b previously approved these changes Jan 30, 2026
MonkeyCanCode
MonkeyCanCode previously approved these changes Jan 30, 2026
@MonkeyCanCode
Copy link
Contributor

MonkeyCanCode commented Jan 30, 2026

This will help us to do assume role on rustfs/minio as well. Wondering if we should add integration testing for this when using minio for the existed test cases?

@snazy snazy added this to the 1.4.0 milestone Jan 31, 2026
Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

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

Change looks reasonable to me, thanks @snazy !


### Fixes

- Enable non-AWS STS role ARNs
Copy link
Contributor

Choose a reason for hiding this comment

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

minor : worth mentioning ECS as an example

Arguments.of("arn:aws:iam::012345678901:role/jdoe", "012345678901", "aws"),
Arguments.of("arn:aws-us-gov:iam::012345678901:role/jdoe", "012345678901", "aws-us-gov"),
Arguments.of("arn:aws-cn:iam::012345678901:role/jdoe", "012345678901", "aws-cn"),
Arguments.of("urn:ecs:sts::s3:assumed-role/s3assumeRole/user1-105-temp", "s3", "ecs"),
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't fully understand this example, expected account id is s3 ? can you please elaborate and add a code comment

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@snazy snazy dismissed stale reviews from MonkeyCanCode, dimas-b, and adutra via 7e337fd February 2, 2026 11:57
@snazy
Copy link
Member Author

snazy commented Feb 2, 2026

Add comment + moved AWS/KMS specific usage of 'account id' from an ARN to where it is used (only for KMS)

@dimas-b
Copy link
Contributor

dimas-b commented Feb 2, 2026

@MonkeyCanCode : AssumeRole for MinIO is already covered by RestCatalogMinIOSpecialIT and PolarisRestCatalogMinIOIT

Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @snazy !

@snazy snazy merged commit 29ccdd1 into apache:main Feb 3, 2026
15 checks passed
@snazy snazy deleted the sts-role-arn-unrestrict branch February 3, 2026 10:38
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Feb 3, 2026
sungwy pushed a commit to sungwy/polaris that referenced this pull request Feb 7, 2026
Certain non-AWS STS service implementations use role ARNs that look quite different from AWS ones.
This change shall enable those STS implementations.

Example role ARNs that currently fail:
* `urn:ecs:sts::s3:assumed-role/s3assumeRole/user1-105-temp`
* `urn:sgws:identity::12345:group/foo-bar-abcdef`

Related issue apache#2743
snazy added a commit to snazy/polaris that referenced this pull request Feb 11, 2026
snazy added a commit to snazy/polaris that referenced this pull request Feb 11, 2026
* fix(site): Bump the binary distribution version. (apache#3624)

Co-authored-by: ChristopherQu <[email protected]>

* chore(deps): update actions/stale digest to dcd2b94 (apache#3643)

* security(getting-started): enforce stronger postgres password and restrict database access (apache#3570)

* security(getting-started): enforce strong postgres passwords and restrict database access

- Add POSTGRES_PASSWORD environment variable to specify the Postgres
  database password.
- Add validation to reject weak default "postgres" password.
- Generate random 16-character password if POSTGRES_PASSWORD is not
  provided.
- Replace all hardcoded "postgres" password references with
  $POSTGRES_PASSWORD variable.
- Restrict Azure PostgreSQL access to VM's public IP using
  `--public-access` flag. This aligns security posture across AWS
  (VPC-only), Azure (IP-restricted), and GCP (authorized-networks)
- Update documentation site to describe the POSTGRES_PASSWORD
  environment variable.

* OpenAPI specs: update README with detailed API specifications (apache#3629)

* CI: simplify `ci-incr-build-cache-save` action usage (apache#3626)

* CI: simplify upload-artifacts call + only on failure (apache#3627)

* CI: simplify java-setup action usage (apache#3628)

* STS roleArn: enable 3rd party STS services (apache#3619)

Certain non-AWS STS service implementations use role ARNs that look quite different from AWS ones.
This change shall enable those STS implementations.

Example role ARNs that currently fail:
* `urn:ecs:sts::s3:assumed-role/s3assumeRole/user1-105-temp`
* `urn:sgws:identity::12345:group/foo-bar-abcdef`

Related issue apache#2743

* Last merged commit 29ccdd1

---------

Co-authored-by: HJ Q. <[email protected]>
Co-authored-by: ChristopherQu <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Pierre Laporte <[email protected]>
Co-authored-by: Alexandre Dutra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants