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

IR-363: Update Azure Credentials Request manifest of the Cluster Image Registry Operator to use new API field for requesting permissions #890

Merged
merged 1 commit into from Aug 11, 2023

Conversation

abutcher
Copy link
Member

@abutcher abutcher commented Jul 31, 2023

Utilizes new CredentialsRequests API field dataPermissions for necessary blob data actions as per the Storage Blob Data Contributor Azure built-in role.

IR-363
supersedes #859

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 31, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 31, 2023

@abutcher: This pull request references IR-363 which is a valid jira issue.

In response to this:

Utilizes new CredentialsRequests API field 'dataPermissionsfor necessary blob data actions as per theStorage Blob Data Contributor` Azure built-in role.

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-robot
Copy link
Contributor

openshift-ci-robot commented Jul 31, 2023

@abutcher: This pull request references IR-363 which is a valid jira issue.

In response to this:

Utilizes new CredentialsRequests API field dataPermissions for necessary blob data actions as per the Storage Blob Data Contributor Azure built-in role.

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.

@dmage
Copy link
Member

dmage commented Aug 1, 2023

/hold
until this PR gets all approvals

@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 Aug 1, 2023
@dmage
Copy link
Member

dmage commented Aug 1, 2023

/lgtm

@dmage
Copy link
Member

dmage commented Aug 1, 2023

/assign @sferich888
/assign @xiuwang
/assign @stevsmit
for PX, QE, and Docs approvals

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 1, 2023
@abutcher
Copy link
Member Author

abutcher commented Aug 1, 2023

Marking WIP. We need to validate openshift/cloud-credential-operator#584.

@abutcher abutcher changed the title IR-363: Update Azure Credentials Request manifest of the Cluster Image Registry Operator to use new API field for requesting permissions WIP: IR-363: Update Azure Credentials Request manifest of the Cluster Image Registry Operator to use new API field for requesting permissions Aug 1, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 1, 2023
@abutcher
Copy link
Member Author

abutcher commented Aug 1, 2023

Tested with a ClusterBot cluster along with openshift/cloud-credential-operator#584.

workflow-launch openshift-e2e-azure-manual-oidc-workload-identity https://github.com/openshift/cluster-image-registry-operator/pull/890,https://github.com/openshift/cloud-credential-operator/pull/584

Credentials provisioning build log:

2023/08/01 13:44:34 Created user-assigned managed identity /subscriptions/d38f1e38-4bed-438e-b227-833f997adf6a/resourcegroups/ci-ln-85fqhg2-1d09d-oidc/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ci-ln-85fqhg2-1d09d-openshift-image-registry-installer-cloud-credentials
2023/08/01 13:44:35 Created customRole ci-ln-85fqhg2-1d09d-openshift-image-registry-installer-cloud-credentials /subscriptions/d38f1e38-4bed-438e-b227-833f997adf6a/providers/Microsoft.Authorization/roleDefinitions/59425494-e5ca-437e-a42d-703759845cc2
2023/08/01 13:44:36 Failed to get role definition. This is likely due to a replication delay. Retrying...
2023/08/01 13:44:46 Failed to get role definition. This is likely due to a replication delay. Retrying...
2023/08/01 13:44:56 Failed to get role definition. This is likely due to a replication delay. Retrying...
2023/08/01 13:45:06 Failed to get role definition. This is likely due to a replication delay. Retrying...
2023/08/01 13:45:18 Created role assignment for role ci-ln-85fqhg2-1d09d-openshift-image-registry-installer-cloud-credentials with user-assigned managed identity principal ID 200a9a2a-e967-4311-9bef-90ed2b36accb at scope /subscriptions/d38f1e38-4bed-438e-b227-833f997adf6a/resourceGroups/ci-ln-85fqhg2-1d09d
2023/08/01 13:45:18 Created federated identity credential /subscriptions/d38f1e38-4bed-438e-b227-833f997adf6a/resourcegroups/ci-ln-85fqhg2-1d09d-oidc/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ci-ln-85fqhg2-1d09d-openshift-image-registry-installer-cloud-credentials/federatedIdentityCredentials/cluster-image-registry-operator
2023/08/01 13:45:19 Created federated identity credential /subscriptions/d38f1e38-4bed-438e-b227-833f997adf6a/resourcegroups/ci-ln-85fqhg2-1d09d-oidc/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ci-ln-85fqhg2-1d09d-openshift-image-registry-installer-cloud-credentials/federatedIdentityCredentials/registry
2023/08/01 13:45:19 Saved credentials configuration to: /tmp/manifests/openshift-image-registry-installer-cloud-credentials-credentials.yaml

Permissions in this PR are sufficient based on the image registry cluster operator status:

status:
  conditions:
  - lastTransitionTime: "2023-08-01T14:35:27Z"
    message: |-
      Available: The registry is ready
      NodeCADaemonAvailable: The daemon set node-ca has available replicas
      ImagePrunerAvailable: Pruner CronJob has been created
    reason: Ready
    status: "True"
    type: Available

@abutcher
Copy link
Member Author

abutcher commented Aug 1, 2023

Will run e2e once more after openshift/cloud-credential-operator#584 merges.

@jstuever
Copy link
Contributor

jstuever commented Aug 1, 2023

/test e2e-azure-manual-oidc

@xiuwang
Copy link

xiuwang commented Aug 2, 2023

/retest

@xiuwang
Copy link

xiuwang commented Aug 2, 2023

@abutcher Hi, I meet 403 AuthorizationPermissionMismatch when push data to image registry on the clusterbot cluster along this change

workflow-launch openshift-e2e-azure-manual-oidc-workload-identity https://github.com/openshift/cluster-image-registry-operator/pull/890

The error is

time="2023-08-02T03:49:09.464587516Z" level=error msg="response completed with error" err.code=unknown err.detail="DELETE https://imageregistrycilnvbqps8z.blob.core.windows.net/ci-ln-vbdypib-1d09d-v6nz5-image-registry-fowlglvujdxuarjpetbru/docker/registry/v2/repositories/wxj/httpd-ex/_uploads/24ee7d03-287d-4352-942d-3aeddd4303be/data\n--------------------------------------------------------------------------------\nRESPONSE 403: 403 This request is not authorized to perform this operation using this permission.\nERROR CODE: AuthorizationPermissionMismatch\n--------------------------------------------------------------------------------\n\ufeff<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>AuthorizationPermissionMismatch</Code><Message>This request is not authorized to perform this operation using this permission.\nRequestId:2cbe7a78-501e-0068-01f4-c44b6b000000\nTime:2023-08-02T03:49:09.4357584Z</Message></Error>\n--------------------------------------------------------------------------------\n" err.message="unknown error" go.version=go1.20.3 http.request.host="image-registry.openshift-image-registry.svc:5000" http.request.id=35c07284-3f7f-4c12-846d-6a2db5e41e48 http.request.method=DELETE http.request.remoteaddr="10.129.2.13:57818" http.request.uri="/v2/wxj/httpd-ex/blobs/uploads/24ee7d03-287d-4352-942d-3aeddd4303be?_state=Xxo4m9IcwD5JJEKPqcMQrx-KS5djUEhUHUaWiptI5YV7Ik5hbWUiOiJ3eGovaHR0cGQtZXgiLCJVVUlEIjoiMjRlZTdkMDMtMjg3ZC00MzUyLTk0MmQtM2FlZGRkNDMwM2JlIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTA4LTAyVDAzOjQ5OjA5LjMzMzQ0MDEwMloifQ%3D%3D" http.request.useragent="containers/5.26.1 (github.com/containers/image)" http.response.contenttype=application/json http.response.duration=71.28021ms http.response.status=500 http.response.written=0 openshift.auth.user="system:serviceaccount:wxj:builder" vars.name=wxj/httpd-ex vars.uuid=24ee7d03-287d-4352-942d-3aeddd4303be

@abutcher
Copy link
Member Author

abutcher commented Aug 2, 2023

@xiuwang Ack!

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 2, 2023
@abutcher
Copy link
Member Author

abutcher commented Aug 2, 2023

@xiuwang I've added Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete to the dataPermissions based on the documented permissions in the Storage Blob Data Contributor role. I think this will allow the DELETE operation to succeed.

@abutcher
Copy link
Member Author

abutcher commented Aug 2, 2023

/test e2e-azure-manual-oidc

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 2, 2023

@abutcher: This pull request references IR-363 which is a valid jira issue.

In response to this:

Utilizes new CredentialsRequests API field dataPermissions for necessary blob data actions as per the Storage Blob Data Contributor Azure built-in role.

IR-363
supersedes #859

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 2, 2023

@abutcher: This pull request references IR-363 which is a valid jira issue.

In response to this:

Utilizes new CredentialsRequests API field dataPermissions for necessary blob data actions as per the Storage Blob Data Contributor Azure built-in role.

IR-363
supersedes #859

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.

@abutcher
Copy link
Member Author

abutcher commented Aug 3, 2023

Tested with latest permissions and image upload to internal registry succeeds. Updated OCPBUGS-17247.

@abutcher abutcher changed the title WIP: IR-363: Update Azure Credentials Request manifest of the Cluster Image Registry Operator to use new API field for requesting permissions IR-363: Update Azure Credentials Request manifest of the Cluster Image Registry Operator to use new API field for requesting permissions Aug 3, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 3, 2023
@abutcher
Copy link
Member Author

abutcher commented Aug 3, 2023

/test e2e-azure-manual-oidc

1 similar comment
@jstuever
Copy link
Contributor

jstuever commented Aug 3, 2023

/test e2e-azure-manual-oidc

@xiuwang
Copy link

xiuwang commented Aug 4, 2023

/retest

@xiuwang
Copy link

xiuwang commented Aug 4, 2023

/label qe-approved

Verified OCPBUGS-17247.
And do regression test on this change, no new issue found.

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Aug 4, 2023
@xiuwang
Copy link

xiuwang commented Aug 7, 2023

/retest

@flavianmissi
Copy link
Member

thanks Andrew!
/lgtm

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

openshift-ci bot commented Aug 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abutcher, dmage, flavianmissi

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

@flavianmissi
Copy link
Member

/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 Aug 8, 2023
@newtonheath
Copy link

@flavianmissi - things look close - whats your take?

@abutcher
Copy link
Member Author

Do we need docs-approved, px-approved labels?

@stevsmit
Copy link
Member

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Aug 10, 2023
@sferich888
Copy link
Contributor

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Aug 10, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6de7fae and 2 for PR HEAD 6ef401e in total

@flavianmissi
Copy link
Member

/retest

1 similar comment
@flavianmissi
Copy link
Member

/retest

@flavianmissi
Copy link
Member

different flake failure
/retest-required

@abutcher
Copy link
Member Author

/retest-required

@abutcher
Copy link
Member Author

abutcher commented Aug 11, 2023

e2e-ovirt-sdn: ovirt is no longer a supported platform in install-config openshift/installer#7213

edit: this is an optional test per the CI config but can probably be removed

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 11, 2023

@abutcher: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ovirt-sdn 6ef401e link false /test e2e-ovirt-sdn

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-robot openshift-merge-robot merged commit 4e96bc4 into openshift:master Aug 11, 2023
10 of 11 checks passed
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. docs-approved Signifies that Docs has signed off on this PR 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. px-approved Signifies that Product Support has signed off on this PR 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

10 participants