Skip to content

Rustybin 0.5.1: safe for a public demo

Choose a tag to compare

@oliwynn oliwynn released this 06 Nov 22:36
· 88 commits to main since this release

Upgrade any instance in public mode. Rustybin 0.5.1 has no new features: it fixes what running the public demo's configuration on 0.5.0 found. The first two issues below are open on 0.5.0 and earlier. Behind a proxy, also read the third.

Security:

  • Captured requests were readable by other callers. On a public instance, or to an API key in shared mode, any caller could read the captured requests of an instance mock (the built-in petstore, for example), with the Authorization and Cookie headers and the query string the sender used. A caller without a credential now reads only its own session's calls, and a key only its own. The operator, signed-in users and a visitor's own mocks are unchanged. An operator of a public instance on 0.5.0 or earlier should treat credentials sent to its instance mocks as seen.
  • One anonymous request could take a self-service instance down. A 160 KiB spec whose operations all name one wide schema took about 645 MiB; two such specs, or about 100 large ordinary ones, ended a 512 MiB container. A visitor's tools now expand at most 32,000 schema nodes per revision, a deploy report keeps 256 KiB of generated bodies, and all visitor mocks share a memory budget, RUSTYBIN_MOCKS_SELF_SERVICE_MAX_MB (192 MiB by default): past it a new mock or an edit answers 503. The same spec now costs about 18 MiB.
  • A client could name its own address behind a proxy. A public instance with RUSTYBIN_TRUST_FORWARD and no RUSTYBIN_TRUST_FORWARD_HEADER believes every forwarding header, so a client could step around the per-address limits. It now warns at startup and in GET /_rustybin/diagnostics (client_address). Nothing changes until you name your proxy's header: see Behind a proxy.

Changed on a public instance:

  • GET /_rustybin/metrics needs settings.read. Set RUSTYBIN_ADMIN_TOKEN and scrape with it, or nobody reads the metrics.
  • A visitor's mcp-checks runs are answered but not kept, and the saved runs are not shown to visitors. They were one shared list, so visitors saw each other's targets and could push them out.

The full list is in the changelog.

Install

Release binaries for Linux and macOS (x86_64 and arm64) are attached below, each with a .sha256. Or cargo install --locked --git https://github.com/coldbathcode/rustybin --tag v0.5.1.

The image

ghcr.io/coldbathcode/rustybin:0.5.1
ghcr.io/coldbathcode/rustybin@sha256:25026bdff9bd84fa146187c410962b722e04bf9a422ea78781dfe95d4d9bb7b6

The image is multi-arch (linux/amd64, linux/arm64) and signed with cosign (keyless, using the publishing workflow's GitHub identity). Verify it before you run or deploy it, and pin deployments to the digest:

cosign verify ghcr.io/coldbathcode/rustybin@sha256:25026bdff9bd84fa146187c410962b722e04bf9a422ea78781dfe95d4d9bb7b6 \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity-regexp '^https://github.com/coldbathcode/rustybin/'