fix(cec): the tech's Site door opens the tunnel it shows - #187
Merged
Conversation
The help tech finally SAW the KVM's web-Site button (#186 widened kvmTwin), but clicking it still refused with "Sites are owner/fleet only": the visibility gate learned the tech arm while mapSite - the gate the tunnel actually goes through - kept the old owner/fleet rule. A door drawn on, lock unchanged. Meanwhile remote control worked fine, because the KVM's own senderMayControl admits the session's tech (cecApprovedTech) for every plane - including site routes. The GUI was the only thing refusing. Make one authority answer both questions: - cecStanding(node): live CEC standing - a dialed customer, or a hand up in the watched queue right now. Same lifetime as the appliance's approved-tech set (admitted while asking or on dial, dropped on hangup), which is what really authorizes each tunneled request. - kvmDoors(node) = kvmAllowed || cecStanding: the session doors (web Site + the Power/Reset that ride the same tunnel). mapSite, kvmTwin, and the graph globe (capabilitiesFor.sites' kvm arm) now all read this one gate, so the button can never render only for the tunnel to refuse. - kvmAllowed stays the curation rule (attach/detach, drawer fleet tools): owner / co-fleet / shared only. A tech never inherits those. - kvmTwin's raisedHand option is gone - cecStanding covers queue rows, so the special case (and its two call sites) collapse. An ordinary customer's exposed sites stay owner/fleet-only: the CEC consent model covers screen + control, and a person's sites would just be denied. The KVM arm is safe precisely because the appliance is the real authority - widening the GUI gate can't grant access the KVM would refuse. svelte-check 152 files 0 errors; vite build clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYdqmManehKSKxwzcfeeU4
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.
What changed
Field report from #186: the help tech finally saw the KVM's 🌐 Site button, but clicking it refused with "Sites are owner/fleet only — X isn't yours." Remote control kept working the whole time.
Root cause: #186 widened only
kvmTwin— the visibility gate — whilemapSite, the gate the tunnel actually goes through, kept the old owner/fleet rule. A door drawn on, lock unchanged. The KVM itself was never the blocker: itssenderMayControladmits the session's technician (cecApprovedTech) for every plane, site routes included — which is exactly why control worked. The GUI was the only thing refusing.One authority now answers both questions:
cecStanding(node)— live CEC standing: a dialed customer, or a hand up in the watched queue right now. Deliberately the same lifetime as the appliance's approved‑tech set (admitted while asking or on dial, dropped on hangup), which is what really authorizes each tunneled request.kvmDoors(node)=kvmAllowed || cecStanding— the session doors (web Site + the Power/Reset that ride the same tunnel).mapSite,kvmTwin, and the graph card's globe (capabilitiesFor.sites' kvm arm) all read this one gate, so the button can never render only for the tunnel to refuse.kvmAllowedstays the curation rule (attach/detach, the drawer's fleet tools): owner / co‑fleet / shared only. A tech never inherits those.kvmTwin'sraisedHandoption is gone —cecStandingcovers queue rows, so the special case (and its two call sites) collapse.An ordinary customer's exposed sites stay owner/fleet‑only: the CEC consent model covers screen + control, and a person's sites would just be denied. The KVM arm is safe precisely because the appliance is the real authority — widening the GUI gate can't grant access the KVM would refuse; it just stops the GUI refusing first.
Pre‑answer clicks work too: while the hand is up, the KVM's
cecAdmitadmits whoever reaches out — the site offer itself triggers admission ("the hand‑raise IS the ask").Verification
svelte-check: 152 files, 0 errors, 0 warningsvite build: cleanraisedHandreferences remain🤖 Generated with Claude Code
https://claude.ai/code/session_01YYdqmManehKSKxwzcfeeU4
Generated by Claude Code