Repository navigation
v0.72.0 Helm: MSA agent enforcement, managed test session, cutover and rollback, behind MSA_GRANTS (off) - #181
Merged
Merged
Conversation
…d rollback, behind MSA_GRANTS (off) Managed Secure Access build step 4. A new signed agent build: on a Legacy computer (every computer until a Platform Admin moves one) it behaves exactly as 0.71. With MSA_GRANTS off nothing new happens anywhere. - Grant public keys published as the signed target msa/grant-keys.json (rem0te-signed-grant-key add|list|retire, rem0te-signed-publish); the agent trusts keys only from the verified TUF chain. - MsaManagedComputer (0089): per-computer cutover (Platform Admin, msa.cutover), confirm after a managed test session, rollback (never asks), reveal-once one-time password (msa.reveal). - Heartbeat msaPoll only for an authenticated signed may-act heartbeat of a managed computer; rem0te-agent.exe msa-poller verifies, applies, reads back and ends sessions through one closed exec site; ceiling view-only. - §82 added; §56, §62, §80, §81 amended. Lab: TestLabRustdeskEnforce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nest The device page asked GET /msa/managed/:id on every view and got 404 MSA_NOT_ENABLED with MSA_GRANTS off (the UI suite's failed-request check on a dozen pages). The readiness answers now carry managedControls (msaGrantsEnabled()), and the card mounts the managed controls only when it is true, so with the switch off the console makes no request to a gated route. e2e-ui runs its API with MSA_GRANTS=off and asserts no /msa/managed or /msa/grants request is made. The fleet page showed seven count tiles (three empty managed ones) with a note saying nothing can be managed. With the switch off it shows the four readiness tiles, plus a managed tile only for a state some computer is really in; with it on, all seven and a testing note. The page renders the API's note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Managed Secure Access build step 4: agent enforcement, managed test session, cutover and rollback. Everything is behind
MSA_GRANTS, which is off.Do not merge or deploy without the owner's approval.
Decisions
rem0te-agent.exe msa-poller. The signed heartbeat script (SYSTEM) starts it, but only when the portal answersmsaPoll: true. The portal does that only for an authenticated signed heartbeat that may act (§64), after the not-may-act and pooled returns, with the switch on and anMsaManagedComputerrow.msa\poller.lock).internal/msa/enforce, tested with fakes. The Windows wiring ismsa_poller_windows.go.rem0te-signed-grant-key add|list|retirerecords public keys on the release host.rem0te-signed-publishsigns them in as the targetmsa/grant-keys.json.agent.MsaTrust). The portal never sends one.grant-key-commands.ts, which §56 allowlists exactly.enforce.Ceiling), and the portal also refuses a managed grant above it (MSA_ABOVE_CEILING).msa.cutover. It is refused unless readiness is Compatible, the agent is ≥0.72, the computer is not pooled, there is noremotepause and the key is published. It is audited before the row is written. There is no group or business route.MSA_MANAGED).forceis only for a computer already rolling back whose agent is gone.Donefrom--password. Ending a session means a random password, thenstop-service Y, thenN, then reading backN.--option" is replaced with an exact list: the preflight's two files plusenforce/args.go. Onlyargs.gonames--password. The only exec site isenforceRunner.Run:enforce.Validaccepts, and only the installedrustdesk.exethat the service runs;msa.reveal, is audited with ids only before a conditional claim, and works once. The agent reportsconnected(--cm) andended.Scoped out (step 5)
These are not built:
controlmode, or any permission above view-only.MSA_GRANTS.So a verified computer is reachable only through Platform Admin test grants until step 5 ships; roll it back to connect normally. Turning the switch off while a computer is verified stops its poller but still refuses its legacy password (fail closed). Roll back first.
Tests (all run locally on a scratch DB, ports 3961/3962)
e2e-msa-managed.mjs(new, inrun-e2e.sh)e2e-msa-grants.mjse2e-msa-readiness.mjse2e-confirm-policy.mjse2e-signed-release.mjs(new grant-key section, all pass)NO_PORTAL_ADDRESS)unit-msa-managed.mjs(new, in CI)unit-msa-readiness.mjsunit-msa-grants.mjsunit-signed-release.mjsunit-confirm-policy.mjsinternal/msa/enforcego test ./...go vet(linux,GOOS=windows,-tags labwindows)check-security-invariants.mjs(new §82; §56/§62/§80/§81 amended)check-versions.mjstscand eslint on changed filesdocs/API-REFERENCE.mdregenerated--checkagainst the runtime route table: 623/623Windows lab:
TestLabRustdeskEnforcewas added to every RustDesk job (1.4.1–1.5.3). It runs save → apply → readback → password → end session → restore, as the administrator and as SYSTEM via a scheduled task.merge-evidence.mjsrequires its evidence, and the WSUS127.0.0.1:8530trick is unchanged.Not run or verified
TestLabRustdeskEnforcehas not run yet. The lab does not cover the portal, the long-poll or a real remote connection.msaPortal) has been vetted but not executed.CLAUDE.mdwas not edited. Its §80 paragraph still says "only the preflight names--option", and a §82 paragraph is worth adding there./helpcopy is unchanged.Deploy notes (only with approval)
MSA_GRANTSunset.🤖 Generated with Claude Code