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

fix(eks): overly permissive trust policies #25473

Merged
merged 33 commits into from
May 15, 2023

Conversation

iliapolo
Copy link
Contributor

@iliapolo iliapolo commented May 7, 2023

The CreationRole and the default MastersRole use the account root principal in their trust policy, which is overly permissive. Instead, use the specific lambda handler roles that need it, and remove the default masters role.

BREAKING CHANGE: A masters role is no longer provisioned by default. Use the mastersRole property to explicitly pass a role that needs cluster access. In addition, the creation role no longer allows any identity (with the appropriate sts:AssumeRole permissions) to assume it.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented May 7, 2023

@github-actions github-actions bot added the p2 label May 7, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team May 7, 2023 16:25
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 7, 2023
@iliapolo
Copy link
Contributor Author

iliapolo commented May 8, 2023

@comcalvi The EKS tests finally pass! :)

But looks like there are a bunch of step-functions tests that need updating as well.

@comcalvi comcalvi marked this pull request as ready for review May 9, 2023 21:27
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 10, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@iliapolo iliapolo added the pr-linter/exempt-breaking-change The PR linter will not require stability in stable modules label May 15, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review May 15, 2023 07:03

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@iliapolo iliapolo requested a review from a team May 15, 2023 07:31
@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@iliapolo iliapolo force-pushed the epolon/eks-creation-role-trust-policy branch from f3b633d to 3242e99 Compare May 15, 2023 08:05
@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@iliapolo iliapolo marked this pull request as ready for review May 15, 2023 16:12
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 3498490
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 51f0193 into main May 15, 2023
7 checks passed
@mergify mergify bot deleted the epolon/eks-creation-role-trust-policy branch May 15, 2023 16:39
mergify bot pushed a commit that referenced this pull request May 16, 2023
Backporting #25473

----

The *CreationRole* and the *default MastersRole* use the account root principal in their trust policy, which is overly permissive. Instead, use the specific lambda handler roles that need it, and remove the default masters role.

BREAKING CHANGE: A masters role is no longer provisioned by default. Use the `mastersRole` property to explicitly pass a role that needs cluster access. In addition, the creation role no longer allows any identity (with the appropriate `sts:AssumeRole` permissions) to assume it. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-breaking-change The PR linter will not require stability in stable modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants