azurenoops / azurenoops/spin_agent

F-14 [Medium] Terraform stores raw SQL admin password in Key Vault connection string — use Managed Identity instead

Open Beginner friendly
#663 0 comments 0 reactions 0 assignees View on GitHub
agent: Thor enhancement priority: medium
Dominant language
C#
Stars
3
Forks
1
Avg merge
18h 9m
Merged PRs (30d)
43

Description

## Summary\n\n`infra/terraform/main.tf` stores `azurerm_key_vault_secret.sql_connection_string` with a plain `Password=...` embedded in the connection string. The application already supports Managed Identity authentication for SQL, making the stored password unnecessary.\n\n## Affected Files\n\n- `infra/terraform/main.tf` — `azurerm_key_vault_secret.sql_connection_string`\n\n## Impact\n\nSQL admin password is stored in Key Vault in plain text. Unnecessary credential sprawl and elevated risk if the secret is accessed by unauthorized principals.\n\n## Fix\n\n- Switch to a Managed Identity connection string (no password required).\n- Remove the password from the Key Vault secret.\n\n## References\n\n- Audit artifact: `spin-agent-full-audit.md` (project artifact 1e910fcc580a4cb0)\n- Auditor: Thor

Contributor guide

Open the contributing guide

Research direction

Open infra/terraform/main.tf and inspect the azurerm_key_vault_secret.sql_connection_string definition first. Confirm how the application’s existing Managed Identity SQL authentication is represented, then validate the Terraform configuration and check that the resulting secret contains no password while still providing the required connection details.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, sql, terraform
Domain
cloud, infrastructure, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.