Skip to main content
Auth is configured via the exporterAuth field on TelemetryConfig. The same credential is forwarded to the safety-check API automatically. The simplest mode — works with Sedata Cloud out of the box.
The exporter sends Authorization: Bearer <token> on every request.

API key

Some collectors prefer a custom header. Use apiKey to send x-api-key:
This also enables safetyCheck to authenticate against api.sedata-ai.tech/security/safety-check.

Basic auth

type: 'basic' is accepted by ConfigValidator but the basic header is currently a no-op in the exporter setup (it’s commented out in telemetry.ts). Until that ships, use bearer or apiKey and put basic-auth behind a proxy if you must.
Track #auth-basic for status. Until it lands, use a sidecar (nginx, envoy, caddy) to inject the Authorization: Basic ... header.

No auth (private network)

Skip exporterAuth entirely if your collector is open inside a private network:

Console exporter (no auth)

For local dev, skip the exporter entirely:
No exporterEndpoint or exporterAuth is needed.

How auth flows to safety checks

instrumentServer extracts the auth token from your config and stashes it for safetyCheck to use. Both bearer.token and apiKey.apiKey get forwarded to the safety endpoint as the x-api-key header.
If you want a different credential for the safety API, call setTelemetryApiKey directly:

Validation rules

ConfigValidator enforces that the right field is present for each type: Missing fields throw with a clear message at instrumentServer time — auth problems fail loud, not silently.