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

Dynamic validation for workload identity permissions and requirements #3619

Merged
merged 14 commits into from
Sep 10, 2024

Conversation

rajdeepc2792
Copy link
Collaborator

@rajdeepc2792 rajdeepc2792 commented Jun 6, 2024

Which issue this PR addresses:

JIRA: ARO-4376

What this PR does / why we need it:

For the MIWI Cluster feature, this PR performs dynamic validation for the Platform Workload Identities and Cluster MSI.
Uses CheckAccessV2 to validate the actions for all the Platform Workload Identities and Cluster MSI.

During Cluster Creation:-

  • Fetch PlatformWorkloadIdentityRoleSet for the requested OCP version.
  • Match the count and OperatorNames associated with customer provided Platform Workload Identities and fetched PlatformWorkloadIdentityRoleSet.
  • Check permissions on the network resources for all the Platform Workload Identities using CheckAccessV2
  • Check the count of Cluster MSI(User Assigned Identity), it should be one.
  • Check the permission/actions(RoleAzureRedHatOpenShiftFederatedCredentialRole) on Platform Workload Identity for Cluster MSI.

Test plan for issue:

  • Unit Tests
  • CI
  • CI e2e
  • Local cluster installation

Is there any documentation that needs to be updated for this PR?

No

How do you know this will function as expected in production?

None of the environment should have an impact due to this change as the additional validation will only happen for MIWI clusters.

@rajdeepc2792
Copy link
Collaborator Author

/azp run ci,e2e

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@github-actions github-actions bot added the needs-rebase branch needs a rebase label Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

Please rebase pull request.

@github-actions github-actions bot removed the needs-rebase branch needs a rebase label Jun 12, 2024
@rajdeepc2792 rajdeepc2792 force-pushed the rajdeepc2792/ARO-4376 branch 2 times, most recently from 072ad43 to 71a3159 Compare June 13, 2024 21:56
Copy link

Please rebase pull request.

Copy link
Collaborator

@SudoBrendan SudoBrendan left a comment

Choose a reason for hiding this comment

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

.bingo has merged - please rebase this PR on master and fix the generate cases.

@rajdeepc2792
Copy link
Collaborator Author

/azp run ci,e2e

1 similar comment
@tsatam
Copy link
Collaborator

tsatam commented Sep 5, 2024

/azp run ci,e2e

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Collaborator

@SudoBrendan SudoBrendan left a comment

Choose a reason for hiding this comment

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

I think all my comments have been addressed :)

@tsatam tsatam merged commit 66f073f into master Sep 10, 2024
24 checks passed
edisonLcardenas pushed a commit that referenced this pull request Sep 16, 2024
…#3619)

* ARO-4376 Track2 authorization api addition for roledefinitions

* ARO-4376 add a stringutil funcs

* ARO-4376 use dbPlatformWorkloadIdentityRoleSets to get platform identity roles for cluster version

* ARO-4376 add dynamic validation for platformworkloadidentityprofile

* ARO-4376 resolve initial comments

* ARO-4376 refactor error messages and checkaccess action crosscheck

* ARO-4376 Add unit tests and comments resolution

* ARO-4376 add validation for upgradeableTo

* ARO-4376 Comment resoultion and additional unit tests

* ARO-4376 minor version comparison handling

* ARO-4376 update permission error messaging handling for MIWI

* ARO-4376 update constructors to return non-interface type

* ARO-4376 add unit tests for GroupsIntersect

* ARO-4376 update generate files to support bingo
edisonLcardenas pushed a commit that referenced this pull request Sep 17, 2024
…#3619)

* ARO-4376 Track2 authorization api addition for roledefinitions

* ARO-4376 add a stringutil funcs

* ARO-4376 use dbPlatformWorkloadIdentityRoleSets to get platform identity roles for cluster version

* ARO-4376 add dynamic validation for platformworkloadidentityprofile

* ARO-4376 resolve initial comments

* ARO-4376 refactor error messages and checkaccess action crosscheck

* ARO-4376 Add unit tests and comments resolution

* ARO-4376 add validation for upgradeableTo

* ARO-4376 Comment resoultion and additional unit tests

* ARO-4376 minor version comparison handling

* ARO-4376 update permission error messaging handling for MIWI

* ARO-4376 update constructors to return non-interface type

* ARO-4376 add unit tests for GroupsIntersect

* ARO-4376 update generate files to support bingo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chainsaw Pull requests or issues owned by Team Chainsaw ready-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants