Repository navigation
Conversation
An administrator's config file switches VarLens Desktop into platform sign-in (#295). Without the file nothing is installed: the gate keeps a pass-through provider and every channel answers as before. - Access gate: in platform mode every IPC channel except system:capabilities, system:version and auth:desktopStatus answers UNAUTHENTICATED until somebody signs in, without its handler running. The local accounts' channels are refused in platform mode, as on the web under platform sign-in. jobs and debug register through the gate too and still answer without the database startup wait. - Config file: auth.json in a machine-wide folder only administrators can change (owner and permission checks; on Windows the security descriptor and the content come from one open handle). Only a missing file means no sign-in; anything that cannot be checked, trusted or parsed keeps the desktop locked and says why. - Startup opens no database in platform mode, and the renderer mounts the sign-in screen instead of the app. Signing in comes with the next change; until then a configured desktop stays locked. Spec: .planning/specs/2026-10-24-desktop-platform-sign-in.md
This was referenced Oct 29, 2026
robspan
marked this pull request as ready for review
October 29, 2026 10:25
This branch has not been deployed
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.
Second of three PRs for the desktop platform sign-in (#295). Based on #707 (the
platform-jwtmove); until that merges, only the last commit is this PR. Next: #709.What
An administrator's config file switches VarLens Desktop into platform sign-in. Without the file nothing is installed: the access gate keeps a pass-through provider and every channel answers as on
main. What remains on the default path is anlstatof the config paths at startup and oneauth:desktopStatuscall while the renderer boots.With the file, this PR brings the locked half of the feature; signing in comes with the next PR, so until then a configured desktop stays locked.
src/main/auth/access-gate.ts): every IPC registration goes through it. In platform mode every channel exceptsystem:capabilities,system:versionandauth:desktopStatusanswersUNAUTHENTICATEDuntil somebody signs in, without its handler running. The local accounts' channels are refused (FORBIDDEN), as on the web under platform sign-in.jobsanddebugregister through the gate too, still without the database startup wait.src/main/auth/desktop-auth-config*.ts,windows-acl.ts):auth.jsonin a machine-wide folder only administrators can change (/etc/varlens,/Library/Application Support/VarLens,C:\ProgramData\VarLens). Owner and permission checks; on Windows the security descriptor and the content come from one open handle. Only a missing file means no sign-in; a file that cannot be checked, trusted or parsed keeps the desktop locked and says why.Existing files touched
Everything else is in new modules (
src/main/auth/,src/main/ipc/handlers/desktop-auth.ts, the renderer'sdesktopAuthStore,SignInApp.vue,components/auth/).src/main/index.tssrc/main/ipc/index.tscreateIpcRegistrars: data domains on startup gate + access gate,jobsanddebugon the access gate onlysrc/main/ipc/domains/{jobs,debug}.tsipcMainas a parameter, defaulting to Electron's, so they can register through the gate; their tests stay unchangedsrc/main/ipc/domains/auth.tsauth:desktop*channels (they are auth channels)src/renderer/src/main.tsSignInAppinstead of the app while sign-in is requiredcapability-features.ts, parity manifest, mocksauth:desktopStatusmethod (desktopSignIncapability)tests/shared/types/preload-contract.test.tsregisterJobsHandlers()literallyVerification
Against
mainat779a6d25, macOS arm64, Node 24.15.0, Electron 43, windows hidden:mainandrenderer), compared test by test withmain: no test changes status; 66 new tests pass.out/hashed file by file: inout/mainonlyindex.jscarries changed code (8 shared chunks are only renamed);out/preloadhas the new method; inout/rendererSignInAppandVContainerare new lazy chunks, and the other chunks differ only in the minified aliases of names they import from the shared index chunk.desktop-sign-in.e2e.ts(sign-in screen, refused data and local login, novarlens.dbcreated before sign-in, a broken config file shows its problem): pass.make lint-check,format-check,typecheck,agent-checkpass;make web-gate-static: 1131 passed, 1 expected failure, as onmain.Key tests:
tests/main/ipc/ipc-access.test.tsregisters the realregisterIpcHandlersand checks that every one of its channels is refused while locked except the allowlist, and that onlyjobs/debuganswer before the database opens, as onmain.tests/main/ipc/registrars.test.tscompares the new registration withmain's over generated channels, arguments, results and errors.Spec:
.planning/specs/2026-10-24-desktop-platform-sign-in.md(design, all seams, PR plan, accepted limits).