Governance Anti Patterns Authentication - Azure/az-prototype GitHub Wiki
Authentication method detection — ensures managed identity and Entra ID are used
Domain: authentication
| Check | Description |
|---|---|
| ANTI-AUTH-001 | SQL authentication with username/password detected — use Microsoft Entra (Azure AD) authentication with managed identity. |
| ANTI-AUTH-002 | Key Vault using access policies — switch to RBAC authorization model (enableRbacAuthorization = true). |
| ANTI-AUTH-003 | SAS token detected — use managed identity with appropriate RBAC role instead. |
| ANTI-AUTH-004 | Cosmos DB local authentication detected — disable local auth and use Entra RBAC with sqlRoleAssignments. |
SQL authentication with username/password detected — use Microsoft Entra (Azure AD) authentication with managed identity.
Rationale: SQL authentication with passwords is vulnerable to brute force attacks and cannot be audited through Entra ID conditional access.
Agents: terraform-agent, bicep-agent
| Services | Triggers On | Correct Patterns |
|---|---|---|
|
|
|
Key Vault using access policies — switch to RBAC authorization model (enableRbacAuthorization = true).
Rationale: Access policies provide coarse-grained control and cannot leverage Entra ID conditional access, PIM, or per-identity audit trails.
Agents: terraform-agent, bicep-agent
| Services | Triggers On | Correct Patterns |
|---|---|---|
|
|
|
SAS token detected — use managed identity with appropriate RBAC role instead.
Rationale: SAS tokens are time-limited shared secrets that cannot be revoked individually and bypass RBAC audit trails.
Agents: terraform-agent, bicep-agent, app-developer, csharp-developer, python-developer
| Services | Triggers On | Correct Patterns |
|---|---|---|
|
|
|
Cosmos DB local authentication detected — disable local auth and use Entra RBAC with sqlRoleAssignments.
Rationale: Cosmos DB key authentication uses shared master keys that grant full access — Entra RBAC provides per-identity scoping and audit.
Agents: terraform-agent, bicep-agent
| Services | Triggers On | Correct Patterns |
|---|---|---|
|
|
|