Fix Arc machine RBAC for listBootstrapData - #295
Merged
Conversation
Closed
Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix arc machine RBAC for listBootstrapData
Fix Arc machine RBAC for listBootstrapData
Aug 29, 2026
hbc (bcho)
requested changes
Aug 30, 2026
Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Arc-mode E2E node-join failures by aligning the Arc machine identity’s RBAC assignments with the MSI Flex Node identity so listBootstrapData and related AKS Machine operations don’t hit HTTP 403 (Issue #294).
Changes:
- Add missing built-in AKS role definition IDs (Cluster Admin, RBAC Cluster Admin) to the Arc join script.
- Assign all three required roles to the Arc machine principal at runtime (mirroring the MSI VM assignments in bicep).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
hbc (bcho)
requested changes
Sep 3, 2026
hbc (bcho)
left a comment
Member
There was a problem hiding this comment.
Copilot please address comments
Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, directly addresses the documented 403 root cause by matching the MSI node’s RBAC grants, and adds safe idempotent handling for existing assignments.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
hbc (bcho)
approved these changes
Sep 3, 2026
Alex Huang (wenhug)
approved these changes
Sep 3, 2026
reneeli123
approved these changes
Sep 3, 2026
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.
Arc-mode E2E node joins consistently failed with HTTP 403 on
listBootstrapData(15 min of retries exhausted), while the MSI Flex Node join in the same run succeeded.Root cause
infra/main.bicepgrants the MSI VM identity three built-in AKS roles at the cluster scope (Cluster Admin, Contributor, RBAC Cluster Admin). The Arc machine identity doesn't exist until afterazcmagent connect, so it can't be pre-provisioned via bicep —hack/e2e/lib/node-join-arc.shinstead assigns roles at runtime, but only granted Contributor, one of the three roles the MSI identity relies on for the same calls.Fix
hack/e2e/lib/node-join-arc.sh: added the missingCluster AdminandRBAC Cluster Adminrole definition IDs (matching the bicep constants) and loop over all three roles when assigning them to the Arc machine principal, mirroring exactly what the MSI VM gets ininfra/main.bicep.