Policy Versioning
Version Control
Every change to a policy creates a new version. View version history:
- Go to Governance → Policies → [Policy]
- Click Versions tab
- See all versions with timestamps and author
Example:
Version 1.2 (Current, Deployed) Author: john@company.com Deployed: Mar 15, 2025 10:30 UTC Changes: Increased token threshold from 10K to 15K
Version 1.1 (Previous) Author: sarah@company.com Deployed: Mar 10, 2025 14:20 UTC Changes: Added PII check for emails
Version 1.0 (Initial) Author: jane@company.com Deployed: Mar 1, 2025 09:00 UTC Changes: Original policy creationComparing Versions
See what changed between versions:
- Click Versions → Select two versions
- View Diff:
- OLD: entity_types: ["ssn", "email"]+ NEW: entity_types: ["ssn", "email", "phone"]- OLD: confidence_threshold: 0.95+ NEW: confidence_threshold: 0.85
Rollback to Previous Version
Revert to an earlier version:
- Go to Versions
- Find version to revert to
- Click Rollback
- Confirm you want to revert
- New version created with previous content
- Policy updated immediately
Example Rollback Scenario:
Deployed Version 2.0 (has bugs) ↓ User reports false positives ↓ Click Rollback to Version 1.5 ↓ Version 1.5 re-deployed as 2.1 ↓ Production stable againVersion Naming
Auto-generated semantic versioning:
- Major (X.0.0): Significant logic change (e.g., from block to warn)
- Minor (X.Y.0): Configuration change (e.g., threshold adjustment)
- Patch (X.Y.Z): Bug fix (e.g., regex correction)
Examples:
1.0.0 → Initial release1.1.0 → Add new check type1.1.1 → Fix regex typo2.0.0 → Change from allowlist to blocklistDeployment History
See which versions are deployed:
Version 2.1 (Prod) Deployed to: Production Status: Active Coverage: 100% of users
Version 1.5 (Staging) Deployed to: Staging Status: Active Coverage: 10% of production traffic
Version 2.0 (Rollback) Deployed to: None Status: Inactive Reason: Rollback due to false positivesConditional Deployment
Deploy different versions to different groups:
Version 2.0 → 10% of users (canary) → Monitor for 24 hours → If good: 100% → If bad: Rollback
Version 1.5 → 90% of users (stable) → Continue runningAudit Trail for Versions
Every change tracked:
Mar 15, 10:30 - sarah deployed version 1.2 Change: Confidence threshold 0.95 → 0.85 Reason: Too many false negatives Approvals: john, jane
Mar 10, 14:20 - john deployed version 1.1 Change: Added email pattern check Reason: User privacy concern Approvals: jane
Mar 1, 09:00 - jane deployed version 1.0 Change: Initial policy Reason: PII protection requirement Approvals: ctoRetention & Cleanup
Old versions kept for audit trail:
Retention:
- Keep versions: Indefinite by default
- Soft delete: Mark as deleted but keep history
- Hard delete: After 1 year (configurable)
Cleanup:
Go to Settings → Governance → Version RetentionSet: Keep versions for 2 yearsAuto-delete after: YesAPI Version Access
# List all versionscurl http://localhost:5000/api/v1/governance/policies/123/versions \ -H "Authorization: Bearer $TOKEN"
# Get specific versioncurl http://localhost:5000/api/v1/governance/policies/123/versions/1.2 \ -H "Authorization: Bearer $TOKEN"
# Rollback to versioncurl -X POST http://localhost:5000/api/v1/governance/policies/123/rollback \ -H "Authorization: Bearer $TOKEN" \ -d '{"version": "1.0"}'