Repository navigation
Scope the Punchd gateway list to this deployment, and split status from VPN - #56
Merged
Merged
Conversation
A gateway that reported no issuer was shown on every console. That tolerance existed so a staggered rollout would not blank anyone's list, but it is the cross-tenant leakage the issuer was added to prevent — devops listing demo and staging gateways was the original complaint. Now strict on both surfaces: a gateway must report an issuer and it must match. The rule moves into one shared belongsToTenant so the dashboard and the Punchd list cannot drift apart, replacing two near-identical copies. Gateways still on old binaries report no issuer and so disappear from every console until they are updated. That is the intended trade — showing them everywhere was worse than showing them nowhere. Also surfaces the issuer a gateway reports in its Manage dialog. The tidecloak.json itself is never reported and never pushable, so this is the only way to see which TideCloak a self-registered gateway actually trusts.
Discovered gateways showed Online/Offline in the column headed VPN, so a gateway with VPN disabled read as "VPN: Online". Two unrelated facts sharing one cell. Status now has its own column, and it covers every row rather than only discovered ones — a stored record means a gateway is configured, not that it is connected, and which of those is true is what an admin actually wants to see. The VPN column shows On/Off for adopted gateways and an em dash for discovered ones, where it is unknown rather than off.
The editor derived its rows from the serialized backends string on every render. A half-filled row cannot be represented in that string — serializing drops rows without both a name and a URL — so a new blank row was discarded before it could be rendered and the button appeared dead. Rows now live in the editor. The string is still what gets saved: every edit serializes the complete rows back out, so incomplete rows are excluded from what is stored while staying on screen to be filled in. Extracted to its own component, which is where it belonged, and which lets it be tested without pulling the whole admin page and its TideCloak and react-query dependencies into the test. The tests fail against the previous implementation — four of the seven — so they pin the actual defect rather than the fix.
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.
Yes, that's right — the Punchd list should be scoped to the deployment exactly like the dashboard, and it wasn't quite.
The tolerance had to go
Both surfaces treated "reports no issuer" as show everywhere. That was deliberate, so a staggered rollout wouldn't blank a console mid-upgrade — but it is precisely the cross-tenant leakage the issuer was introduced to stop. It's why devops still lists
Sasha-Gateway,gateway-vf28pgandgateway-z3pz71.Now strict on both: a gateway must report an issuer, and it must match this deployment's.
The rule also moves into a single shared
belongsToTenant, replacing two near-identical copies that could drift — one in the dashboard aggregation, one in the admin discovery listing.What disappears
The four gateways still on old binaries report no issuer, so they vanish from every console until updated:
That's the intended trade — showing them on consoles they don't belong to was worse than showing them nowhere — but it does mean the Proliant and desktop gateways drop off demo until their binaries are updated. If you use them day to day, update those hosts before merging this.
The three container gateways all report issuers and are unaffected:
tidecloak.json in Manage
The paste field was already there — it just looked empty, because a gateway never reports its TideCloak config and never can: that's the trust anchor, unpushable by design, and the signal server relaying gateway data has no business holding it.
What was missing is any way to see which TideCloak a self-registered gateway actually trusts. The Manage dialog now shows the reported issuer read-only, above the paste field, with a note explaining why the file itself isn't there. Paste one in and the console can generate
tidecloak.jsonfor that gateway as usual.Testing
26 discovery tests (5 new on the strict rule: exact match, different realm on the same host, same realm on a different host, trailing-slash and case tolerance, and the no-issuer rejection). Full suite green,
tscclean apart from the errors already on main.