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

Implement different roles for worker nodes & the control plane #3995

Merged
merged 8 commits into from
Aug 9, 2019

Conversation

mrIncompetent
Copy link
Contributor

What this PR does / why we need it:
This PR will make sure that we:

  • Create a very limited role for the worker nodes
  • Create a limited roles for the control plane (Uses assume-role)
  • Both roles will only(If the API action allows it) have access to resources which have the cluster specific Kubernetes tag(Kubernetes sets the tag when creating new resources). This ensures that we have a fairly strong isolation between AWS clusters using the same account.

I decided against creating new API credentials as that would not make any improvement, since the control plane does a assume-role.

Fixes #3716

Does this PR introduce a user-facing change?:

Reduce the AWS role permissions for the control-plane & worker role to the minimum

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. team/lifecycle size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 7, 2019
@mrIncompetent
Copy link
Contributor Author

/retest

@mrIncompetent
Copy link
Contributor Author

/assign @alvaroaleman

api/pkg/crd/kubermatic/v1/cluster.go Outdated Show resolved Hide resolved
api/pkg/crd/kubermatic/v1/cluster.go Outdated Show resolved Hide resolved
api/pkg/provider/cloud/aws/provider.go Show resolved Hide resolved
api/pkg/provider/cloud/aws/provider.go Show resolved Hide resolved
api/pkg/provider/cloud/aws/provider.go Outdated Show resolved Hide resolved
api/pkg/provider/cloud/aws/policy.go Show resolved Hide resolved
RouteTableID string `json:"routeTableId"`
InstanceProfileName string `json:"instanceProfileName"`
SecurityGroupID string `json:"securityGroupID"`

AvailabilityZone string `json:"availabilityZone"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you re-add this? @kdomanski deliberately remvoved it in #3986

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I screwed up the merge 🤦‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gone with 564566e

@alvaroaleman
Copy link
Contributor

/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 9, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: cf8160ccd84596054de1f21ffbe9c032a3034c7c

@mrIncompetent
Copy link
Contributor Author

/assign @zreigz

@zreigz
Copy link
Contributor

zreigz commented Aug 9, 2019

/approve

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, zreigz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 9, 2019
@kubermatic-bot kubermatic-bot merged commit d6c6e77 into master Aug 9, 2019
@kubermatic-bot kubermatic-bot added this to the v2.12 milestone Aug 9, 2019
@kubermatic-bot kubermatic-bot deleted the aws-policies branch August 9, 2019 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve AWS cluster separation
4 participants