Repository navigation
fix(studio)!: use a dedicated administrator token header - #784
Conversation
ployts
left a comment
There was a problem hiding this comment.
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.
ployts
left a comment
There was a problem hiding this comment.
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.
Summary
Use
X-ReMe-Admin-Tokenfor Studio management authentication so hosting platforms can ownAuthorization. Migrate the shared client, iOS bridge, Swift network transport, backend, and Docker smoke checks to the dedicated header. The native bridge carriesadminTokeninstead ofauthorization, 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
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
ReMeClient → iosFetchcoverage for administrator authentication, endpoint scoping, and rejection of the former header.StudioRequeststransport 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-filespassed.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
Screenshots or additional notes
No visual UI changes.