Skip to content

terminal: term.<domain>, the browser terminal, from the release's signed copy - #26

Merged
aledbf merged 1 commit into
mainfrom
f8/term
Oct 3, 2026
Merged

aledbf merged 1 commit into
mainfrom
f8/term

Conversation

@aledbf

@aledbf aledbf commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Security zone: for you to merge. The AWS half of F8's browser terminal (spin#274, merged): modules/terminal serves https://term.<domain> from a spin release's signed spin-term.tar.gz.

What it makes

  • A bucket and a CloudFront distribution on an origin of its own.
    • Nothing of the installation serves the code that asks a person's passkey.
    • The bucket is private, read only through the distribution (OAC).
    • Its policy denies every write by a role of the installation (role/${iam_name}-*): a taken control plane cannot replace the page.
  • A strict Content Security Policy:
    • the page may reach app.<domain> (the dashboard's API, with the person's session, for the six calls the control plane allows from this origin) and the relay's WebSocket, and nothing else;
    • wasm-unsafe-eval for the terminal's Go.
  • The certificate comes from us-east-1, as CloudFront takes it, via an aws.us_east_1 provider, and is validated in the installation's public zone.

Pinned to the release

  • files is a directory task term:fetch RELEASE=<tag> OUT=term made. It verifies the tarball with cosign against the signature spin's release workflow made at that tag before it unpacks it.
  • A plan whose files are another release's than release is refused by a precondition on RELEASE.

Not yet deployable

No spin release ships spin-term.tar.gz yet. The first release cut after spin#274 does, and the module can be wired into an installation from then. The module's tests (modules/terminal/tests) run against fixtures and do not need it.

Gates

task lint passes: fmt, validate, tflint, docs, and the module's terraform test (2 runs: the page published as the release's, and files of another release refused).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…se's signed copy alone

CloudFront over a private bucket, as id.<domain> is: the files are a spin
release's spin-term.tar.gz, which task term:fetch checks against the
signature release.yml made at the tag before it unpacks it, and a plan
refuses files of another release than the one named. The bucket's policy
refuses every role of the installation a write - whoever writes these files
writes the code that asks a person's passkey - and the origin's own policy
lets the page reach the dashboard's API and the relay and nothing else.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@aledbf
aledbf merged commit e2aa601 into main Oct 3, 2026
2 checks passed
@aledbf
aledbf deleted the f8/term branch October 3, 2026 20:58
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