Secret Rotation (PRO)¶
Tiered Feature
STARTER tier includes 3 manual rotations per month. PRO tier includes unlimited automated rotation.
Rotation automates the rotation of App Registration secrets and certificates, updating all linked Key Vault secrets in one operation.
Overview¶
Rotation solves the credential rotation problem:
- App Registration discovery: Find all App Registrations in your tenant
- Secret matching: Link App Registration secrets to Key Vault entries
- One-click rotation: Generate new credentials and update vaults
- Rotation history: Complete audit trail of all rotations
- Exclusion patterns: Skip specific apps or secrets
How Rotation Works¶
The Problem¶
When an App Registration secret expires:
- Generate new secret in Azure AD
- Find all Key Vaults storing the secret
- Update each Key Vault secret
- Update any applications using the secret
- Verify everything works
- Delete the old secret
Without CertifyClouds: Manual, error-prone, time-consuming
With CertifyClouds: One click, automated, audited
The Solution¶
App Registration Key Vaults
┌────────────────────┐ ┌─────────────────────────────┐
│ MyApp │ │ kv-prod: myapp-secret │
│ ├── Secret 1 ──────┼─────│ kv-dev: myapp-dev-secret │
│ └── Secret 2 │ │ kv-staging: myapp-secret-v2 │
└────────────────────┘ └─────────────────────────────┘
│
▼
CertifyClouds Rotation
│
▼
1. Generate new secret
2. Update all KV entries
3. Verify
4. Audit log
App Registration Discovery¶
Initial Discovery¶
Run discovery to find all App Registrations:
- Go to Automation > Rotation
- Click Run Discovery
- Wait for discovery to complete
- View discovered apps with their secrets
What's Discovered¶
| Attribute | Description |
|---|---|
| App Name | Display name of the app |
| App ID | Application (client) ID |
| Object ID | Azure AD object ID |
| Secret Count | Number of secrets/passwords |
| Certificate Count | Number of certificates |
| Expiry Dates | When each credential expires |
Discovery Schedule¶
Configure automatic discovery:
- Go to Settings > Rotation
- Enable Scheduled Discovery
- Set frequency (daily/weekly)
- Save
Secret Matching¶
How Matching Works¶
CertifyClouds analyses multiple signals to link App Registration secrets to Key Vault entries — including certificate thumbprints, value hints, name patterns, Azure tags, and subscription context.
Confidence Levels¶
Each match is assigned a confidence level:
| Confidence | Action |
|---|---|
| HIGH | Safe to auto-rotate |
| MEDIUM | Verify before rotating |
| LOW | Manual review needed |
| NONE | No match found |
Improving Matches¶
To improve matching accuracy:
- Use consistent naming:
{app-name}-client-secret - Add tags:
app-id,app-nametags on KV secrets - Store App ID: Include App ID in secret name or tags
- Use hint caching: Enable to speed up matching
Running Rotation¶
Single Secret Rotation¶
- Go to Automation > Rotation
- Find the App Registration
- Click Rotate on the target secret
- Review:
- Linked Key Vault secrets (what will be updated)
- New expiry date
- Confidence level
- Click Confirm Rotation
- Monitor progress
Bulk Rotation¶
Rotate multiple secrets at once:
- Select multiple apps/secrets
- Click Rotate Selected
- Review all affected Key Vaults
- Confirm
Scheduled Rotation¶
Set up automatic rotation for secrets approaching expiry:
- Go to Settings > Rotation
- Enable Auto-Rotation
- Configure:
- Days before expiry to rotate (e.g., 30)
- Minimum confidence (e.g., HIGH only)
- Notification settings
- Save
Rotation Workflow¶
Step-by-Step¶
- Initiate: User clicks Rotate or auto-rotation triggers
- Generate: New secret created in Azure AD
- Update Key Vaults: All matched secrets updated
- Verify: Confirm new values are accessible
- Audit: Log rotation details
- Notify: Send success/failure notification
- Cleanup: Old secret can be deleted after grace period
Real-time Progress¶
Monitor rotation in real-time:
- WebSocket updates for progress
- Status per Key Vault update
- Error details if any step fails
Rotation Settings¶
Configuration Options¶
| Setting | Description |
|---|---|
| Default Expiry | New secret validity period |
| Min Confidence | Minimum confidence for auto-rotation |
| Grace Period | Days to keep old secret after rotation |
| Max Concurrent | Parallel rotation jobs |
Exclusions¶
Exclude apps or secrets from rotation:
- Go to Settings > Rotation > Exclusions
- Add exclusion:
- By App ID
- By App name pattern
- By secret name pattern
- Save
Example Exclusions¶
app-id:12345678-*- Exclude specific appname:legacy-*- Exclude apps with "legacy" prefixsecret:do-not-rotate- Exclude secrets with specific name
Permissions Required¶
Microsoft Graph API¶
| Permission | Type | Purpose |
|---|---|---|
Application.Read.All | Application | Read App Registrations |
Application.ReadWrite.All | Application | Create/delete secrets |
Key Vault¶
| Permission | Purpose |
|---|---|
| Key Vault Secrets Officer | Update secret values |
Granting Permissions¶
Grant the required Graph API permissions via the Azure Portal or CLI:
- Navigate to Azure AD > App Registrations > Your App > API Permissions
- Add
Application.Read.AllandApplication.ReadWrite.All(Application type) from Microsoft Graph - Click Grant admin consent
Grant Key Vault access via RBAC:
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Key Vault Secrets Officer" \
--scope /subscriptions/{sub-id}
Rotation History¶
View all rotation events:
- Go to Automation > Rotation
- Click History tab
- Filter by:
- Date range
- App name
- Status (success/failed)
History Entry Details¶
Each entry includes:
- Timestamp
- App Registration
- Secret rotated
- Key Vaults updated
- New expiry date
- Actor (user or system)
- Status and any errors
API Reference¶
Run Discovery¶
List App Registrations¶
Get Matches for App¶
Rotate Secret¶
POST /api/automation/rotation/rotate
Content-Type: application/json
{
"app_id": "12345678-1234-1234-1234-123456789012",
"secret_id": "secret-key-id",
"expiry_days": 365,
"update_key_vaults": true
}
Get Rotation History¶
Troubleshooting¶
"No matches found"¶
Cause: Can't link App Registration secret to Key Vault.
Fix: - Add tags to Key Vault secrets (app-id, app-name) - Enable hint caching for value matching - Use consistent naming conventions
"Insufficient permissions"¶
Cause: Missing Graph API or Key Vault permissions.
Fix: - Grant Application.ReadWrite.All Graph permission - Grant Key Vault Secrets Officer role - Ensure admin consent is granted
"Rotation failed - Key Vault update error"¶
Cause: Can't update specific Key Vault.
Fix: - Check Key Vault permissions - Verify Key Vault is not soft-deleted - Check network access to Key Vault
"Low confidence matches"¶
Cause: Naming conventions don't align.
Fix: - Add explicit tags linking app to secrets - Rename secrets to include App ID - Review and manually verify matches
Best Practices¶
- Run discovery first: Always start with discovery before rotation
- Verify matches: Review low/medium confidence matches before rotating
- Start with HIGH confidence: Only auto-rotate HIGH confidence matches
- Test in non-prod: Validate rotation process in staging first
- Monitor alerts: Set up notifications for rotation events
- Keep grace period: Don't delete old secrets immediately
- Document exclusions: Record why specific apps are excluded