feat: Allow disabling local accounts permission - #155
Open
mitch-hamm wants to merge 1 commit into
Open
Conversation
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.
Summary
Adds "Azure Kubernetes Service RBAC Cluster Admin" (role ID
b1ff04bb-8a4e-4dc4-8eb5-8693973ce19b) to the ABAC condition on the vendor-access "Role Based Access Control Administrator" role assignment.This is required for the
enable_local_accounts=falsefeature interraform-azurerm-cloud. When local accounts are disabled on an AKS cluster, Azure RBAC is used for K8s authorization. The Terraform SP needs to assign itself "Azure Kubernetes Service RBAC Cluster Admin" duringterraform applyso it can manage K8s resources in subsequent bootstrap steps. Without this role in the ABAC allowlist, that assignment fails withAuthorization_RequestDenied.Why ABAC?
The customer grants the automation SP "Role Based Access Control Administrator" with an ABAC condition that restricts which roles it can assign — preventing the SP from granting itself arbitrary permissions. The allowlist already includes AKS cluster admin/user roles; this change adds the one additional role needed for Azure-RBAC-enabled clusters.
Impact on Existing Customers
This is additive — the ABAC condition only gains a new allowed role, no existing permissions are removed. Existing customers who want to use
enable_local_accounts=falsewill need to re-runterraform applyon theirterraform-managed-cloudvendor-access module to pick up the updated condition. Customers not using this feature are unaffected.Related
terraform-azurerm-cloudPR: streamnative/terraform-azurerm-cloud#71 (addsenable_local_accountsvariable and the role assignment resource that requires this permission)Test Plan
533d34c1-8210-4979-837d-5223b800c47eviaaz restPUTenable_local_accounts=falsesucceeded — role assignment no longer hitsAuthorization_RequestDenied