Repository navigation
Close known limits: replication epoch and rejoin, key sources, online backups, two-factor, secondary indexes - #11
ChromaBeast wants to merge 18 commits into
Conversation
…m to refuse stale or diverged logs
…xes, background build, filtered scan)
…fix of the leader's (API, audit, beastctl rejoin)
… log - crypt: key specs file:/env:/exec: (no shell, timeout, stderr discarded), zeroing of owned key buffers, Rewrap (atomic keyring replace) - beastctl rekey --rewrap-only; server flags -encryption-key-env/-cmd - audit: sealed lines (AES-256-GCM, chain unchanged), plaintext and sealed both open, conversion both ways with encrypt/decrypt/rekey, interrupted-conversion recovery - Settings/Studio report key source kind and audit log state from the running engine - ADR 0003: online DEK rotation and rollback detection designed, not built; user store and tokens were already inside the engine - rebuilt embedded Studio bundle
RFC 6238 TOTP (standard library only) with hashed single-use recovery codes, replay protection, per-account and per-address limiting on the sign-in limiter, enrolment/disable/regenerate in Studio Settings, admin reset, an optional require_2fa_admins runtime setting (default off), audit entries that never carry codes or secrets, and -reset-admin-2fa for lockout recovery. See ADR 0005.
…irectory - CreateSnapshot holds the engine lock only for the checkpoint; the data file copy runs beside traffic. imageMu keeps checkpoints and Close out until the copy ends (ADR 0005). - backup.Destination with a directory and an exec-hook implementation; startup flags only, runtime pause switch, audit entries, no credentials held. - beastctl restore --new-dir: verify, stage, open, then rename into a path that must not exist. Studio generates the command and shows readiness. - Runbook and README corrected to the real beastctl flags.
… follower bearer token (-leader-token); rebuild embedded bundle; ADR update
…ted commands; docs
…e to new directory)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…it log in encryption test
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7bc4ec4f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| body, _ := json.Marshal(map[string]string{"leaderAddr": leader}) | ||
| resp, err = client.Post(base.String()+"/api/replication/rejoin", "application/json", bytes.NewReader(body)) |
There was a problem hiding this comment.
Complete two-factor authentication before rejoining
When the admin account has TOTP enabled or require_2fa_admins is on, /login returns HTTP 200 with only a pending cookie, not a session. This command discards that response and immediately calls the admin-protected rejoin API, so beastctl rejoin fails with 403 in those deployments. Handle the verification or setup step before making this call.
Useful? React with 👍 / 👎.
Summary
Closes the first round of known limits from #10. Five branches merged together on top of
main:beastctl rejoin), Studio add-replica command and replica lag view, follower bearer token.rekey --rewrap-only, sealed audit log. Online data-key rotation and rollback detection are designed in the ADR only.ADRs were renumbered so each has its own number (0005 backups, 0006 indexes, 0007 two-factor). Generated protobuf code was regenerated from the merged
.proto.Still not built
Automatic leader election, online key rotation, rollback detection, slow-query index suggestions, KMS integrations beyond the exec hook.
Test plan
go build ./... && go vet ./... && go test ./... -racebun test,bun run build,govulncheck ./...