Repository navigation
fix(security): combine the storage, oci, cli, rbac, admin grpc and broker secret audit fixes - #1860
Merged
Merged
Conversation
…C and unify HandoffMarker
The chart rolls the coordinator and the orchestrator at the same time. An orchestrator that calls PauseSession or ResumeSession on a coordinator without those methods gets Unimplemented. This PR now ships only the coordinator methods, the generated clients, and the admin-only policy entries. The orchestrator route cutover moves to a follow-up that merges after this change is deployed. Restore admin.ts and config.ts to the REST proxy, keep the direct-RPC policy gate test, and make the coordinator comments state the current callers of the HTTP routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The handoff marker type moved to engram-protocol. The successor reads the file that the previous build wrote, so pin the pretty JSON bytes the writer produces. Also cover every post-crash state of the tmp-then-rename write: a torn marker at each byte offset is removed and reads as a fresh start, and a leftover tmp sibling is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… local tmp files, unify GCP auth
… schedule `seal_with_aad` and `open_with_aad` had no caller. A sealed row does not record whether it was sealed with AAD, so a reader cannot select the right open without a schema change, and an open that falls back to empty AAD gives no binding. The API stays out until a change adds the format marker and the callers together. Turn on the aes-gcm `zeroize` feature so the expanded AES and GHASH keys are cleared on drop, as the raw DEK and KEK already are. The persisted envelope format does not change; the aes-gcm 0.10.3 vector still opens. Restore the two facts the earlier cleanup dropped: why `SysRng` is used (a `!Send` RNG makes the seal future `!Send`), and that a failure of the fixed-vector test is a data problem, not a value to update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… redirects The address check ran a DNS lookup before every pull part, so a ranged layer pull did one lookup per part on the resume path. A registry that passes the check is now kept in a per-client set. A policy change (`with_insecure_loopback`, `with_private_registries`) clears the set, so a clone with a stricter policy does not reuse a looser result. The HEAD probe client refused all redirects. A registry with a redirecting storage driver answers a blob HEAD with a redirect, so a bake against it failed. Redirects now follow to HTTPS hosts that are not loopback names or private address literals, or to any HTTPS host when private registries are allowed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pback opt-in `ENGRAM_OCI_ALLOW_PRIVATE_REGISTRIES` is a new setting that a deployment with an in-cluster registry or a private registry endpoint must set, so the configuration reference lists it for the coordinator and the host agents. The compose file comment now names the loopback opt-in. The Tiltfile entries move next to the other local-service settings, away from the first line of `coord_env`, which another open change also edits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`list_prefix` hid every name that started with `.tmp.`, but no staging file has that shape: `put_streaming` names its staging file `<stem>.tmp.<pid>.<nanos>`. The rule hid valid keys such as `.tmp.key`. Only the real staging shape is now filtered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The coordinator sends ENGRAM_CONNECTION_BROKER_BEARER to the orchestrator's connection credential broker. The chart took it from the CONTROL_PLANE_BEARER key and could not set the orchestrator's CONNECTION_BROKER_BEARER, so every chart deployment used the control-plane bearer for the broker. `orchestrator.connectionBrokerSecret` (`existingSecret`, `key`) now feeds both variables from one Secret key, so they always match. When `existingSecret` is empty, the render is the same as before: the coordinator reads the CONTROL_PLANE_BEARER key, and the orchestrator env omits CONNECTION_BROKER_BEARER and falls back. This is the expand step; a later release makes the dedicated secret required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…request Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iltfile and tooling hygiene
write_hosts now closes the temp file before the rename, keeps the write or rename error when the cleanup also fails, and fsyncs the directory so the rename is durable. The test directory guard no longer panics in drop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…resume-grpc # Conflicts: # Cargo.lock
…o audit/combined-security-batch # Conflicts: # CHANGELOG.md
…audit/combined-security-batch # Conflicts: # CHANGELOG.md
… audit/combined-security-batch # Conflicts: # CHANGELOG.md
…' into audit/combined-security-batch # Conflicts: # crates/engram-coordinator/src/api/mod.rs
The coordinator HTTP router now fails closed when it has no auth tokens. The grpc_app fixture set only the app-gRPC tokens, so the HTTP leg of admin_pause_resume_preserves_state_and_error_mapping got 401. The fixture now gives the REST auth tokens the same list, and the HTTP request sends the bearer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 3, 2026
Closed
Closed
|
The latest Buf updates on your PR. Results from workflow CI / buf (pull_request).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR combines four reviewed PRs from the security audit into one change, so that they merge and deploy together: #1852, #1853, #1857 and #1859. Each source branch is merged in with a merge commit, so
git logkeeps each original commit. The only hand-resolved conflicts are:CHANGELOG.md: the union of each PR's upgrade notes.crates/engram-coordinator/src/api/mod.rs: the two-argumentAuthState::newand thelog_unauthenticated_posture()call from fix(coordinator): fail closed on capabilities and internal auth, check host ownership #1850, with the shorter comment from feat(coordinator,orchestrator): add app-gRPC admin pause/resume and unify HandoffMarker #1857.One new commit fixes a test. After #1850 the coordinator HTTP router fails closed. The HTTP leg of #1857's
admin_pause_resume_preserves_state_and_error_mappingsent no bearer, so it got 401. Now the test fixture gives the REST auth tokens the same list as the app-gRPC tokens, and the HTTP request sends the bearer.The original PRs carry the full description and review history of each part.
Storage, crypto and OCI (from #1852)
engram-cryptozeroizes raw DEKs, the key material from env vars, and the expanded AES and GHASH keys. The envelope format does not change.engram-ocirefuses registries at loopback, private, link-local and metadata addresses unlessENGRAM_OCI_ALLOW_PRIVATE_REGISTRIES=1is set. It sends plain HTTP to a loopback registry only whenENGRAM_OCI_ALLOW_INSECURE_LOOPBACK=1is set. The HEAD probe follows redirects only to public HTTPS hosts.engram-storage-localremoves its staging files when a put fails, and leaves them out of listings.deleteInstancescall carries arequestId.CLI, operator RBAC and tooling (from #1853)
hosts.jsonis written atomically with mode0o600. A corrupt file now gives an error; before, it silently wiped stored logins.ClusterRoleto a namespacedRoleandRoleBinding.env=. The justfile setserrexitandpipefail.seed-buckets.shusesmktemp. The stray.codex-review-*.mdfiles are removed.Admin pause/resume over app-gRPC (from #1857)
SessionService.PauseSessionandResumeSessioncall the same core functions as the HTTP routes, with the same admin-only authorization.audit/p1-admin-pause-resume-orch) merges only after this PR is deployed. The HTTP routes stay until then.HandoffMarkerhas one definition, inengram-protocol. Its bytes on the wire and on disk do not change, and a crash-state test pins them.Dedicated connection-broker secret (from #1859)
orchestrator.connectionBrokerSecret(existingSecret,key) gives the coordinator and the orchestrator the same broker bearer. When the value is unset, nothing changes. This is the expand step. A later release makes the dedicated secret mandatory.Before you deploy
RoleandRoleBindingin the release namespace, and must itself hold the Role's rules:daemonsets: get, list, watch, patchandpods: get, list, watch, delete. A cluster-admin deployer needs nothing. Grant these to a non-admin deploy identity before the upgrade.ENGRAM_OCI_ALLOW_PRIVATE_REGISTRIES=1on the coordinator and the host agents (extraEnv) before it rolls this build.CHANGELOG.mdhas the upgrade notes under[Unreleased].Validation
CI Gateon its own after a rebase onto current main.cargo fmt --all --check;cargo nextest run -p engram-coordinator --test grpc_app(21 pass);cargo clippy -D warningson coordinator, protocol, host-core, oci and crypto;cargo hakari generate --diff;orchestrator:bun run typecheck,pause-resume-policy.test.tsandauthz.matrix.test.ts(28 pass).CI Gateon this PR's head is the full gate.Supersedes #1852, #1853, #1857, #1859.
🤖 Generated with Claude Code