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

Adding support for permission boundaries for AWS IAM Roles #9773

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

victorfrancax1
Copy link
Contributor

Refs #7286
Also adding Terrraform and Cloudformation support.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 17, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @victorfrancax1!

It looks like this is your first PR to kubernetes/kops 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kops has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 17, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @victorfrancax1. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added area/api size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/provider/aws Issues or PRs related to aws provider labels Aug 17, 2020
@hakman
Copy link
Member

hakman commented Aug 17, 2020

/ok-to-test
/cc @rifelpet

@k8s-ci-robot k8s-ci-robot requested a review from rifelpet August 17, 2020 16:23
@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 17, 2020
@rifelpet
Copy link
Member

overall this looks good. Can you add an integration test case for this? It should just involve setting the new api field with a dummy value in the two in-*.yaml files here and running ./hack/update-expected.sh and the terraform and cloudformation files in the same directory should be updated to match.

My only question is around the API design. Would it make sense to ever have separate permission boundaries for the master role vs the node role? If so we'd want the API to be able to support that.

@victorfrancax1
Copy link
Contributor Author

victorfrancax1 commented Aug 17, 2020

Hey @rifelpet , thanks for reviewing! I added an integration test case as requested.

About the API design: although being possible, it's seems very unlikely to me that people would need to set permission boundaries per instance role, since they were designed mainly to prevent privilege escalation. The furthest I would go personally is configuring different boundaries for each cluster, which is supported by this implementation. As stated by the author of the original issue (can't tag him here for some reason), should an edge case arise, we could suggest that they provide their own roles to kops. What do you think?

@hakman
Copy link
Member

hakman commented Aug 18, 2020

/test pull-kops-e2e-k8s-containerd

@victorfrancax1 victorfrancax1 force-pushed the 7286 branch 2 times, most recently from f0eca31 to cddbc9b Compare August 18, 2020 23:07
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 18, 2020
pkg/model/iam.go Outdated Show resolved Hide resolved
@rifelpet
Copy link
Member

one last comment and I think this will be good to merge :) thanks for adding this!

@rifelpet
Copy link
Member

/lgtm
/approve

This will land in Kops 1.19. I believe there will be another alpha release soon if you want to use it in an official build.

Thanks again!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 19, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet, victorfrancax1

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 19, 2020
@rifelpet
Copy link
Member

One more thing @victorfrancax1 would you mind adding some docs here? This can be done in a separate PR.

@k8s-ci-robot k8s-ci-robot merged commit 8a81d94 into kubernetes:master Aug 19, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Aug 19, 2020
@victorfrancax1 victorfrancax1 deleted the 7286 branch August 20, 2020 21:28
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. area/api area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants