Imported from bare git on Zurich
Go to file
James a2cfff8ec2 Complete replication implementation with L0/L1 auth (Commercial Only)
Replication now fully functional for Commercial Edition:

Authentication:
- Uses existing vault L0/L1 credentials (same as vault access)
- L0 in X-Clavitor-L0 header (vault ID)
- L1 in X-Clavitor-L1 header (vault encryption key)
- Validated by opening vault DB with L1
- Anti-replay: 5-minute timestamp window

Architecture:
- Primary-only POPs: No config file needed
- Replication POPs (Calgary/Zurich): Config in /etc/clavitor/replication.yaml
- Config has replication.peers list (can be empty for primary-only)
- Event-driven: SignalReplication() on every write

Files added:
- api/replication.go: HTTP handler for incoming replication
- api/routes_commercial.go: Commercial-only route registration
- api/routes_community.go: Community stub
- lib/auth.go: ValidateL0L1() for vault credential validation
- lib/base64.go: Base64URLEncode/Base64URLDecode helpers

Files modified:
- edition/config.go: New config structure with peers list
- edition/edition.go: ReplicationConfig struct with peers
- edition/replication.go: Replicate to all peers, use new config
- edition/backup_mode.go: Removed env var, config-based
- cmd/clavitor/main.go: Load config, nil config = primary-only
- api/routes.go: Call registerCommercialRoutes()

Security:
- L0/L1 auth prevents unauthorized replication
- Timestamp window prevents replay attacks
- Audit alerts on auth failures and rejections
2026-04-02 01:21:20 -04:00
clavis Complete replication implementation with L0/L1 auth (Commercial Only) 2026-04-02 01:21:20 -04:00
clavitor.ai Replication v2: Active-Passive with Async Sync (Commercial Only) 2026-04-02 00:50:20 -04:00
design-system chore: auto-commit uncommitted changes 2026-03-24 06:02:53 -04:00
docs docs: add Futurepedia listing content for clavitor.ai (TASK-074) 2026-03-29 07:36:12 -04:00
marketing chore: auto-commit uncommitted changes 2026-03-24 06:02:53 -04:00
operations Replication v2: Active-Passive with Async Sync (Commercial Only) 2026-04-02 00:50:20 -04:00
.DS_Store chore: auto-commit uncommitted changes 2026-03-27 00:01:22 -04:00
._.DS_Store chore: auto-commit uncommitted changes 2026-03-24 06:02:53 -04:00
CLAUDE.md chore: auto-commit uncommitted changes 2026-03-26 06:03:15 -04:00