test: prototype DEV mock-MSI ACL isolation (ARO-29287) - #6818
Draft
Mike Gahagan (mgahagan73) wants to merge 1 commit into
Draft
Mike Gahagan (mgahagan73) wants to merge 1 commit into
Mike Gahagan (mgahagan73) wants to merge 1 commit into
Conversation
DEV cluster-delete-missing-identities is vacuous while the job-leased mock SP still has subscription ACL. Isolate strip/restore on a Parallelism-1 suite so sibling specs and personal-dev mock2 are never touched. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mgahagan73 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
|
Skipping CI for Draft Pull Request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.redhat.com/browse/ARO-29287
Related: ARO-29290, ARO-29288, ARO-29289
What
Adds a DEV-only e2e spec and dedicated suite
development/mock-msi-acl(Parallelismis the literal1) that strips, then restores, the job-leased mock-MSI subscription grants so cluster delete can be shown to work when the identity used for cluster ops has no ACL.test/e2e/cluster_delete_missing_identities_dev_mock_msi.go(Mock-MSI-ACL,MIContainers:0, dedicated UAMIs).LEASED_MSI_MOCK_SP/ARO_HCP_MSI_MOCK_PRINCIPAL_ID, list withassignedTo('{id}'), strip, restore the same assignment GUIDs. Refusesaro-dev-msi-mock2.test/e2e/cluster_delete_missing_identities.gostaysStageAndProdOnly.docs/ci/mock-msi-acl-isolation.md(false-pass if Helm drifted, personal-dev overlay).Does not wire
openshift/release(ARO-29289) or change the hardcoded MI dataplane client.Why
In DEV every operator authenticates as one mock SP. Deleting customer UAMIs does not remove that SP's subscription
dev-msi-mock/ Key Vault Crypto User grants, so the STG/PROD missing-identity delete spec is vacuous if run in DEV. The high-value ARO-29096 signal is that delete still works when that impersonated identity has no ACL.Ginkgo
Serialdoes not serialize across OTE workers, and the default DEV suite isParallelism: 24, so stripping the job's mock SP in-place would fail sibling specs. Isolation is "this invocation owns the leased pool SP exclusively", not "mutate a shared grant while 24 specs are using it". Shared personal-devaro-dev-msi-mock2must never be stripped.Testing
Unit tests:
test/util/framework/mock_msi_permissions_test.go— lease resolve (mock2 refuse, pool lookup, env mismatch),assignedTolist filter, strip/restore (RoleAssignmentExistsis success on restore).Integration tests: none. This is e2e + suite wiring; no RP/Cosmos artifact change.
E2E: personal-dev soak on pool member 19 (
aro-hcp-msi-mock-cs-sp-dev-19). Create + viability, strip both subscription assignments, delete customer UAMIs, cluster delete to ARM 404 and managed RG 404,DeferCleanuprestored both GUIDs.SUCCESS! -- 1 Passed | 0 Failed.Failure modes seen while bringing pers up (spec/helpers did fail closed as intended): ARM
400 UnsupportedQueryonprincipalId eq(filter isassignedTo);AADSTS700027when HelmclientIdand mounted cert disagree; spec refuses to strip mock2. A 4.21 complete-create sanity created a viable cluster first; that spec later failed on a local:8443port-forward drop during node pool wait — this PR spec does not create a node pool.Not in the default DEV parallel job.
LEASED_MSI_MOCK_SPis still provision-only until ARO-29290.Special notes for your reviewer
Parallelism: 1must stay a literal.ARO_HCP_SUITE_PARALLELISMmust not raise it.aro-dev-msi-mock2while the test strips a pool member, delete can false-pass. See the false-pass section in the isolation doc; ARO-29290 should smoke running pods, not only rendered config.miMock*must be put back on mock2 after overlay testing.PR Checklist
If E2E tests are included:
demonstrate that the test is able to detect a defect/error and fail with
proper error message and logs which communicates nature of the problem.
Made with Cursor