Commit Graph
3 Commits
Author SHA1 Message Date
cooper-oai 091008729d Share runtime authentication across requests and credential refreshes (#55413)
## What changed

Add `RuntimeAuthManager` to share one registered runtime per credential source and return request-scoped `RuntimeAuth` values that pair the runtime with its credentials and HTTP client factory.

- Preserve registration keys and idempotency IDs across retryable failures and refreshes that retain the credential source.
- Replace the runtime when the credential source changes, preserve existing request snapshots, and reject late registration responses for a previous source.
- Use bounded credential recovery for registration `401` responses and cache `403` denials until the credential source changes.
- Expose authenticated actor and agent host information on `RuntimeAgentInstance`.

## Testing

Add tests for concurrent registration sharing, retry identity preservation, network policy recovery, credential refresh and replacement, bounded recovery, cached denials, and credential changes during registration.

GitOrigin-RevId: ea1e6e10a5939e8c3f7c0c317ccf8a83522c635f
2026-10-20 00:48:09 +00:00
cooper-oai 79a19cbb30 Add ephemeral runtime registration and signed assertions (#55402)
## What changed

Extend `codex-runtime-agent-instance` with a registration client and an in-memory assertion signer. Pending registrations retain their signing key and idempotency key across caller-driven retries; registered runtimes generate fresh versioned assertions with a timestamp and unique ID.

Bound registration requests and responses, reject unsafe endpoints, disable redirects and request logging, and preserve network policy errors. Report server rejections using only the status and recognized error codes.

## Testing

Add HTTP-backed tests for retry stability, assertion signatures and freshness, policy revocation, endpoint and response validation, redirect refusal, and error redaction.

GitOrigin-RevId: a6dab0900459dfb75f72652a0a2ee1e4b65ca322
2026-10-19 23:01:54 +00:00
cooper-oai c3bb20602d Add wire types for runtime agent registration (#55398)
## What changed

Add `codex-runtime-agent-instance` with serializable registration requests and deserializable responses. Requests support OAuth, personal access tokens, and platform API keys, along with an installation ID, public key, harness metadata, and runtime role. Responses include runtime and host IDs plus ChatGPT or platform actor context.

Use `RedactedString` for credentials to keep secrets out of debug output.

## Testing

Add tests covering request serialization for all three credential types, debug redaction, response decoding for both actor types, and rejection of responses missing required fields.

GitOrigin-RevId: f33bae734fdd1402144dee407e5b868f5eef1d37
2026-10-19 22:21:46 +00:00