Skip to content

fix: preserve application token through server proxies - #12

Merged
anycodes merged 2 commits into
mainfrom
fix/application-token-proxy
Oct 24, 2026
Merged

anycodes merged 2 commits into
mainfrom
fix/application-token-proxy

Conversation

@anycodes

@anycodes anycodes commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

OpenSandbox server proxy strips Authorization, so an application accepting Bearer directly rejected the same client through the proxy. Keep Bearer and also send the same explicit application token in the server's existing X-Access-Token header only when the caller/gateway has not occupied that name, case-insensitively.

Fixes #11. Root-cause probe: https://github.com/Alibaba-Agent-Sandbox/awesome-providers/actions/runs/40109164062 . The separate candidate consumer verification below tests the patched clients.

Type of Change

  • 🐛 Bug fix
  • 📖 Documentation
  • 🧪 Tests

Changes

  • Preserve existing gateway credentials and Bearer-only services without a new option or protocol.
  • Generate authentication headers on a new request copy; caller headers stay unchanged, and an absent token gains no application credentials.
  • Keep sandbox/port binding validation, redirect rejection and no automatic retry.
  • Add gateway header casing, copied-header and real local HTTP compatibility regressions, bilingual guidance and owner records.
  • Source delivery only; no independent Node SDK npm first publication is requested.

Testing

  • Typecheck/build and all 24 tests passed after installing the real published Python server 0.3.1a3 in an isolated environment; the actual local agent loop also passed. Initial two missing-runtime failures are retained as such.
  • Exact candidate CLI/Python/Node consumer regression through real OpenSandbox proxy and owned cleanup.
  • Latest-head complete remote CI: https://github.com/Alibaba-Agent-Sandbox/nodejs-sdk/actions/runs/40111016139.

Checklist

  • Scoped code follows project conventions
  • Regression tests added
  • English/Chinese documentation and engineering records updated
  • No sensitive information included

Definition of Done

  • Unit/local HTTP regression tests pass
  • Real backend consumer acceptance recorded
  • Implemented note and verification record included
  • Product docs updated in both languages

Evidence: .agents/evidence/verify/2026-10-24-proxy-application-token.md. Full-template runtime certification is outside this patch.

Actual candidate OpenSandbox regression passed: https://github.com/Alibaba-Agent-Sandbox/awesome-providers/actions/runs/40110372103 . Default/direct, portable/direct and default/proxy python-hello CLI/Python calls, independent Node protected proxy calls and independent Docker cleanup passed. This is one-template coverage; no full catalog certification is claimed. Owner verification records contain exact source refs and independent review outcome.

@anycodes
anycodes marked this pull request as ready for review October 24, 2026 16:20
@anycodes
anycodes merged commit 67eccfb into main Oct 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: preserve explicit application token through server proxies

2 participants