Secret Rotation (PRO + ENTERPRISE)¶
Tiered Feature
STARTER tier includes 3 manual rotations per month. PRO and ENTERPRISE tiers include 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 across naming, metadata, and Azure context to link App Registration secrets to Key Vault entries.
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
Managing Targets¶
Manage Targets edits which Key Vault entries a record updates. Removing a target is staged: the row is struck through with an Undo option, and nothing is deleted until you click Save.
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 credential removed automatically after the 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
Certificate Rotation¶
Certificate rotation renews one certificate (same key and thumbprint) and writes it to all matched and manual targets - including multiple certificates with different names in the same vault.
Grace Period, Cleanup, and Rollback¶
After a successful rotation the old credential is not removed immediately. It stays valid for the configured grace window (default 24 hours, configurable in Settings > Advanced), giving anything still using the old value time to pick up the new one.
Automatic Cleanup¶
When the grace window elapses, a background worker removes the old credential automatically. History entries show a pending indicator until cleanup completes.
Force Cleanup Early¶
Operators can complete cleanup without waiting:
- Go to Automation > Rotation > History
- Find the entry with cleanup pending
- Use the cleanup action - the old credential is removed immediately, completing the grace period early and unblocking re-rotation. The new credential stays in place.
Rollback¶
While cleanup is still pending, a rotation can be rolled back from History: the new credential is removed and the previous one is restored, reverting matched Key Vault entries to their prior values.
- Available for corporate App Registration rotations only
- Only while the grace-period cleanup is still pending
- Secret rotations need at least one matched Key Vault secret to revert; manual-target-only rotations cannot be rolled back
Credential Ownership¶
Each rotation record can carry an optional owner (name and email):
- Set the owner when editing a rotation record
- On rotation, the Key Vault entry is tagged with
certifyclouds-ownerandcertifyclouds-owner-email - Owners receive owner-scoped copies of rotation and expiry alert emails for their credentials - see Alerts
Rotation Settings¶
Configuration Options¶
| Setting | Description |
|---|---|
| Default Expiry | New secret validity period |
| Min Confidence | Minimum confidence for auto-rotation |
| Grace Period | Hours to keep the old credential after rotation (default 24) |
| 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
Rotating CertifyClouds' Own Credentials¶
CertifyClouds authenticates to your Microsoft Entra tenant using its own credentials: the service principal secret used for B2C discovery, and the application secret used for SSO sign-in. Like any credential these expire, and if they lapse, discovery or SSO login stops working.
CertifyClouds monitors both credentials and can rotate them for you.
Expiry monitoring¶
A background monitor reads the live expiry of each credential from Microsoft Graph and shows it in Settings:
- B2C discovery secret on each B2C tenant card
- SSO application secret on the SSO configuration panel
When a credential nears its threshold (30 days), CertifyClouds raises the same expiry alert it uses for your own App Registration credentials.
Automatic and manual rotation¶
Rotation is opt-in per credential:
- Auto-rotate before expiry: toggle on, and CertifyClouds rotates the credential automatically before it expires.
- Rotate now: rotate immediately at any time.
Each rotation mints a new credential, verifies it works before trusting it (a real Microsoft Graph token acquisition), persists it, and only then retires the old one. There is no window in which CertifyClouds is left without a valid credential.
Permissions
The B2C discovery service principal rotates its own secret (it already holds Application.ReadWrite.All). The SSO application secret is rotated by the platform Managed Identity.
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
Edits to rotation records are also written to the audit log with a human-readable before / after summary of what changed.
API access¶
Rotation endpoints are listed in API Endpoints; exact request and response shapes are in your deployment's /docs.
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