Add fail-closed SotyHub OIDC job boundary - #11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f55abaa685
ℹ️ 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".
| return { | ||
| "status": "preflight_allowed", | ||
| "dispatch_performed": False, | ||
| **result, |
There was a problem hiding this comment.
Do not return executable envelopes from preflight
Every successful call to this endpoint returns result["envelope"], even though the source-manifest hash is only claimed by /execution/service/jobs. Repeating preflight therefore produces independently signed JobSpecs with unique manifest IDs and digests; each can pass the worker's digest-based replay check and execute without ever creating the promised one-use source claim. Return only the policy decision and unsigned manifest here, reserving signed envelope issuance for the endpoint that atomically claims the source hash.
Useful? React with 👍 / 👎.
| return service_identity_verifier.verify( | ||
| credentials.credentials, | ||
| path=request.url.path, | ||
| ) |
There was a problem hiding this comment.
Move JWKS resolution off the async event loop
On a cache miss or attacker-supplied unknown kid, verify() calls the synchronous PyJWKClient.get_signing_key_from_jwt() and may perform an outbound HTTPS refresh. Because this dependency is async but invokes it directly, that network operation blocks the entire event loop; unauthenticated requests with rotating kid values can occupy all API workers while JWKS requests complete or time out. Run verification in a worker thread or use a nonblocking, bounded key-cache path.
Useful? React with 👍 / 👎.
What changed
/execution/service/*routes for SotyHub service-to-service callsforensics/hash_calculatorcanary withnetwork_mode=noneandevidence_readWhy
SotyHub needs a machine-to-machine bridge into BOFA without forwarding Firebase user tokens, introducing standing BOFA credentials, or enabling cloud mutation. This PR creates that narrow identity and evidence boundary while keeping actual dispatch disabled.
Operational boundary
dispatch_performed=falseValidation
tools/verify_sotyhub_service_identity.pytools/verify_execution_fabric.pytools/verify_worker_protocol.pytools/verify_worker_oci.pytools/verify_execution_api.pygit diff --checkFollow-up before merge or deployment
CI and review must pass. Deployment, sender identity creation, live OIDC exchange, image publication, and any managed dispatcher remain separate explicit decisions.