This page explains how authentication and request signing work in Coral Server, and how agent secrets are handled at runtime.Documentation Index
Fetch the complete documentation index at: https://docs.coralos.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authentication keys (server API)
- Source of truth:
AuthConfig.kt - Configuration source:
config.toml(via Hoplite inConfigModule.kt)
Authorization: Bearer ... header when calling APIs such as /api/v1/local/session or /api/v1/registry.
Request signing for webhooks and custom tools
- Source of truth:
NetworkConfig.kt(webhookSecret,customToolSecret),LocalSessionManager.handleSessionClose,GraphAgentToolTransport.Http, andHttpSignatureUtils.kt
sessionEnd) and for HTTP‑based custom tool requests. Verify signatures on your server to prevent spoofing.
X-Coral-Signature. For HTTP custom tools, you may override the header name via the transport’s signatureHeader option; otherwise the default is used.
SessionAgentSecret (agent → server)
- Source of truth:
SessionAgent.ktandLocalSessionManager.issueAgentSecret
SessionAgentSecret. This secret authenticates the agent when connecting to the MCP server (SSE/WebSocket).
Properties:
- Random per agent instance
- Only valid for the lifetime of the session
- Revoked automatically when the session ends
- Read
CORAL_AGENT_SECRETfrom the environment provided by the orchestrator - Only use it to authenticate your MCP transport
- Do not log or transmit the secret elsewhere
| Variable | Purpose |
|---|---|
CORAL_CONNECTION_URL | MCP transport URL to connect to |
CORAL_AGENT_ID | Unique name of this agent instance in the session |
CORAL_AGENT_SECRET | Secret used to authenticate to Coral’s MCP endpoints |
CORAL_SESSION_ID | Session identifier |
CORAL_API_URL | Coral Server REST API base URL |
CORS and CSRF considerations
The server’s CORS policy is controlled byNetworkConfig.allowAnyHost (default: false).
allowAnyHost = false in production and explicitly configure your reverse proxy/frontend to call Coral from trusted origins.
Checklist
- Use strong random
auth.keys, rotate regularly - Set
webhookSecretandcustomToolSecretto strong values - Verify webhook signatures in your app
- Never log
CORAL_AGENT_SECRET - Keep
allowAnyHost = falsein production
TODO: Add concrete code samples (Node/Go/Python) for verifying webhook signatures.