Authorization: Bearer. Node-agent control-plane routes under /v1/agent/* nest an extra shared secret on top of that Bearer check.
Bearer credential Pass a JWT from login or a long-lived API key:
POST /v1/auth/login / POST /v1/auth/register or an API key created via /v1/apikeys. On first boot the server may seed an admin API key, printed once in the logs for ARIAPIN_API_KEY in serve; there is no ADMIN_API_KEY env bootstrap. Keys are scoped to the owning user.
Public routes (no auth):
GET /healthGET /versionPOST /v1/auth/loginPOST /v1/auth/register
/v1/agent/* are mounted inside the authenticated /v1 group. Each agent callback requires both headers:
X-Agent-Secret must equal the server environment variable AGENT_REGISTER_SECRET. If that variable is empty, agent registration is disabled and these routes return 401. This is a shared deployment secret, not an HMAC scheme and not a per-user API key.
Example (user route)
401 with: