Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add SourceArn condition to Fargate profile trust policy #3039

Merged
merged 1 commit into from
May 16, 2024

Conversation

cpboyd
Copy link
Contributor

@cpboyd cpboyd commented May 16, 2024

Description

As suggested in AWS docs to prevent the security issue known as the confused deputy problem, adds SourceArn condition to fargate-profile module's assume_role_policy

Motivation and Context

Fixes #3038.
Suggested IAM trust policy per AWS docs "to avoid a confused deputy security problem."

Breaking Changes

Potentially breaks workflows where users may be using/assuming the IAM role generated by fargate-profile in an unintended manner, namely from other EKS instances.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@bryantbiggs bryantbiggs changed the title feat: add SourceArn condition to fargate-profile assume_role_policy feat: Add SourceArn condition to Fargate profile trust policy May 16, 2024
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

looks great to me, thank you!

@bryantbiggs bryantbiggs merged commit a070d7b into terraform-aws-modules:master May 16, 2024
17 of 18 checks passed
antonbabenko pushed a commit that referenced this pull request May 16, 2024
## [20.11.0](v20.10.0...v20.11.0) (2024-05-16)

### Features

* Add `SourceArn` condition to Fargate profile trust policy ([#3039](#3039)) ([a070d7b](a070d7b))
@antonbabenko
Copy link
Member

This PR is included in version 20.11.0 🎉

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2024
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.

fargate-profile: restrict role access based on SourceArn (or custom assume_role_policy)
3 participants