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

Bug 1782583: destroy/gcp/policybinding.go: identity deleted service accounts belonging to the cluster #2790

Conversation

abhinavdahiya
Copy link
Contributor

Based on https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Binding

The members values can be:

deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding.

this looks like a new addition to the API since the archive from Oct 26, 2019 doesn't have these value type. see https://web.archive.org/web/20181026092140/https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Binding

Also it doesn't look like the API is being consistent with the result as two consecutive requests are returning different responses :P

[7:08:11] ➜  installer git:(add_platform_owners) ✗ gcloud projects get-iam-policy openshift-gce-devel-ci --format json | grep "ci-op-4wlm9"

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-i-nnvgl@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com",

[7:08:23] ➜  installer git:(add_platform_owners) ✗ gcloud projects get-iam-policy openshift-gce-devel-ci --format json | grep "ci-op-4wlm9"

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=115542993089051207368",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=106651455962694555805",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-i-nnvgl@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=113695655870612204124",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=103715387178859573892",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=115542993089051207368",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=103715387178859573892",

        "deleted:serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=106651455962694555805",

/assign @jstuever @patrickdillon

…ging to the cluster

Based on https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Binding

The members values can be:
```
deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding.
```

this looks like a new addition to the API since the archive from Oct 26, 2019 doesn't have these value type. see https://web.archive.org/web/20181026092140/https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Binding

Also it doesn't look like the API is being consistent with the result as two consecutive requests are returning different responses :P
```
[7:08:11] ➜  installer git:(add_platform_owners) ✗ gcloud projects get-iam-policy openshift-gce-devel-ci --format json | grep "ci-op-4wlm9"

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-i-nnvgl@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com",

        "serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com",

[7:08:23] ➜  installer git:(add_platform_owners) ✗ gcloud projects get-iam-policy openshift-gce-devel-ci --format json | grep "ci-op-4wlm9"

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=115542993089051207368",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=106651455962694555805",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-i-nnvgl@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=113695655870612204124",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=103715387178859573892",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-m-w75nq@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=115542993089051207368",

        "deleted:serviceAccount:ci-op-4wlm9-m@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=111636284758116941377",

        "deleted:serviceAccount:ci-op-4wlm9-openshift-i-zh522@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=103715387178859573892",

        "deleted:serviceAccount:ci-op-4wlm9-w@openshift-gce-devel-ci.iam.gserviceaccount.com?uid=106651455962694555805",
```
@abhinavdahiya
Copy link
Contributor Author

/test e2e-gcp

@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 11, 2019
@abhinavdahiya
Copy link
Contributor Author

/cherrypick release-4.3

@openshift-cherrypick-robot

@abhinavdahiya: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.3

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.

@cgwalters
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2019
@abhinavdahiya
Copy link
Contributor Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

Copy link
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, cgwalters, 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

@jstuever
Copy link
Contributor

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@abhinavdahiya
Copy link
Contributor Author

/override ci/prow/e2e-aws-upgrade

this doesn't affect aws upgrades, and this is causing leaks in the CI for GCP changed behavior.
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_installer/2790/pull-ci-openshift-installer-master-e2e-gcp/155/artifacts/e2e-gcp/installer/.openshift_install.log

shows that deleted:serviceAcccount: were cleaned

@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: Overrode contexts on behalf of abhinavdahiya: ci/prow/e2e-aws-upgrade

In response to this:

/override ci/prow/e2e-aws-upgrade

this doesn't affect aws upgrades, and this is causing leaks in the CI for GCP changed behavior.
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_installer/2790/pull-ci-openshift-installer-master-e2e-gcp/155/artifacts/e2e-gcp/installer/.openshift_install.log

shows that deleted:serviceAcccount: were cleaned

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.

@abhinavdahiya abhinavdahiya changed the title destroy/gcp/policybinding.go: identity deleted service accounts belonging to the cluster Bug 1782583: destroy/gcp/policybinding.go: identity deleted service accounts belonging to the cluster Dec 11, 2019
@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Dec 11, 2019
@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: This pull request references Bugzilla bug 1782583, which is invalid:

  • expected the bug to target the "4.4.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1782583: destroy/gcp/policybinding.go: identity deleted service accounts belonging to the cluster

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.

@abhinavdahiya
Copy link
Contributor Author

/override ci/prow/e2e-aws

@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: Overrode contexts on behalf of abhinavdahiya: ci/prow/e2e-aws

In response to this:

/override ci/prow/e2e-aws

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.

@abhinavdahiya
Copy link
Contributor Author

/refresh
/skip

@abhinavdahiya
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: This pull request references Bugzilla bug 1782583, which is invalid:

  • expected the bug to target the "4.4.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@abhinavdahiya
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Dec 11, 2019
@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: This pull request references Bugzilla bug 1782583, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

/bugzilla refresh

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-merge-robot openshift-merge-robot merged commit e261445 into openshift:master Dec 11, 2019
@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: All pull requests linked via external trackers have merged. Bugzilla bug 1782583 has been moved to the MODIFIED state.

In response to this:

Bug 1782583: destroy/gcp/policybinding.go: identity deleted service accounts belonging to the cluster

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-cherrypick-robot

@abhinavdahiya: new pull request created: #2796

In response to this:

/cherrypick release-4.3

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants