Robertjam954/multimodal_rag_application / .claude/skills/azure-validate
azure-validate
VerifiedPre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| references/aspire-functions-secrets.md | markdown | 3.6 KB |
| references/global-rules.md | markdown | 1.2 KB |
| references/policy-validation.md | markdown | 1.5 KB |
| references/recipes/README.md | markdown | 374 B |
| references/recipes/azcli/README.md | markdown | 2.2 KB |
| references/recipes/azcli/errors.md | markdown | 505 B |
| references/recipes/azd/README.md | markdown | 5.3 KB |
| references/recipes/azd/aspire.md | markdown | 2.9 KB |
| references/recipes/azd/environment.md | markdown | 1.9 KB |
| references/recipes/azd/errors.md | markdown | 2.6 KB |
| references/recipes/bicep/README.md | markdown | 1.9 KB |
| references/recipes/bicep/errors.md | markdown | 374 B |
| references/recipes/terraform/README.md | markdown | 3.3 KB |
| references/recipes/terraform/errors.md | markdown | 2.8 KB |
| references/region-availability.md | markdown | 3.0 KB |
| references/role-verification.md | markdown | 3.9 KB |
references/role-verification.md
View on GitHub# Role Assignment Verification
Verify that all RBAC role assignments in the generated infrastructure are correct and sufficient before deployment. Incorrect or missing roles are a common cause of runtime failures.
## When to Verify
After build verification (step 4) and **before** recording proof (step 6). Role issues surface as cryptic auth errors during deployment β catching them here saves debugging time.
## Verification Checklist
Review every resource-to-identity relationship in the generated Bicep/Terraform:
| Check | How |
|-------|-----|
| **Every service identity has roles** | Each app with a managed identity must have at least one role assignment |
| **Roles match data operations** | Use service-specific **data-plane** roles for data access (see mapping table below); use generic Reader/Contributor/Owner only for management-plane operations |
| **Scope is least privilege** | Roles scoped to specific resources, not resource groups or subscriptions |
| **No missing roles** | Cross-check app code operations against assigned roles (see table below) |
| **Local dev identity has roles** | If testing locally, the user's identity needs equivalent roles via `az login` |
## Common Service-to-Role Mapping
| Service Operation | Required Role | Common Mistake |
|-------------------|---------------|----------------|
| Read blobs | Storage Blob Data Reader | Using generic Reader (no data access) |
| Read + write blobs | Storage Blob Data Contributor | Missing write permission |
| Generate SAS via user delegation | Storage Blob Delegator + Data Reader/Contributor | Forgetting Delegator role |
| Read Key Vault secrets | Key Vault Secrets User | Using Key Vault Reader (no secret access) |
| Read + write Cosmos DB | Cosmos DB Built-in Data Contributor | Using generic Contributor |
| Send Service Bus messages | Azure Service Bus Data Sender | Using generic Contributor |
| Read queues | Storage Queue Data Reader | Using Blob role for queues |
## How to Verify (Static Code Review)
Review the generated Bicep/Terraform files directly β do **not** query live Azure state here. For each role assignment resource in your infrastructure code:
1. Identify the **principal** (which managed identity)
2. Identify the **role** (which role definition)
3. Identify the **scope** (which target resource)
4. Cross-check against the app code to confirm the role grants the required data-plane access
> π‘ **Tip:** Search your Bicep for `Microsoft.Authorization/roleAssignments` or your Terraform for `azurerm_role_assignment` to find all role assignments.
> β οΈ **Live role verification** (querying Azure for actually provisioned roles) is handled by **azure-deploy** step 8 as a post-deployment check. This step is a static code review only.
## Decision Tree
```
For each app identity in the generated infrastructure:
βββ Has role assignments?
β βββ No β Add required role assignments to Bicep/Terraform
β βββ Yes β Check each role:
β βββ Role matches code operations? β β
OK
β βββ Role too broad? β Narrow to least privilege
β βββ Role insufficient? β Upgrade or add missing role
β
For local testing:
βββ User identity has equivalent roles?
β βββ No β Grant roles via CLI or inform user
β βββ Yes β β
Ready for functional verification
```
> β οΈ **Warning:** Generic roles like `Contributor` or `Reader` do **not** include data-plane access. For example, `Contributor` on a Storage Account cannot read blobs β you need `Storage Blob Data Contributor`. This is the most common RBAC mistake.
## Record in Plan
After role verification, update `.azure/deployment-plan.md`:
```markdown
## Role Assignment Verification
- Status: Verified / Issues Found
- Identities checked: <list of app identities>
- Roles confirmed: <list of role assignments>
- Issues: <any missing or incorrect roles fixed>
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |