Skip to content

[Bug]: Opaque configured credentials echoed in nested error codes or request ids still reach /api/logs #6911

Closed

Description

@lidge-jun

Client or integration

OpenCodex dashboard

Area

Proxy and routing

Summary

Follow-up to #6903, which closed the 2.83.0 regression by putting the error type and the bare top-level code on closed vocabularies. Two diagnostics are still checked only by the token alphabet and the shared pattern redactor: a nested envelope code (error/last_error/response.error) and the upstream request id (x-request-id/openai-request-id). This behavior predates 2.83.0. Suppose a gateway echoes an operator's configured credential into one of those fields, and the credential has no recognizable format. The value is then recorded in request-log rows and served by /api/logs, which is behind dashboard authentication.

Expected: a diagnostic value equal to a configured credential (provider apiKey, apiKeyPool entries, OAuth access tokens) is never recorded or warned. This needs exact masking of known credentials, not just pattern masking.

Reproduction

Use synthetic values only. Configure a key-auth provider whose apiKey is an opaque string, such as private-provider-key-GGGG.... Point it at a loopback fixture upstream that returns {"error":{"type":"server_error","code":"<that key>"}} with status 503, or sets x-request-id: <that key>. Send one /v1/responses request and read /api/logs. upstreamErrorCode / upstreamRequestId contain the key.

Version

2.83.0

Operating system

All

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    on Oct 10, 2026
  2. added
    account-pool
    proxy
    on Oct 10, 2026
  3. lidge-jun commented on Oct 10, 2026

    @lidge-jun
    OwnerAuthor

    Fixed on dev by #6918 (squash 19c71a5f02). The upstream error-code and request-id diagnostics are now checked against exact values of the configured credentials. Covered are the provider apiKey and apiKeyPool entries and the active OAuth tokens. The check fails closed: if it cannot read all credentials, it records nothing. A matching value is never recorded in /api/logs and never printed in the upstream-failure warning. The earlier closed vocabularies for the error type and bare code from #6903 are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolbugproxy

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions