Authentication & Multi-Tenancy
Bearer-token authentication maps a token to a tenant:
export GRAFOMEM_AUTH_MODE=token
export GRAFOMEM_TOKENS='{"tok_abc": "tenant_a", "tok_xyz": "tenant_b"}'
grafomem serve --auth token
- Missing credentials → 401
- Present but unknown token → 403
The resolved tenant is applied to MULTI_TENANT operations automatically. Use placeholder tokens in examples; never commit real ones.
Source: src/aml/server/auth.py