feat: retain encrypted instance credentials and reissue v2 certificates
Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
@@ -27,3 +27,5 @@ go run ./cmd/migrate -dsn "$MIGRATION_DSN" -version 12 force
|
||||
On 2026-09-30, a dedicated MySQL 8.0 container was used to verify an empty database up/down cycle and an intentionally invalid migration: failure left version 2 dirty, normal `up` was blocked, and explicit force to the last known-good version restored clean metadata. The probe migrations and container were removed after the test. Version 3 adds transactional license operation idempotency records for revoke/renew; it must be applied explicitly after version 2. No placeholder SQL is considered an executed business migration; formal entitlement schemas and CI database integration remain T04/T03 acceptance work.
|
||||
|
||||
Schema 10 adds unique administrator usernames. Existing accounts become `admin-{id}` and retain their passwords; login requests must send `username` instead of `email`. Run migrations before starting the current server or `admin-init`.
|
||||
|
||||
Schema 11 adds nullable `license_instances.secret_encrypted`. Apply before API startup. Configure `LICENSE_CREDENTIAL_ENCRYPTION_KEY_FILE` as an absolute path to an independent 32-byte raw random key. Mount read-only, back up securely with the database, and never commit it. Missing key preserves first-return-only creation. Existing hashes cannot recover secrets. Losing/changing the key makes ciphertext unreadable; rotation is not implemented. Down migration deletes retained ciphertext and requires backup and confirmation.
|
||||
|
||||
Reference in New Issue
Block a user