The reference gateway is a demo. Before production, address these items:

Must Do

ItemWhyHow
Enable attestation verificationDemo skips crypto verificationRemove skipSignatureVerification: true
Persistent storageIn-memory = data lost on restartReplace InMemory* stores with PostgreSQL/Redis
TLSATH requires HTTPSPut behind nginx/Caddy with valid certs
Strong JWT secretDemo uses random-at-bootSet ATH_JWT_SECRET to a persistent, strong secret
Disable signupDemo allows open registrationSet ATH_SIGNUP_ENABLED=false, manage users manually

Should Do

ItemWhy
Rate limitingPrevent brute-force on registration/token endpoints
Audit loggingTrack which agents accessed what, when
Provider secret encryptionDon’t store OAuth secrets in plaintext JSON
Token expiry tuningAdjust ATH_TOKEN_EXPIRY based on your security needs
Health checksAdd /health to your monitoring

Architecture for Scale

The key change for horizontal scaling: all instances must share session and token state via an external store.