Repository navigation
fix(auth): require re-authentication before minting a CLI access token - #72
Merged
Merged
Conversation
- Send prompt=login in the authorization-code sign-in so Keycloak asks for the password even with a live SSO session (M4/W3). - Warn on the account page that the token works like a password for up to 180 days, and link to the Keycloak Applications page to remove signed-in computers (S5/A8). Clear the shown token when the page is left. - Record the minimum UI version (master after 8b17318) in the auth wiki for the M6 gate.
…where Review feedback on PR #72: the warning paragraph was pasted twice and the under-token note lost the 30-day idle / mip logout rules; the footer mixed '6 months' with the new '180 days'. The guide above the button keeps the password warning once; the note under the token now states how the token ends (180 days, 30 days idle, mip logout) plus the Applications link. Specs now lock the destroy-clears-token behaviour, the warning copy, every Applications link, and prompt=login on the click path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements U1 and U2 of the laptop Jupyter sign-in security plan.
prompt=login, so Keycloak asks for the password even with a live SSO session — an open session on a borrowed/stolen laptop can no longer mint a long-lived token silently. Deliberately nomax_age=0/auth_timeclient-side checks (bypassable; real enforcement is Keycloak's flow override, K3).docs/llm-wiki/08-auth-and-terms-flow.md(first present on master after8b17318, 2026-11-06; repo has no CHANGELOG and package version is 0.0.0).mip login --token; never put it in notebooks,.envfiles, repositories or chat." plus a link "See and remove computers signed in to MIP" to${issuer}/account/applications. Replaces the older "treat it like a password / 6 months" note.ngOnDestroywhen the page is left; clipboard copy was verified to not log the token.Files changed
src/app/pages/account-page/cli-token.ts—prompt: 'login'src/app/pages/account-page/cli-token.spec.ts— assertsprompt=loginsrc/app/pages/account-page/account-page.component.html— warning text + revocation link (both places)src/app/pages/account-page/account-page.component.ts—OnDestroyclears the shown tokendocs/llm-wiki/08-auth-and-terms-flow.md— minimum-version release noteTests/checks run
npm test -- --watch=false: 79 files / 1146 tests passed (account-page specs extended)npm run build: passednpm run lint: no such script in this repo (stale plan item)Risk
prompt=loginmakes every token mint ask for credentials again — intended (M4), slightly more friction./account/applicationsused elsewhere on the page; older account consoles use#/applications— verify on the EBRAINS Keycloak.Rollback
Revert the single commit; no data or deployment migration involved.
Pending manual check
Signed in to the portal → Create access token → Keycloak shows the password form (needs a live Keycloak with the laptop client).