fix(daemon): avoid bearer auth for ziti llm#125
Conversation
Local validation
Linting/static validation passed with no errors. |
CI noteGitHub CI This is outside the local code path validated above; no agynd tests ran in that failed e2e job. |
noa-lucent
left a comment
There was a problem hiding this comment.
Requesting changes for one auth-path issue: the Ziti path still needs to guarantee Codex cannot inherit OPENAI_API_KEY from the agynd process environment.
|
@Noa-Licent addressed the requested auth-path change in commit What changed:
Local validation:
Ready for re-review. |
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review complete. Commit 46b1ffb addresses the prior auth-path concern by scrubbing inherited Codex auth environment variables during Ziti Codex startup, restoring them afterward, and adding regression coverage for parent env inheritance plus Ziti config/env omission. I resolved my prior thread. CI build is passing; e2e is still in progress at review time.
Summary
OPENAI_API_KEYbearer token when the configured LLM endpoint is an OpenZiti host (*.ziti).env_keyfor Ziti LLM endpoints so llm-proxy authenticates via workload/Ziti identity instead of resolving the human user token first.github.com/agynio/codex-sdk-gofrom@mainso Codex can launch withoutOPENAI_API_KEYin the Ziti path.Evidence
Run
26183071285loggedprincipal_identity_type=userandtuple_user=identity:<human-user-id>forllm-proxy.zitirequests. Tracing found agynd was exporting the e2e human API token asOPENAI_API_KEY, and Codex provider config usedenv_key = "OPENAI_API_KEY", causing the bearer token to override Ziti identity resolution.Tests
go test ./...go vet ./...go build ./...git diff --check