Everything so far has been running onDocumentation Index
Fetch the complete documentation index at: https://docs.getbindu.com/llms.txt
Use this file to discover all available pages before exploring further.
localhost. The agents accept unsigned requests because "auth": { "type": "none" } tells the gateway not to sign them. That’s fine for development - there’s no attacker between you and your own laptop.
The fix is: the gateway gets a cryptographic identity and signs every outbound request. Agents verify the signature before processing. If an attacker tries to forge a request, the signature won’t match the gateway’s registered public key, and the agent rejects the call.
What’s a DID?
DID stands for Decentralized Identifier. It’s a string that looks like:.well-known URL).
You sign outbound requests with the private key. Recipients verify with the public key. Standard public-key cryptography - what puts the green lock in your browser.
The three env vars
Generate a private key seed (once, keep it secret):gateway/.env.local:
gateway/.env.local
Hydra - the registration server
Ory Hydra is an open-source OAuth 2.0 / OIDC server. The Bindu team runs one athydra-admin.getbindu.com that any Bindu gateway or agent can register with.
How it works: You register once at boot; the registry stores your DID + public key; agents that want to talk to you fetch your public key by DID and verify your signatures with it.
gateway/.env.local
npm run dev. You’ll now see:
The gateway derived a DID and public key from your seed.
Deterministic - same seed always produces the same DID.
It POSTed to Hydra's admin API to register.
As an OAuth client, with its DID as the
client_id and its public key in the metadata. Idempotent - safe to restart as many times as you like.http://localhost:3774/.well-known/did.json. Curl it:
Flipping a peer to signed mode
Change the/plan request:
No
token or envVar - the gateway will use its own Hydra token automatically.Body signed
The gateway computes a canonical JSON representation of the body, signs it with its Ed25519 private key, and attaches the signature as
X-Bindu-Signature (plus the DID in X-Bindu-DID).OAuth token attached
Authorization: Bearer <token> - the agent introspects this against Hydra to confirm it’s real and unexpired.Audit trail recorded
The signing result is written to Supabase on the task row: “at time T, gateway signed body hash H to reach agent DID D.”
Fetches the gateway's /.well-known/did.json.
Or uses a cached DID→key mapping from a previous interaction.
Two modes: auto vs manual
- Auto mode (default)
- Manual mode (federated)
One Hydra, shared by the gateway and its peers, handles all the registration and token exchange.Request side:Use this unless you have a specific reason not to.
gateway/.env.local
Chapter takeaway
Local dev
Keep
auth.type: "none". No cryptography needed.Anything across a network you don't control
Configure the DID identity and flip peers to
did_signed. The token and signature are automatic once the env vars are set; you never touch crypto code.