Skip to main content
Building from source gives you the gateway, the MCP server, the certification harness, the policy examples, and the fixtures — everything the other install routes leave out.
The source repository is private, so this route needs access to it. To use Warden, Homebrew or the container image serve public artefacts built from it.

Prerequisites

Build

Verify your build

make check is what CI runs. The layering rule (make importguard) is worth knowing about: nothing above the connector layer may import a database driver, and CI fails if that stops being true.

Run it against a real PostgreSQL

make pg-fixture creates a warden_gateway role with no superuser and no BYPASSRLS — the connection Warden itself uses is least-privilege, so a gateway compromise is bounded by the grant. It also creates warden_agent, the NOLOGIN role that holds what agents may touch, and the two functions that create and drop one role per lease inside it. The gateway may call those functions but can’t create roles itself.
Remove lease_role from warden-strict.yaml and it refuses to start. That refusal is a feature and a test: a connection cannot serve traffic with a guarantee its policy requires and its engine cannot provide.

Run it against a real MongoDB

Then point a connection at it as in MongoDB, and make mongo-cert to certify the connector.
If another mongod already owns port 27017 — very common with a Homebrew install — connections meant for the container reach the local standalone instead, and the suite fails confusingly. The connector now names that mismatch outright, but the fastest check is still lsof -nP -iTCP:27017 -sTCP:LISTEN: if a non-Docker mongod is listening, either stop it or publish the container on a free port (e.g. -p 27018:27017) and point WARDEN_MONGO_DSN at that port with ?directConnection=true.

Run it against a real Neo4j

Then point a connection at it as in Neo4j, and make neo4j-cert to certify the connector.
make neo4j-fixture wipes the configured database first — Community serves only the default database, so run this against a throwaway server, never against data you keep.

Useful targets

Repository layout