feat(agents-api): persist scoped Environment executor credentials - #592
Merged
Merged
Conversation
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.
Environment executors previously depended on a static digest file: provisioning or excluding a key required service restart, and registration replacement alone did not revoke its holder. This change issues one durable, randomly generated executor credential per Environment and lets the existing native registry enforce explicit rotation, revocation and owning Session deletion.
The operator command returns the secret once; PostgreSQL retains only its current digest, issue time and revocation state. Issuance cannot silently replace a credential. Registration, validation, socket attachment and live heartbeats check durable authority. Old requests cannot displace registration under a rotated key, and alternate UUID spellings cannot create another registration for the same Environment. Registry restart preserves credentials while invalidating process-local grants. The old executor-key-file setting fails explicitly with migration instructions; harness key configuration and native grants retain their separate lifetimes.
The independent binaries and container include
agents-api-environment-key. No public SDK routes/fields, Environment admission, model/tool loop, product behavior or dependencies change. Heartbeat-driven disconnection is not native process quiescence. Public caller/user/service-account equivalence and third-party-domain stock CLI authentication remain open.Validation:
make check, container regression,make sqlc-generate,make openapi(no public spec drift), focused race suites and diff checks passed on zju_a100_2.