Authentication
Anthropic API authentication and server role-based access
Authentication
Neptune has two authentication layers: Anthropic API auth (for AI features) and server API auth (for the REST API).
Anthropic API
Neptune needs Anthropic API access for AI-powered features (analysis, decompilation, rebuild, port).
Credential resolution order
--api-keyCLI flagANTHROPIC_API_KEYenvironment variable- Stored OAuth credentials (from
neptune login)
OAuth login
neptune loginOpens a browser for Anthropic OAuth. Credentials are stored locally at ~/.config/neptune/credentials.json.
API key
export ANTHROPIC_API_KEY=sk-ant-...Server API authentication
The REST API supports three roles with different access levels:
| Role | Access | Variable |
|---|---|---|
| Admin | Full access (all endpoints) | NEPTUNE_ADMIN_KEY |
| Analyst | Read + analyze (submit jobs, view results) | NEPTUNE_ANALYST_KEY |
| Viewer | Read-only (view results only) | NEPTUNE_VIEWER_KEY |
Pass the API key in the Authorization header:
curl -H "Authorization: Bearer <key>" http://localhost:9090/api/v1/jobsLegacy key
NEPTUNE_API_KEY is a legacy single-key mode that grants admin access. Use role-specific keys for production.
Web Dashboard auth
The web dashboard uses Better Auth with GitHub OAuth:
- Set
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET - Set
BETTER_AUTH_SECRETfor session encryption - Users log in via GitHub on the web UI