Skip to content

fix(FR-2627): forward api_version/date/endpoint to token_login#6893

Closed
nowgnuesLee wants to merge 1 commit into
04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundaryfrom
04-22-fix_fr-2627_forward_api_version_date_endpoint_to_token_login
Closed

fix(FR-2627): forward api_version/date/endpoint to token_login#6893
nowgnuesLee wants to merge 1 commit into
04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundaryfrom
04-22-fix_fr-2627_forward_api_version_date_endpoint_to_token_login

Conversation

@nowgnuesLee
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee commented Apr 22, 2026

Follow-up to #6864 (FR-2627).

Summary

The eduAppExtraParamSpec nuqs allowlist in react/src/routes.tsx was missing three keys that the pre-migration EduAppLauncher._token_login used to forward as part of the body:

  • api_version
  • date
  • endpoint

The old implementation iterated every URLSearchParams entry and forwarded everything except sToken/stoken. The nuqs migration replaced that with an explicit allowlist and silently dropped these unlisted keys, so POST /server/token-login went out with a body that only contained { sToken, app, session_id, ... } — no signing envelope.

Backend.AI Manager auth hooks that validate the LMS-signed launcher URL against these fields would then reject the request as tampered, breaking sToken entry into /edu-applauncher and /applauncher.

Fix

Add api_version, date, endpoint to eduAppExtraParamSpec with a comment explaining why these must stay in the spec.

Test plan

  • bash scripts/verify.shALL PASS
  • Manual: launch from LMS URL /edu-applauncher?sToken=<signed>&app=jupyterlab&api_version=...&date=...&endpoint=...&session_id=... and confirm POST /server/token-login body includes all five extra keys
  • Verify E2E regression PR test(FR-2639): add E2E regression for sToken login boundary routes #6865 scenarios still pass on top of this fix

The eduApp route's nuqs allowlist was missing the LMS signing envelope
keys (api_version, date, endpoint). The pre-migration _token_login in
EduAppLauncher forwarded every URL param except sToken/stoken; the
nuqs migration replaced that with an explicit allowlist and dropped
these unlisted keys. Manager-side auth hooks that validate the signed
launcher URL against these fields would then reject token_login as
tampered.
Copy link
Copy Markdown
Contributor Author

nowgnuesLee commented Apr 22, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 8.92% 1830/20515
🔴 Branches 8.1% 1165/14391
🔴 Functions 5.28% 294/5568
🔴 Lines 8.65% 1722/19908

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from ca03dc3

@nowgnuesLee
Copy link
Copy Markdown
Contributor Author

Folded into #6864 via gt modify amend. The 3-line allowlist fix and the EduAppLauncher auth-step removal now ship together as part of the Story 3 migration, since both are continuations of FR-2642 scope.

@nowgnuesLee nowgnuesLee deleted the 04-22-fix_fr-2627_forward_api_version_date_endpoint_to_token_login branch April 22, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS ~10 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant