Skip to content

fix(studio)!: use a dedicated administrator token header - #784

Merged
jinliyl merged 2 commits into
agentscope-ai:mainfrom
jinliyl:fix/studio-admin-token-header
Nov 26, 2026
Merged

jinliyl merged 2 commits into
agentscope-ai:mainfrom
jinliyl:fix/studio-admin-token-header

Conversation

@jinliyl

@jinliyl jinliyl commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Use X-ReMe-Admin-Token for Studio management authentication so hosting platforms can own Authorization. Migrate the shared client, iOS bridge, Swift network transport, backend, and Docker smoke checks to the dedicated header. The native bridge carries adminToken instead of authorization, including credential checks that prevent redirects.

Keep the existing HTTPS, origin, credential-scoping, and trusted-proxy checks. Add an iOS bridge regression test to the regular Studio test command, and document the client upgrade requirement and minimal ModelScope setup.

Related issue

N/A

Contract and data impact

  • No public configuration, schema, CLI, endpoint, streaming, or workspace-layout contract changes
  • No user-owned memory files are deleted or rewritten
  • Derived indexes, catalogs, graphs, caches, and metadata remain rebuildable

Breaking change: All management clients must send X-ReMe-Admin-Token: <token>. Authorization: Bearer ... no longer authenticates, and rejected requests no longer advertise Bearer authentication. There is no legacy-header or native-bridge fallback. Upgrade all management clients, including the iOS app, together with the backend.

Validation

  • Focused daemon/CLI tests: 40 passed.
  • Studio: 60 tests passed, including ReMeClient → iosFetch coverage for administrator authentication, endpoint scoping, and rejection of the former header.
  • Desktop, web, and mobile typechecks; full Studio Prettier check; web and Android asset builds passed.
  • iOS Simulator app build passed for arm64 and x86_64.
  • Compiled the actual Swift StudioRequests transport and exercised five local HTTP cases: correct/missing token, management redirect blocking, authenticated redirect blocking, and unauthenticated redirect following. No legacy Authorization header or administrator token reached the redirect target.
  • pre-commit run --all-files passed.
  • Documentation: 22 tests and build passed; 43 artifacts verified.

Not rerun for this native transport update: the full Python unit suite (previously 4250 passed, 41 skipped). Not run: Docker-image smoke tests, iOS device/UI tests, credentialed model calls, or cloud deployment.

Checklist

  • I reviewed the diff for unrelated changes and sensitive data
  • Tests cover intentional behavior changes
  • Defaults, schemas, and concise documentation were updated together when required
  • Long-lived clients, tasks, services, and executors follow the application lifecycle

Screenshots or additional notes

No visual UI changes.

@ployts ployts left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one regression in the iOS management transport; please address the inline comment before merging.

Validation passed: 40 focused daemon/CLI tests, 59 Studio tests, desktop/web/mobile typechecks, and 22 documentation tests plus the documentation build. The iOS bridge token loss was reproduced by invoking the actual ReMeClient through iosFetch and capturing the native request.open payload. Full Python unit tests, Docker smoke tests, cloud deployment, and iOS device tests were not run.

Comment thread reme_studio/client/src/reme-client.ts Resolved

@ployts ployts left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 364f888. The reported iOS authentication regression is fixed: the dedicated administrator token is now carried through the TypeScript bridge, Swift message receiver, native request header, and redirect checks. The new mobile regression test covers authenticated management requests, endpoint scoping, and rejection of legacy Authorization credentials. No further blocking findings.

Validation passed: 60 Studio tests, desktop/web/mobile typechecks, Swift syntax parsing for both changed Swift files, changed-file Prettier checks, and 22 documentation tests plus the documentation build (43 artifacts verified).

Native iOS build/device tests were not run because this environment has only Xcode Command Line Tools. The backend is unchanged since the prior review, where 40 focused daemon/CLI tests passed; the full Python suite, Docker smoke tests, and cloud deployment were not rerun.

@jinliyl
jinliyl merged commit 63b1f53 into agentscope-ai:main Nov 26, 2026
19 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.

2 participants