Skip to content

Quick start

Markdown · llms.txt

Run laissez on loopback in front of a fake GitHub, then send requests through it with curl as an agent: one to a host the policy does not name and one from an agent the policy does not know, both refused at CONNECT, then one that is allowed and gets a GitHub token the agent never held. It needs Go, curl and jq, and no GitHub App, SPIRE or AWS account. Nothing leaves loopback.

Go

Needs Go 1.27.0 or later (the go line in go.mod). Installs to $(go env GOPATH)/bin.

Terminal window
go install github.com/dyokto/laissez@latest

Linux and macOS binary

Pick the archive for your platform from the releases page: darwin-arm64, darwin-amd64, linux-amd64 or linux-arm64.

Terminal window
gh release download -R dyokto/laissez -p 'laissez-*-linux-amd64.tar.gz'
tar xzf laissez-*-linux-amd64.tar.gz laissez
sudo install laissez /usr/local/bin/

Debian and Ubuntu

Terminal window
gh release download -R dyokto/laissez -p 'laissez_*_linux_amd64.deb'
sudo apt install ./laissez_*_linux_amd64.deb

Fedora and RHEL

Terminal window
gh release download -R dyokto/laissez -p 'laissez_*_linux_amd64.rpm'
sudo dnf install ./laissez_*_linux_amd64.rpm

Check it is on your PATH. A release binary prints its version; a go install build prints dev.

Terminal window
$ laissez version
laissez v0.1.0

The fake GitHub and its throwaway keys come from examples/demo, which is not part of the laissez binary, so build it from a clone:

Terminal window
git clone --depth 1 https://github.com/dyokto/laissez
cd laissez
Terminal window
$ go build -o bin/laissez-demo ./examples/demo
$ bin/laissez-demo --dir laissez-demo 2>laissez-demo.log &
$ ls laissez-demo
agent-key.pem
agent.jwt
agent.pem
app.pem
bundle.jwks
bundle.pem
laissez.toml
proxy-key.pem
proxy.pem
stranger-key.pem
stranger.pem
upstream-ca.pem

It serves a fake api.github.com on loopback and writes into laissez-demo/ a SPIFFE trust bundle for example.org, X509-SVIDs for spiffe://example.org/agent/coder and spiffe://example.org/agent/stranger, a GitHub App key, and a laissez.toml that lists one agent:

[[agent]]
spiffe_id = "spiffe://example.org/agent/coder"
[agent.github]
installation_id = 42
repositories = ["laissez"]
permissions = { contents = "read", metadata = "read" }

Check the configuration, then start laissez on 127.0.0.1:18443:

Terminal window
$ laissez check --config laissez-demo/laissez.toml
ok: 1 agent(s)
$ laissez run --config laissez-demo/laissez.toml 2>laissez-demo/laissez.log &

In the commands below, --proxy-cert and --proxy-key are the agent's X509-SVID, --proxy-cacert trusts laissez's listener, and --cacert trusts the CA laissez wrote at start for the hosts where it injects a credential.

The agent coder asks for example.com, which its policy does not name. laissez answers the CONNECT with 403 and never dials the host:

Terminal window
$ cd laissez-demo
$ curl --silent --show-error --proxy https://127.0.0.1:18443 \
--proxy-cacert upstream-ca.pem --cacert laissez-ca.pem \
--proxy-cert agent.pem --proxy-key agent-key.pem \
https://example.com/
curl: (56) CONNECT tunnel failed, response 403

An agent with a valid SVID from the same trust domain, but no [[agent]] entry, gets the same 403 for a host that coder may reach:

Terminal window
$ curl --silent --show-error --proxy https://127.0.0.1:18443 \
--proxy-cacert upstream-ca.pem --cacert laissez-ca.pem \
--proxy-cert stranger.pem --proxy-key stranger-key.pem \
https://api.github.com/repos/dyokto/laissez
curl: (56) CONNECT tunnel failed, response 403

Allowed, with a credential the agent never held

Section titled “Allowed, with a credential the agent never held”

The same request as coder, which also sends an Authorization header of its own. laissez mints a GitHub installation token for laissez with contents: read and metadata: read, replaces the agent's header with it, and forwards the request. The fake GitHub echoes back the header it received:

Terminal window
$ curl --silent --show-error --proxy https://127.0.0.1:18443 \
--proxy-cacert upstream-ca.pem --cacert laissez-ca.pem \
--proxy-cert agent.pem --proxy-key agent-key.pem \
--header 'Authorization: token agent-should-not-have-this' \
https://api.github.com/repos/dyokto/laissez
{"authorization_seen_by_gh":"Bearer ghs_demo_minted_token","host":"api.github.com","path":"/repos/dyokto/laissez"}

Every decision is one JSON line in audit.jsonl. The minted token is recorded only as the first 16 hex characters of its SHA-256:

Terminal window
$ jq -c '{agent, destination, method, decision, reason, credential_kind}' audit.jsonl
{"agent":"spiffe://example.org/agent/coder","destination":"example.com:443","method":"CONNECT","decision":"deny","reason":"destination not in policy","credential_kind":"none"}
{"agent":"spiffe://example.org/agent/stranger","destination":"api.github.com:443","method":"CONNECT","decision":"deny","reason":"SPIFFE ID not in policy","credential_kind":"none"}
{"agent":"spiffe://example.org/agent/coder","destination":"api.github.com:443","method":"CONNECT","decision":"allow","reason":"intercept","credential_kind":"none"}
{"agent":"spiffe://example.org/agent/coder","destination":"api.github.com:443","method":"GET","decision":"allow","reason":null,"credential_kind":"github-installation-token"}

Stop the two background processes with kill %1 %2, and remove laissez-demo/ before running the demo again: the audit log appends.

Each release has a checksums.txt signed keylessly with cosign, an SPDX SBOM per archive, and SLSA build provenance for the archives and packages.

Terminal window
$ cosign verify-blob \
--bundle laissez-0.1.0-checksums.txt.sigstore.json \
--certificate-identity-regexp '^https://github.com/dyokto/laissez/\.github/workflows/release\.yml@refs/tags/v' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
laissez-0.1.0-checksums.txt
Verified OK
$ sha256sum --ignore-missing -c laissez-0.1.0-checksums.txt
laissez-0.1.0-linux-amd64.tar.gz: OK
$ gh attestation verify laissez-0.1.0-linux-amd64.tar.gz -R dyokto/laissez
  • How laissez works: identities, GitHub and AWS brokering, the environment an agent needs, and what laissez does not do
  • examples/laissez.toml: every configuration key, for running it against real GitHub and AWS
  • Threat model: what laissez protects against and its known gaps
  • Spec map: the specifications it implements and where it departs from them