Skip to content

fix: Generate valid S3 policy resource ARNs for Dell ECS - #6146

Open
toki-t wants to merge 1 commit into
apache:mainfrom
toki-t:fix/dell-ecs-s3-policy-arn
Open

toki-t wants to merge 1 commit into
apache:mainfrom
toki-t:fix/dell-ecs-s3-policy-arn

Conversation

@toki-t

@toki-t toki-t commented Nov 19, 2026

Copy link
Copy Markdown

Summary

Fix S3 credential vending for Dell ECS, which requires different identifier formats for STS roles and S3 policy resources.

Dell ECS uses role URNs such as urn:ecs:iam::namespace:role/s3assumeRole. Polaris currently derives the S3 policy partition from that identifier, producing resources such as arn:ecs:s3:::bucket/path/*. ECS rejects these resources because it expects arn:aws:s3::: instead.

Changes

  • Use arn:aws:s3::: for S3 inline session policy resources when the configured role identifier starts with urn:ecs:.
  • Preserve the original ECS role URN in STS AssumeRole requests.
  • Leave partition handling for other role identifiers unchanged.
  • Add a regression test covering both the role identifier and generated policy resources.
  • Document the ECS-specific identifier handling.

No new configuration options or public API changes are introduced.

Testing

  • Passed ./gradlew format compileAll check.
  • Added testGetSubscopedCredsEcsInlinePolicy to verify that:
    • STS receives the original ECS role URN.
    • S3 bucket and object resources use the AWS ARN partition.
  • Manually tested against Dell ECS 3.8.1.7 using Apache Spark and a custom Polaris 1.9.0-SNAPSHOT build:
    • Created an Iceberg table.
    • Wrote and read data using credentials vended by Polaris through ECS STS.
    • Dropped the table with PURGE and verified deletion of the corresponding metadata and data files.

AI assistance

AI assistance was used to prepare the implementation, regression test, documentation, and PR description.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Added a changelog entry in changelog.d/ (if needed, see changelog.d/README.md)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

Related to #2743

Keep ECS role URNs unchanged in STS AssumeRole requests while using arn:aws:s3::: for S3 session policy resources.

Add a regression test and document the ECS-specific ARN handling.

Related to apache#2743

This branch has not been deployed

No deployments
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.

1 participant