Skip to content

feat(console): serve web channels to allowlisted targets - #37

Merged
traviswu-bigstack merged 3 commits into
developfrom
feat/web-targets
Sep 11, 2026
Merged

traviswu-bigstack merged 3 commits into
developfrom
feat/web-targets

Conversation

@traviswu-bigstack

Copy link
Copy Markdown
Contributor

/kind feature

What

The node-side half of the web console (#9): a web tunnel target, resolved
against an allowlist the node owns.

  • internal/console/web.goWebAllowlist, one symbolic name to exactly one
    host:port, loaded from /etc/cube-advisor-agent/web-targets.json
  • serveConsole gains a TargetWeb arm beside the existing SSH one
  • -web-targets configures the file; absent means the node exposes no web
    target and still serves SSH, malformed stops the agent at startup

Why

ADR 0002 says the node decides what it exposes. A web channel is the same
bargain as the SSH one: the SaaS names a target symbolically and the node maps
it, so a compromised SaaS cannot reach an address the node never offered.

Notes for reviewers

  • One name, one address — not a set. Target carries a name and nothing
    else, so a name meaning several addresses could not say which it wanted. An
    app and its identity provider are two names; grouping is the SaaS's job.
  • JSON, not YAML. This runs on every customer node and does not take a
    dependency to read four lines of config.
  • Every refusal returns the generic RefusedReason; the distinguishing detail
    is logged locally and never sent, so a probing SaaS cannot map the cluster by
    watching which refusals differ.
  • serveSSHConsole is the pre-existing SSH logic extracted unchanged.
  • Verified on sky141: a console and 3 web targets for ky3haclust01/sky141,
    and CMP reached through it end to end.

Part of #9 — not Fixes, because #9's criteria include nested WebSocket,
which is a later slice.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PZ5umjjCedZwWtbAbiMjfj

Signed-off-by: Travis Wu <travis.wu@bigstack.co>
Signed-off-by: Travis Wu <travis.wu@bigstack.co>
Signed-off-by: Travis Wu <travis.wu@bigstack.co>
@traviswu-bigstack
traviswu-bigstack merged commit 241d67b into develop Sep 11, 2026
1 check passed
@traviswu-bigstack
traviswu-bigstack deleted the feat/web-targets branch September 11, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant