Dependencies (PRO)¶
PRO Feature
Dependency mapping and full-stack rotation require a PRO tier license.
Dependencies maps which Azure resources consume Key Vault credentials, enabling blast radius analysis and coordinated full-stack rotation.
Overview¶
Dependencies solves a critical question: "If I rotate this secret, what breaks?"
- Resource discovery: Find all Azure resources that use Key Vault credentials
- Dependency mapping: Map credentials to their consumers
- Blast radius analysis: Understand impact before rotation
- Full-stack rotation: Rotate credential AND update all dependent resources
- Automatic rollback: Restore previous state if any update fails
Supported Resource Types¶
Dependencies supports 11 Azure resource types:
Compute¶
| Resource | Description |
|---|---|
| App Services | Web apps with Key Vault references |
| Function Apps | Serverless functions using KV |
| Container Apps | Containerized workloads |
| AKS Clusters | Kubernetes with CSI driver |
Integration¶
| Resource | Description |
|---|---|
| Logic Apps | Workflow connections |
| API Management | Named values and backends |
| Data Factory | Linked services |
Messaging¶
| Resource | Description |
|---|---|
| Service Bus | Connection strings |
| Event Hubs | Connection strings |
Data¶
| Resource | Description |
|---|---|
| SQL Servers | Admin credentials |
| Storage Accounts | Connection strings |
How Dependency Mapping Works¶
Discovery Phase¶
- Scan Azure resources: Query ARM for supported resource types
- Extract configuration: Read app settings, connection strings
- Identify KV references: Find
@Microsoft.KeyVault(...)patterns - Match to secrets: Link references to discovered secrets
Matching Algorithms¶
Dependencies uses multiple matching methods:
| Method | Confidence | Description |
|---|---|---|
| Key Vault Reference | High | Exact @Microsoft.KeyVault(SecretUri=...) match |
| Name Similarity | Medium | Fuzzy matching on secret/resource names |
| Tag Matching | Medium | Matching Azure tags |
| Value Hint | Low | Partial value matching (first/last chars) |
Confidence Levels¶
| Level | Score | Meaning |
|---|---|---|
| HIGH | ≥0.60 | Very likely correct match |
| MEDIUM | 0.45-0.59 | Probable match, verify |
| LOW | 0.30-0.44 | Possible match, manual review |
| NONE | <0.30 | No match found |
Viewing Dependencies¶
Dependency Graph¶
- Go to Assets tab
- Click on a vault
- Select a secret
- View Dependencies panel
The dependency graph shows:
- Secret at center
- Connected resources (App Services, Functions, etc.)
- Confidence indicators
- Resource health status
Blast Radius View¶
For a specific secret:
- Click Blast Radius button
- View all resources that would be affected
- Review confidence levels
- Identify any unknown dependencies
Full-Stack Rotation¶
Full-stack rotation updates a credential AND all its dependent resources in one operation.
How It Works¶
1. Generate new credential value
↓
2. Update Key Vault secret
↓
3. Update Resource 1 (App Service)
↓
4. Update Resource 2 (Function App)
↓
5. Update Resource N...
↓
6. Verify all resources healthy
↓
7. Complete (or rollback on failure)
Running Full-Stack Rotation¶
- Navigate to the secret in Assets
- Click Rotate button
- Review blast radius
- Confirm dependent resources to update
- Click Rotate Now
- Monitor progress in real-time
Rollback¶
If any resource update fails:
- Automatic rollback triggered
- Original secret value restored in Key Vault
- Resources reverted to previous config
- Failure logged with details
Resource Updates¶
App Services / Function Apps¶
Dependencies updates:
- Application settings (
@Microsoft.KeyVaultreferences) - Connection strings
- Slot settings (if applicable)
Container Apps¶
- Environment variables with KV references
- Secrets configuration
API Management¶
- Named values
- Backend credentials
Logic Apps¶
- Connection parameters
- Workflow definitions (if applicable)
SQL Servers¶
- Admin password (with caution)
Configuration¶
Enable Dependency Scanning¶
- Go to Settings > Dependencies
- Enable Dependency Scanning
- Configure scan schedule (daily recommended)
- Save
Excluded Resources¶
Exclude specific resources from dependency mapping:
- Go to Settings > Dependencies
- Add to Exclusion List
- Enter resource ID or pattern
- Save
Write Permissions¶
Full-stack rotation requires additional Azure permissions:
# Grant Contributor on resource groups containing dependent resources
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Contributor" \
--scope /subscriptions/{sub-id}/resourceGroups/{rg-name}
Or more granular roles:
Web Site Contributorfor App ServicesLogic App Contributorfor Logic Apps- etc.
API Reference¶
List Dependencies¶
Get Dependencies for Secret¶
Get Blast Radius¶
Response:
{
"secret": {
"id": "secret-123",
"name": "api-key",
"vault": "kv-production"
},
"affected_resources": [
{
"id": "/subscriptions/.../Microsoft.Web/sites/my-app",
"type": "Microsoft.Web/sites",
"name": "my-app",
"confidence": 0.85,
"match_method": "keyvault_reference"
}
],
"total_affected": 3
}
Trigger Full-Stack Rotation¶
POST /api/assets/dependencies/rotate/{secret_id}
Content-Type: application/json
{
"include_resources": ["resource-id-1", "resource-id-2"],
"skip_verification": false
}
Troubleshooting¶
Dependencies not found¶
Cause: Resources not using Key Vault references.
Fix: - Migrate to @Microsoft.KeyVault(...) references - Use Azure tags to improve matching
Low confidence matches¶
Cause: Naming conventions don't match.
Fix: - Add tags to both secrets and resources - Use consistent naming (e.g., api-key in both places)
Rotation failed - resource update error¶
Cause: Insufficient permissions on resource.
Fix: - Grant Contributor role on the resource group - Check resource-specific role requirements
Rollback triggered¶
Cause: One or more resources failed to update.
Check: - View rotation history for failure details - Check Azure Activity Log for errors - Verify resource permissions
Best Practices¶
- Use Key Vault References: Migrate to
@Microsoft.KeyVault(...)for high-confidence mapping - Consistent Naming: Use matching names for secrets and settings
- Tag Resources: Add
keyvault-secrettags for explicit mapping - Test in Non-Prod: Validate full-stack rotation in staging first
- Review Blast Radius: Always check impact before rotating
- Monitor After Rotation: Watch application health post-rotation