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

audit followup: organization resources should be managed by script #1659

Closed
thockin opened this issue Feb 16, 2021 · 16 comments · Fixed by #1737
Closed

audit followup: organization resources should be managed by script #1659

thockin opened this issue Feb 16, 2021 · 16 comments · Fixed by #1737
Assignees
Labels
area/access Define who has access to what via IAM bindings, role bindings, policy, etc. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Milestone

Comments

@thockin
Copy link
Member

thockin commented Feb 16, 2021

For example, there's a Role "prow.viewer" that is not set up anywhere.

@justaugustus
Copy link
Member

@thockin -- I'm working on infra bring up for another project, which included some crude copy/pasting of what's in k/k8s.io.

As part of that, I have a WIP refactor of the groups/** logic (working title: ggreconcile): uwu-tools/ggreconcile#1

Want me to see how far I can take that?

@thockin
Copy link
Member Author

thockin commented Feb 17, 2021

Always interested in refactor, though groups is a bit different from the org-roles?

@justaugustus
Copy link
Member

Yep, yep, but I did have to end up copying in snippets of the infra scripts, so replacing some portion of them is on my list too for that other project. 🙃

Longer term --> https://twitter.com/stephenaugustus/status/1361686269823225859

@spiffxp
Copy link
Member

spiffxp commented Feb 17, 2021

@thockin that role is created here: https://github.com/kubernetes/k8s.io/blob/main/infra/gcp/prow/ensure-e2e-projects.sh#L35-L40

I was going to shuffle things around so k8s-infra-prow-oncall@ had /approve rights to scripts they had permissions to run, I can undo if you'd rather leave everything in a flat namespace until we sort out how to organize

@spiffxp
Copy link
Member

spiffxp commented Feb 17, 2021

#1656 - help wanted, script creation of the custom role definition from primitive roles

@spiffxp
Copy link
Member

spiffxp commented Feb 18, 2021

/assign
#1679 is a start

@spiffxp
Copy link
Member

spiffxp commented Feb 18, 2021

There are individuals assigned roles at the org level that I'm less inclined to script.

The TODO's I dropped in that PR are what I consider sufficient to close this out

@spiffxp
Copy link
Member

spiffxp commented Feb 19, 2021

/sig testing
/sig release
/area access
/priority important-longterm
/milestone v1.21

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/release Categorizes an issue or PR as relevant to SIG Release. labels Feb 19, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Feb 19, 2021
@k8s-ci-robot k8s-ci-robot added area/access Define who has access to what via IAM bindings, role bindings, policy, etc. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Feb 19, 2021
@spiffxp
Copy link
Member

spiffxp commented Feb 26, 2021

/retitle audit followup: organization resources should be managed by script

@k8s-ci-robot k8s-ci-robot changed the title Need a script or TF to control the org audit followup: organization resources should be managed by script Feb 26, 2021
@spiffxp
Copy link
Member

spiffxp commented Feb 26, 2021

#1726 addresses the majority of this, one more PR for cleanup after that merges

@spiffxp
Copy link
Member

spiffxp commented Mar 16, 2021

/reopen
not quite done

@k8s-ci-robot
Copy link
Contributor

@spiffxp: Reopened this issue.

In response to this:

/reopen
not quite done

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.

@spiffxp
Copy link
Member

spiffxp commented Apr 6, 2021

#1859 contains changes to ensure-main-project.sh that remove the project-level ServiceAccountLister role in favor of the org-level ServiceAccountLister role. Change was deployed per #1859 (comment)

@ameukam ameukam removed this from the v1.21 milestone Apr 22, 2021
@spiffxp
Copy link
Member

spiffxp commented Jun 11, 2021

/close
At this point infra/gcp/ensure-organization.sh does the following:

  • add (most) IAM bindings
  • add custom roles
  • remove hardcoded IAM bindings
  • remove hardcoded custom roles

I think there is still some manual noise at the IAM level, but audit PR's over the past few months have shown very few surprises. I'm comfortable calling this done and opening audit followup issues for whatever further tightening or resource support (folders, org policies) we deem necessary.

@k8s-ci-robot
Copy link
Contributor

@spiffxp: Closing this issue.

In response to this:

/close
At this point infra/gcp/ensure-organization.sh does the following:

  • add (most) IAM bindings
  • add custom roles
  • remove hardcoded IAM bindings
  • remove hardcoded custom roles

I think there is still some manual noise at the IAM level, but audit PR's over the past few months have shown very few surprises. I'm comfortable calling this done and opening audit followup issues for whatever further tightening or resource support (folders, org policies) we deem necessary.

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.

@spiffxp
Copy link
Member

spiffxp commented Jun 11, 2021

/milestone v1.22

@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/access Define who has access to what via IAM bindings, role bindings, policy, etc. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants