Authentication

Status: v0 (M1). Single-operator model. Multi-tenant auth lands in M5.

Two keys, two roles

Flow

# On the control-plane host, once:
cat /var/lib/h4a/master.key         # copy

# On your laptop, once:
h4a login https://h4a.site
#   Master key (input hidden): ****

# Every time you want a fresh subkey for an agent:
h4a session create --tenant default --ttl-hours 24
# eyJhbGciOi... (prints on stdout)

Paste the JWT into your agent's MCP config as the bearer token. The MCP URL is https://h4a.site/mcp.

Error responses

All 401 responses carry this docs_url and a human-readable message. Common cases:

Rotation

v0 has no automatic rotation. If the master key leaks:

  1. ssh to the control-plane VM.
  2. rm /var/lib/h4a/master.key && systemctl restart h4a-controlplane.
  3. h4a login https://h4a.site again on every operator machine.
  4. All existing subkeys are now invalid; agents must session create again.

Threat model