Repository navigation
feat(app): web-app run args + spored :443 proxy access-token gate (#590) - #600
Merged
Merged
Conversation
Catalog Args (+ --web-arg) are appended to the web container's docker run, so images like code-server/Jupyter can bind 0.0.0.0 and run auth-less. spored's :443 reverse proxy now gates access with a one-time token (mirrors DCV's authToken): ready-url carries ?spore_token=<t> -> Secure/HttpOnly cookie -> serve (incl. WebSockets); else 403. --no-web-auth opts out. Bumps libs v0.46.0. Refs #590.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…Semgrep findings Docs drift gate: docs-gen/app.md for the two new flags. Semgrep: the proxy redirect is a relative same-origin path (token param stripped) — not an open redirect; the test cookies are request cookies simulating a browser send, where HttpOnly/Secure don't apply. Justified nosemgrep on each.
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.
The remaining #590 work (design approved): make built-in web catalog entries shippable + secure. Depends on libs v0.46.0 (the
Argsfield), released.Container run args
A
webcatalog entry can setargs:(libs v0.46.0), or launch with repeatable--web-arg. The args are shell-quoted and appended to the web container'sdocker run(after the image, overriding CMD) — so images that default to binding container-localhost or requiring their own auth (code-server, Jupyter) can be told--bind-addr 0.0.0.0:<port>/ run auth-less.Proxy access-token gate
spored's :443 TLS reverse proxy now gates access with a one-time token, mirroring the DCV
authTokenmodel — so a web app is protected regardless of its own auth, and the world-openspawn-webSG (:443) is safe (the token is the gate, exactly like DCV's :8443):spawn:ready-urlbecomeshttps://<fqdn>/?spore_token=<t>.webAuthHandler:?spore_token(matching, constant-time) → sets aSecure; HttpOnly; SameSite=Laxcookie + 302 to the path sans token; a valid cookie → proxy pass-through (covers same-origin WebSocket upgrades); else 403.--no-web-auth(WebAuth=none) disables the gate for apps with robust own auth → the gate becomes a pass-through and the ready-url carries no token.spawn:ready-urlfrom the tag.Plumbing
LaunchConfig.WebAuth→ tagspawn:web-auth→provider.Config.WebAuth;Agent.webTokengenerated once (reusing the DCV token pattern);buildWebUserData(..., args).Tests
TestWebAuthHandler(403 / token→cookie+redirect / cookie-pass / wrong-cookie-403 / disabled-passthrough),TestBuildWebReadyURL(with/without token),buildWebUserDataargs shell-quoting. Full cmd/agent/aws/provider suites + vet green.Not yet validated end-to-end
Gated follow-up (TTL + terminate + leak-check; needs the usual pre-release spored swap): launch code-server → reach
ready, confirm?spore_tokenloads it over TLS + WebSocket works, and dropping the token → 403. Then seed built-in web entries (libs) + cut a spawn release, closing #590.Refs #590.