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

CCO-244: gcp-ro-credentialrequest to use granular permissions #626

Merged
merged 1 commit into from Dec 7, 2023

Conversation

jstuever
Copy link
Contributor

Switch the gcp-ro credential request to use granular permissions. It is only used by the actuator.needsUpdate() function. Everything else escalates to the root service account. The needsUpdate() function currently requires the following permissions as per the specified function calls.

iam.roles.get:
getPermissionsFromRoles()
serviceAccountNeedsPermissionsUpdate()
iam.serviceAccountKeys.list
serviceAccountKeyExists()
iam.serviceAccounts.get:
GetServiceAccount()
serviceAccountNeedsPermissionsUpdate()
resourcemanager.projects.get:
checkServicesEnabled()
resourcemanager.projects.getIamPolicy:
serviceAccountNeedsPermissionsUpdate()
serviceusage.services.list:
checkServicesEnabled()

Switch the gcp-ro credential request to use granular permissions. It
is only used by the actuator.needsUpdate() function. Everything else
escalates to the root service account. The needsUpdate() function
currently requires the following permissions as per the specified
function calls.

iam.roles.get:
  getPermissionsFromRoles()
  serviceAccountNeedsPermissionsUpdate()
iam.serviceAccountKeys.list
  serviceAccountKeyExists()
iam.serviceAccounts.get:
  GetServiceAccount()
  serviceAccountNeedsPermissionsUpdate()
resourcemanager.projects.get:
  checkServicesEnabled()
resourcemanager.projects.getIamPolicy:
  serviceAccountNeedsPermissionsUpdate()
serviceusage.services.list:
  checkServicesEnabled()
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 10, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 10, 2023

@jstuever: This pull request references CCO-224 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Switch the gcp-ro credential request to use granular permissions. It is only used by the actuator.needsUpdate() function. Everything else escalates to the root service account. The needsUpdate() function currently requires the following permissions as per the specified function calls.

iam.roles.get:
getPermissionsFromRoles()
serviceAccountNeedsPermissionsUpdate()
iam.serviceAccountKeys.list
serviceAccountKeyExists()
iam.serviceAccounts.get:
GetServiceAccount()
serviceAccountNeedsPermissionsUpdate()
resourcemanager.projects.get:
checkServicesEnabled()
resourcemanager.projects.getIamPolicy:
serviceAccountNeedsPermissionsUpdate()
serviceusage.services.list:
checkServicesEnabled()

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.

@jstuever jstuever changed the title CCO-224: gcp-ro-credentialrequest to use granular permissions CCO-244: gcp-ro-credentialrequest to use granular permissions Nov 10, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 10, 2023

@jstuever: This pull request references CCO-244 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Switch the gcp-ro credential request to use granular permissions. It is only used by the actuator.needsUpdate() function. Everything else escalates to the root service account. The needsUpdate() function currently requires the following permissions as per the specified function calls.

iam.roles.get:
getPermissionsFromRoles()
serviceAccountNeedsPermissionsUpdate()
iam.serviceAccountKeys.list
serviceAccountKeyExists()
iam.serviceAccounts.get:
GetServiceAccount()
serviceAccountNeedsPermissionsUpdate()
resourcemanager.projects.get:
checkServicesEnabled()
resourcemanager.projects.getIamPolicy:
serviceAccountNeedsPermissionsUpdate()
serviceusage.services.list:
checkServicesEnabled()

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.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 10, 2023
@jstuever
Copy link
Contributor Author

/hold
to allow time for custom roles to be purged from CI project(s).

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 13, 2023
@jstuever
Copy link
Contributor Author

/assign @dlom

@dlom
Copy link
Contributor

dlom commented Nov 17, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 17, 2023
Copy link
Contributor

openshift-ci bot commented Nov 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlom, jstuever

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

@dlom
Copy link
Contributor

dlom commented Nov 29, 2023

/override ci/prow/security

Copy link
Contributor

openshift-ci bot commented Nov 29, 2023

@dlom: Overrode contexts on behalf of dlom: ci/prow/security

In response to this:

/override ci/prow/security

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.

@huangmingxia
Copy link

/label qe-approved

Hi @jstuever @dlom Using image registry.build05.ci.openshift.org/ci-ln-26y52ck/release:latest trigger the upgrade CI Job 4.15-amd64-nightly-4.15-upgrade-from-stable-4.14-gcp-ipi-workload-identity-rt-fips-f14, the upgrade test was successful.

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Dec 5, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 5, 2023

@jstuever: This pull request references CCO-244 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Switch the gcp-ro credential request to use granular permissions. It is only used by the actuator.needsUpdate() function. Everything else escalates to the root service account. The needsUpdate() function currently requires the following permissions as per the specified function calls.

iam.roles.get:
getPermissionsFromRoles()
serviceAccountNeedsPermissionsUpdate()
iam.serviceAccountKeys.list
serviceAccountKeyExists()
iam.serviceAccounts.get:
GetServiceAccount()
serviceAccountNeedsPermissionsUpdate()
resourcemanager.projects.get:
checkServicesEnabled()
resourcemanager.projects.getIamPolicy:
serviceAccountNeedsPermissionsUpdate()
serviceusage.services.list:
checkServicesEnabled()

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.

@jstuever
Copy link
Contributor Author

jstuever commented Dec 6, 2023

/payload 4.15 nightly blocking

Copy link
Contributor

openshift-ci bot commented Dec 6, 2023

@jstuever: trigger 8 job(s) of type blocking for the nightly release of OCP 4.15

  • periodic-ci-openshift-release-master-nightly-4.15-e2e-aws-sdn-upgrade
  • periodic-ci-openshift-release-master-ci-4.15-e2e-azure-ovn-upgrade
  • periodic-ci-openshift-release-master-ci-4.15-upgrade-from-stable-4.14-e2e-gcp-ovn-rt-upgrade
  • periodic-ci-openshift-hypershift-release-4.15-periodics-e2e-aws-ovn-conformance
  • periodic-ci-openshift-release-master-nightly-4.15-e2e-aws-ovn-serial
  • periodic-ci-openshift-release-master-ci-4.15-e2e-aws-ovn-upgrade
  • periodic-ci-openshift-release-master-nightly-4.15-e2e-metal-ipi-ovn-ipv6
  • periodic-ci-openshift-release-master-nightly-4.15-e2e-metal-ipi-sdn-bm

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/5ad070e0-946d-11ee-9091-0086eb9d1944-0

@jstuever
Copy link
Contributor Author

jstuever commented Dec 6, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 6, 2023
Copy link
Contributor

openshift-ci bot commented Dec 7, 2023

@jstuever: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit da655f8 into openshift:master Dec 7, 2023
9 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cloud-credential-operator-container-v4.15.0-202312070130.p0.gda655f8.assembly.stream for distgit ose-cloud-credential-operator.
All builds following this will include this PR.

@jstuever jstuever deleted the CCO-224 branch March 13, 2024 16:50
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants