Skip to content

Feature/assume role#47

Closed
sliu008 wants to merge 2 commits intodevelopfrom
feature/assume_role
Closed

Feature/assume role#47
sliu008 wants to merge 2 commits intodevelopfrom
feature/assume_role

Conversation

@sliu008
Copy link
Copy Markdown
Contributor

@sliu008 sliu008 commented Aug 7, 2025

Feature: S3 Role Assumption via Role Mapping

Summary of Changes:

  • New Capability:
    Forge now supports assuming AWS IAM roles for S3 downloads based on bucket name patterns, allowing access to buckets requiring different credentials than the default Lambda/ECS role.

  • Configuration:

    • Added support for a role_mappings object in the config, mapping regex patterns or exact bucket names to role ARNs.
    • Example and documentation provided in the new ROLE_MAPPING.md.
  • Code Changes:

    • Updated FootprintHandler.java:
      • Added logic to check for role mappings and assume roles using AWS STS when downloading from S3.
      • Refactored S3 download methods to accept config and use assumed credentials if needed.
      • Added helper methods for role assumption and credential management.
    • Updated dependencies in build.gradle to include aws-java-sdk-sts.
  • Documentation:

    • README.md updated with usage instructions and configuration examples.
    • New ROLE_MAPPING.md with detailed documentation and best practices.
  • Tests:

    • Enhanced FootprintHandlerTest.java:
      • Added tests for role mapping, regex matching, and download logic with/without role assumption.
      • Added a new test input file: input_with_role_mapping.json.
  • Files Added/Changed:

    • Major files: FootprintHandler.java, FootprintHandlerTest.java, ROLE_MAPPING.md, input_with_role_mapping.json, README.md, build.gradle.

@sliu008 sliu008 requested a review from jamesfwood August 7, 2025 19:39
@sliu008 sliu008 closed this Aug 29, 2025
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