Install lockhttp

A launcher on the host, the console in its own container, a gate beside lea’s proxy container, and an opt-in switch in lea.

Pre-release. lockhttp v0.1.0 is out as a pre-release: command names are fixed, flags may still move. TLS decryption ships in it and is optional: without a local CA and the signer (--ca-cert, --signer), HTTPS is decided at the domain. Design decisions: docs/decisions.md, contract with lea: docs/lea.md.

Status

lockhttp runs in Docker. The only thing installed on the host is the lockhttp launcher, a shell script that runs every command in the signed image ghcr.io/davidgodefroid/lockhttp, by digest. Download the install script from the release you install on the releases page, read it, then run it (cosign is required):

V=vX.Y.Z
curl -fsSLO "https://raw.githubusercontent.com/DavidGodefroid/lockhttp/$V/scripts/install.sh"
less install.sh
LOCKHTTP_VERSION=$V sh install.sh
lockhttp version

Requirements

  • Docker: Docker Engine on Linux, Docker Desktop on macOS, or WSL 2 with Docker Desktop on Windows; and cosign to verify the release.
  • lea, which runs the agents in containers on internal networks and runs the gate in its proxy container (Docker, or rootless Podman).
  • A terminal you keep in view, where the console stays open.

Commands

CommandWhereWhat it does
lockhttp initcontainer, as lockhttpWrites the policy (~/.config/lockhttp/config.toml in the volume lockhttp-home). --trusted imports lea’s LEA_EGRESS_ALLOW as trusted read-only hosts.
lockhttp policy show|edit|pathcontainer, as lockhttpPrints, edits or locates the policy.
lockhttp consolecontainer lockhttp-console, as lockhttpThe approval console: approvals, policy review, auto mode, audit.
lockhttp doctorcontainer, as lockhttpChecks the setup.
lockhttp gateits own container, as gateThe HTTP(S) proxy. lea starts it beside its proxy container; lockhttp gate runs one on 127.0.0.1:3130 for standalone use.
lockhttp signer, lockhttp ca initsidecar containers / your machine (launcher)Phase 2 (TLS decryption): the local CA and the process that holds its key.
lockhttp version, helpanywhereExit codes: 0 ok · 1 failed · 3 usage/config error.

Setup with lea

  1. Install the launcher. scripts/install.sh, as above. There is no host account or group to create: they are in the image.
  2. Write the policy. lockhttp init, optionally --trusted "<LEA_EGRESS_ALLOW>". It runs as the console account and writes into its volume. lea never writes this file, and an agent cannot reach it.
  3. Start the console. In a terminal you keep in view: lockhttp console. It runs as lockhttp in the container lockhttp-console, the only one with the policy volume.
  4. Turn it on in lea. LEA_LOCKHTTP=1. lea starts the gate from the same image beside its proxy container, puts squid on loopback behind it, routes keyproxy through it and switches off the SSH git forwarders.
  5. Check. lockhttp doctor, and lea’s own doctor: from an agent, curl --noproxy '*' https://example.com must fail.

Every file, mount and flag lea uses is in the lea integration contract.