WIP fase 2b-2: rimosso login ChatGPT/OAuth/device code, agent/workload identity, backend-client; resta solo chiave API (test non tutti verdi)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -80,14 +80,9 @@ Disconnecting either side closes its peer and resets the remote stream. The
|
||||
existing harness reconnect flow can then resume a retained destination session.
|
||||
The forwarder does not replay requests or persist execution state, so recovery
|
||||
is limited by the destination's session and process-output retention.
|
||||
It uses the standard Codex ChatGPT sign-in state; run `codex login` first when
|
||||
remote registration needs authentication. Containerized callers that receive an
|
||||
Agent Identity JWT in `CODEX_ACCESS_TOKEN` can opt into that auth path with
|
||||
`--use-agent-identity-auth`; Codex then registers an Agent task and sends the
|
||||
derived AgentAssertion headers on the registry request.
|
||||
|
||||
Alternatively, API users can instead use `CODEX_API_KEY`;
|
||||
Codex sends it as a bearer token on the registration request. For example:
|
||||
Remote registration authenticates with an API key: either the key stored by
|
||||
`codex login --with-api-key` or `CODEX_API_KEY`. Codex sends it as a bearer
|
||||
token on the registration request. For example:
|
||||
|
||||
```sh
|
||||
CODEX_API_KEY="$OPENAI_API_KEY" \
|
||||
@@ -111,8 +106,8 @@ codex exec-server \
|
||||
--aws-service bedrock-mantle
|
||||
```
|
||||
|
||||
Noise remains the default transport. Direct requires `--aws-sigv4`, which
|
||||
conflicts with `--use-agent-identity-auth` and is not supported for Noise.
|
||||
Noise remains the default transport. Direct requires `--aws-sigv4`, which is
|
||||
not supported for Noise.
|
||||
The AWS options require `--aws-sigv4`; Direct forwarding remains unsupported.
|
||||
The AWS SDK default credential and region chains are used when `--aws-profile`
|
||||
or `--aws-region` is omitted. The signing service defaults to `execute-api`.
|
||||
|
||||
@@ -81,7 +81,6 @@ pub enum RemoteEnvironmentTransport {
|
||||
enum RegistryAuthMode {
|
||||
Legacy,
|
||||
ExecutorCredential,
|
||||
ChatgptToken,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -310,7 +309,7 @@ impl EnvironmentRegistryClient {
|
||||
.map_err(auth::registry_auth_error)?;
|
||||
let scoped = self.auth_mode == RegistryAuthMode::ExecutorCredential;
|
||||
let credential = if self.auth_mode != RegistryAuthMode::Legacy {
|
||||
// Scoped credentials must be the only header. ChatGPT also carries its account ID.
|
||||
// Scoped credentials must be the only header.
|
||||
let token = (!scoped || headers.len() == 1)
|
||||
.then(|| headers.get(AUTHORIZATION))
|
||||
.flatten()
|
||||
@@ -721,12 +720,6 @@ impl RemoteEnvironmentConfig {
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Omit the bearer from registry diagnostics while retaining the account header.
|
||||
pub fn with_registry_bearer_redaction(mut self) -> Self {
|
||||
self.auth_mode = RegistryAuthMode::ChatgptToken;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_telemetry(mut self, telemetry: ExecServerTelemetry) -> Self {
|
||||
self.telemetry = telemetry;
|
||||
self
|
||||
@@ -1474,11 +1467,6 @@ mod tests {
|
||||
assert_registry_diagnostics_omit_bearer(RegistryAuthMode::ExecutorCredential).await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn chatgpt_token_is_never_returned_in_registry_diagnostics() {
|
||||
assert_registry_diagnostics_omit_bearer(RegistryAuthMode::ChatgptToken).await;
|
||||
}
|
||||
|
||||
async fn assert_registry_diagnostics_omit_bearer(mode: RegistryAuthMode) {
|
||||
const TOKEN: &str = "synthetic-scoped-registry-secret";
|
||||
struct ExecutorAuth;
|
||||
|
||||
Reference in New Issue
Block a user