How to configure authentication
Turn on sign-in and set up one or more of Flare's five auth methods. For
what each method actually does and why it's built this way, see
../explanation/authentication-model.md;
for exact config keys and the roles table, see
../reference/authentication-config.md.
Everything below happens on one Admin-only page, /auth:


Turn on sign-in
- Open
/auth(reachable to anyone while authentication is off, same as every other page while it's off). - Flip the top-level "Require sign-in" switch on. This reveals five method sections — Local / Microsoft Entra ID / Active Directory / OpenID Connect / Reverse proxy — each with its own enable toggle and inline configuration, plus a Users table underneath.
- Create your first Local account, in the Local section. The first
Local account you create is always
Admin— there's no separate "setup mode" beyond that; once at least one Local account exists, sign-in works the normal way. Do this even if your real plan is SSO/AD/proxy — it's your break-glass path if a group→role mapping ever gets misconfigured.
You can enable any combination of the five methods at once — they coexist, not exclusive, by design.
Set up Microsoft Entra ID (SSO)
- In Entra ID → App registrations → New registration. Single tenant ("Accounts in this organizational directory only").
- Redirect URI, platform "Web": sign in to Flare with your local Admin
account and open
/auth— it displays the exact redirect URI to paste here, computed from whatever host/port you're actually reachingFlare.Apion. For a localdocker compose upthis ishttp://localhost:8080/signin-oidcby default; usehttps://once reachable beyond your own machine (see the HTTPS caveat below). - Certificates & secrets → New client secret. Copy the value immediately — like an ingest API key's raw value, Azure only shows it once.
- App roles: add three
appRolesentries with"value"set to exactlyAdmin,Member, andViewer(case-insensitive match, but keep them exact) and"allowedMemberTypes": ["User"]. Then, in Enterprise applications → your app → Users and groups, assign each person (or group) the App Role that should become their Flare role. No App Role assigned (or none configured at all) provisionsAuth:Entra:DefaultRoleinstead (Viewerunless overridden). - Note the Application (client) ID and Directory (tenant) ID from the registration's Overview page.
- Back in Flare's
/authpage, Microsoft Entra ID section: paste the Directory (tenant) ID, Application (client) ID, and client secret, flip Enabled on, and Save. - Restart
Flare.Api(docker compose restart api, or anaspire resource restartin local dev) — Entra settings changes take effect on restart, not live. - Sign out and confirm "Sign in with Microsoft" appears on the login page; sign in with a real account to confirm end-to-end.
HTTPS caveat: the correlation cookies ASP.NET Core's OIDC handler sets
during the redirect round-trip to Microsoft need to survive a cross-site
navigation, which browsers only reliably allow over HTTPS (Chrome/Edge
special-case plain http://localhost, which is why local dev works). Any
real deployment reachable beyond your own machine needs HTTPS for Entra ID
sign-in to work.
Set up Active Directory (LDAP)
- On
/auth, in the Active Directory section, fill in:- Host / Port — your domain controller's address. Defaults to port 636 (LDAPS).
- Use LDAPS (TLS) — on by default; leave it on for anything beyond a throwaway test directory.
- Pinned server certificate (optional) — paste a PEM-encoded
certificate to pin TLS trust for this connection to exactly that
certificate, bypassing the OS trust store. Use your internal CA's
root certificate if the DC's certificate is signed by a private CA,
or the DC's own certificate if self-signed. You can paste more than
one certificate back to back — a root plus the intermediate that
actually signed the DC's leaf certificate, or two DC certificates
side by side to ride out a rotation window — same concatenated-PEM
convention as any CA bundle file; at least one certificate in the
bundle must be self-signed to serve as a trust anchor. Get it with
openssl s_client -connect dc.corp.example.com:636 -showcerts, whose output already includes the full chain. Leave blank to keep relying on the OS/container trust store (the default). - Base DN — the search root, e.g.
DC=corp,DC=example,DC=com. - Bind DN (service account) / Bind password — a directory account with read access to search for users under the Base DN. Doesn't need to be an Admin account in AD itself.
- Admin / Member / Viewer group DN (optional) and Default role —
three group DNs; a user's
memberOf(including nested membership on real Microsoft AD) is checked against each, highest-privilege match wins, no match falls to Default role. - Advanced (collapsed by default) — override User search filter
(default
(&(objectClass=user)(sAMAccountName={0})), AD's own convention) or Unique ID attribute (defaultobjectGUID) only if pointing this at something other than a standard AD layout, e.g. OpenLDAP's(&(objectClass=inetOrgPerson)(uid={0}))filter withentryUUIDas the unique ID attribute.
- Flip Enabled on and Save — takes effect immediately, no restart. The bind password is never echoed back once saved — leave that field blank on a later edit to keep the currently-saved value.
- Sign out and confirm the "Active Directory" option now appears next to "Local" on the login page; sign in with a real directory account to confirm end-to-end.
Known limitations, stated plainly:
- Nested group membership only resolves against real Microsoft AD, not other directories.
- Built and named for Microsoft AD/AD-compatible directories — the Advanced overrides are flexible enough to point this at a plain OpenLDAP directory too, as this feature's own verification testing did.
- Linux containers need the native LDAP client library installed
(
libldap2— already in Flare's ownFlare.ApiDocker image, but a custom/non-Docker Linux deployment needs it too).
Set up OpenID Connect
Use this for any standards-compliant OIDC provider that isn't Microsoft Entra ID — Okta, Auth0, Keycloak, Authentik, and the like.
- Register Flare as an application/client with your OIDC provider. Every
provider needs:
- Redirect/callback URI — sign in to Flare with your local Admin
account and open
/auth; the OpenID Connect section displays the exact callback URL to paste in. - A client secret — copy the value immediately; most providers only show it once.
- Redirect/callback URI — sign in to Flare with your local Admin
account and open
- Back in Flare's
/authpage, OpenID Connect section, fill in:- Display name — shown on the sign-in page as "Sign in with {Display name}".
- Authority — your provider's issuer URL, e.g.
https://your-tenant.okta.com. Flare fetches{Authority}/.well-known/openid-configurationfor the rest. - Client ID / Client secret.
- Scopes — defaults to
openid profile email. - Role claim name (default
roles) — set to whatever your provider actually issues; Okta's default isgroups, for instance. - Default role — used when the claim is absent or has no recognized value.
- Flip Enabled on and Save, then restart
Flare.Api(docker compose restart api, oraspire resource restartin local dev) — takes effect on restart, not live. - Sign out and confirm "Sign in with {Display name}" appears on the login page; sign in with a real account at your provider to confirm end-to-end.
HTTPS caveat: same as Entra ID — the correlation cookies need to
survive a cross-site navigation, which requires HTTPS beyond
http://localhost.
Known limitation: v1 is sign-in only — Flare doesn't yet propagate
logout to the provider's own end-session endpoint; /api/auth/logout
just clears the local session.
Set up reverse-proxy (trusted header) auth
Use this if a reverse proxy already sitting in front of Flare — Authelia, Authentik, oauth2-proxy, Cloudflare Access, Tailscale Serve, or similar — has already authenticated the request and can forward the identity as a header.
Before you start, make sure Flare.Api is not reachable except
through that proxy — if your compose/network setup exposes Flare.Api's
port directly, this method is not safe to enable (see
the explanation
for why).
- Configure your reverse proxy to authenticate requests and forward the
signed-in identity as a header — the exact steps vary by proxy.
Authelia/oauth2-proxy-style setups typically call this
Remote-User(Flare's own default) orX-Forwarded-User; check your proxy's own docs for the exact header name and whether it also emits a groups header. - Find your Docker network's actual subnet
(
docker network inspect <network>— don't guess172.18.0.0/16, confirm it) or the specific address(es) your proxy connects from. - On
/auth, in the Reverse proxy section, fill in Header name (matching whatever your proxy actually sends) and Trusted proxy CIDRs (one per line — required; a valid CIDR is mandatory, there is no "trust everyone" default). Set Groups header name / group fields / Default role if you want group-based role mapping. Optionally, under Advanced: logout, set Logout redirect URL to your proxy's (or IdP's) own sign-out URL — see "Known limitations" below for why this is a manual step. - Flip Enabled on and Save — takes effect immediately, no restart.
- Reach Flare through the proxy (not directly) and confirm
/loginsigns you in silently. Then confirm hittingFlare.Apidirectly (bypassing the proxy, if that's even reachable in your setup) with a hand-set header gets a403, not a session.
Direct API/script callers (never having loaded the dashboard) need to call
POST /api/auth/proxy/login once themselves through the proxy to obtain a
session — this method doesn't authenticate every request ambiently.
Known limitations, stated plainly:
- Logout doesn't propagate to the proxy/IdP automatically — as long as
the proxy keeps sending the header,
/loginsilently re-establishes a session right after a manual logout. Set Logout redirect URL (Advanced: logout) as the manual escape hatch — Flare's "Log out" then sends the browser there instead of back to/login. - A misconfigured or over-broad trusted-CIDR range is a real security
hole, not a theoretical one. Flare rejects the one most catastrophic
case outright (
0.0.0.0/0/::/0can't be saved), but anything short of that — e.g. an entire10.0.0.0/8when only one proxy container needed trusting — is still your call to get right; there's no way for Flare to know what your actual network topology should be.
Ingest API keys
Ingest API keys authenticate OTLP exporters (machines), separate from user accounts.
- Create one:
Admin-only, from the dashboard's Ingest keys page (the⋯menu, top right) orPOST /api/ingest-keys(name it something like"prod-collector"). The raw key is shown exactly once — copy it somewhere safe immediately. - Use it: send
Authorization: Bearer <key>on your OTLP exporter (gRPC or HTTP — both checked the same way). - Revoke it:
DELETE /api/ingest-keys/{id}. Takes effect within 30 seconds —Flare.Ingestcaches the active-key set in memory and refreshes it on a timer rather than hitting SQLite on every ingest request. - Rename it:
PUT /api/ingest-keys/{id}/name. Names are unique among active keys (case-insensitive), so a name can address a key; a revoked key's name can be reused. - Expire it (optional): set an expiry when creating the key (
expiresAtUnixMsonPOST /api/ingest-keys, or the dialog's Expiration field), or change it later withPUT /api/ingest-keys/{id}/expiry(nullclears it; the time must be in the future). An expired key is rejected at its exact expiry time, not up to 30 seconds later, and is not revoked: setting a new future expiry brings it back, and the Ingest keys page has a one-click extend by 90 days. The page badges a key as Expires in Nd for its last 14 days. Keys have no expiry by default. ADR-0207 To be warned before a key or personal access token expires, setCredentialExpiry__ChannelIds__0to the id of a saved notification channel (webhook/Slack, Telegram, email, Teams or Discord). Flare then sends one warning per credential at 14 and 3 days before expiry (CredentialExpiry__WarnDays__0,__1; checked every 6 hours,CredentialExpiry__CheckInterval), and the Access tokens page shows the same Expires in Nd badge. Without a channel id, nothing is sent. ADR-0208 - Limit it (optional): on the Ingest keys page, or
PUT /api/ingest-keys/{id}/limits, cap a key's events and/or bytes per UTC minute and per UTC day, with an on/off toggle. Events are log records, spans, and metric data points. A key at its cap gets a retryable OTLP throttling response — HTTP429withRetry-After, or gRPCRESOURCE_EXHAUSTEDwith aRetryInfodelay — so exporters back off and retry rather than drop data. The same page shows each key's usage for the current minute and day. Limits only apply whileAuth:IngestKeyRequired=true(otherwise an exporter could just omit the key), never toAuth:StaticIngestApiKey, and a change takes effect within the same 30 seconds as a revocation. They're a soft cap: a batch is admitted while usage is still under the cap, so a window can end up slightly over by the batches already in flight. - Turn on enforcement once you've migrated every exporter: create at
least one key, update your exporters to send it, then set
Auth:IngestKeyRequired=true(defaults tofalse, so upgrading an existing deployment doesn't suddenly reject anonymous ingest). This flag is independent of the dashboard's "Require sign-in" switch — ingest enforcement and dashboard/API-user auth are separate gates. - For automated setups (an AppHost wiring a resource graph before
either process has started, where "click a button in the dashboard"
doesn't fit):
Auth:StaticIngestApiKeyis a fixed key set via configuration, valid alongside any keys created through the UI. This is whatFlare.AppHost(local dev) and the Aspire integration'sWithApiKey(...)use.
Personal access tokens
Personal access tokens authenticate the query API (/api/logs,
/api/alerts, etc.) as a specific user, separate from ingest API keys
above. Self-service — any signed-in user (Viewer and up) can create
their own; there's no admin step.
- Create one:
POST /api/access-tokenswhile signed in, e.g. from the dashboard's terminal (open it, runhelpfor the exact command) —{"name": "ci-pipeline", "expiresInDays": 90}(expiresInDaysis optional; omit it for a token that never expires). The raw token is shown exactly once — copy it somewhere safe immediately. - Use it: send
Authorization: Bearer <token>on any query-API request. It authenticates as whoever created it, with that user's existing role — it does not grant any permission the user didn't already have. - List/revoke:
GET /api/access-tokenslists your own tokens;DELETE /api/access-tokens/{id}revokes one immediately (anAdmincan also revoke a token belonging to someone else, by id, without needing to disable that user's whole account). - Doesn't work for the live-tail WebSocket — a browser can't attach a custom header to a WebSocket upgrade the way it automatically sends the session cookie. Use a session (i.e. stay logged in) for live-tail; PATs are for plain request/response calls.
Service accounts
A service account is a non-human account for CI, scripts and shared
integrations (such as the /mcp endpoint), so they
don't depend on a person's token. Admin-only, in the Service accounts section
of /auth:
- Create one: name and role (
POST /api/service-accounts). It can't sign in with a password or SSO. - Issue a token:
POST /api/service-accounts/{id}/access-tokens({"name": "ci", "expiresInDays": 90}), or the Tokens button in the dashboard. The raw token is shown once. Use it like any personal access token; it carries the account's role. - Rotate or revoke: issue a new token, then
DELETE /api/access-tokens/{id}the old one. A service account can't mint tokens itself, so every issue lands in the audit log under an Admin. - Change role or disable: in the Users table, like any user. Disabling stops its tokens immediately.
- Read or delete:
GET /api/service-accounts/{id},DELETE /api/service-accounts/{id}. Delete is permanent and removes its tokens and project memberships; to keep the account but stop it authenticating, disable it instead. Only service accounts can be deleted this way.
Managing users
Admin-only, in the Users section of /auth (GET/PATCH /api/users/*) —
list every account (any provider), change a role, or enable/disable an
account. This is also where you promote a newly-auto-provisioned Entra/AD/
OIDC/reverse-proxy account past its initial role, or disable one without
waiting for someone to remove their group/role assignment upstream. Flare
refuses to demote or disable the last enabled Admin — that would be a
lockout recoverable only by editing the SQLite file directly.
Inviting users and resetting passwords
Invite user in the Users table (POST /api/users/invite, username + role) creates a local account nobody can sign in to yet and shows a one-time /set-password?token=… link. Send it to the person; they choose their own password on that page. The link works once and expires after 3 days. If SMTP and Alerting:PublicUrl are configured and the username is an email address, Flare also emails it; either way, copy it from the dialog, which shows it only once.
Bulk invite: put several usernames in the invite box (one per line, or comma-separated, up to 100). Flare creates each account, skips ones that already exist, and shows a results list with a "Copy all links" button (POST /api/users/invite/bulk).
Reset link on a local account's row (POST /api/users/{id}/password-reset) issues a new link (valid 24 hours), replaces any earlier unused one, and signs that account out everywhere immediately. Redeeming either kind of link also signs the account out of every existing session. Only local accounts have a Flare-managed password; SSO accounts don't get these controls.
A signed-in local user can change their own password with POST /api/auth/password (currentPassword, newPassword, minimum 8 characters); their other sessions are revoked and the current one stays signed in.
Forgot password? When Email:Host, Email:From and Alerting:PublicUrl are all set, the sign-in page shows a "Forgot password?" link. It emails a 1-hour, single-use set-password link (POST /api/auth/forgot-password) to a local account whose username is its email address; accounts with other usernames still need an admin reset link. The response is identical whether or not the account exists, and repeat requests for one account within a minute are ignored (tracked in the identity database, so it holds across restarts and replicas).
Audit log
Flare records who changed what. Every successful change to an alert rule, notification channel, maintenance window, pipeline rule, dashboard, saved view, user role or disabled flag, personal access token, ingest key, auth setting, Apdex threshold, metric metadata override or promoted attribute becomes one audit event: time, actor, action, resource type and id, route, source IP, and whether the actor used a session or a personal access token.
Admins read it from Settings → Workspace → Audit log (/settings/audit-log), newest first, filterable by resource type, or via GET /api/audit-events (filters from, to, actorId, resourceType, action; page with before). Events are append-only and are deleted after Audit:RetentionDays (default 365; 0 keeps them forever) - see the configuration reference.
Updates to an alert rule, notification channel, maintenance window, pipeline rule, dashboard, saved view, user, ingest-key limits or auth setting also record which fields changed, as before → after pairs shown under Changes on the page and in the changes array of GET /api/audit-events. Values of secret fields (anything named like a URL, key, token, secret or password) are replaced by [redacted]: the log shows that a webhook URL or client secret changed, never what it was. Long values are cut at 300 characters. Creates, deletes and the other audited changes record no field list.
Read auditing. Reads are not recorded by default. Set Audit:RecordReads=true and Flare also records who queried telemetry: log search, aggregation, patterns, queries, context and live tail; span search; trace views; metric queries; and error groups and occurrences. Each is an event with action query, view or tail and resource type logs, traces, metrics or errors (a trace view carries the trace id as the resource id), plus the actor, time, source IP and how they authenticated. The filter or query text is never stored, in line with the rest of the log. A user repeating the same read, such as a dashboard refreshing, is recorded once per Audit:ReadDedupeSeconds (60). Filter on these types on the page, or by resourceType in the API and export. Expect far more events than config changes; they share the retention setting.
Forwarding. Set Audit:Forwarding:Webhook:Url (optionally with :Secret for an HMAC signature) and/or Audit:Forwarding:Syslog:Host and Flare pushes every new event to that destination within seconds, oldest first, as the same rows the JSON export produces (syslog carries one row per RFC 5424 message). Delivery is at-least-once: Flare remembers how far each destination got and resends a failed batch, so a receiver should de-duplicate on id. The first time a destination is configured the whole retained trail is sent. A destination outside Flare's reach is also what makes the hash chain trustworthy, because someone who rewrites Flare's database cannot rewrite the copy you already shipped. Run one Flare.Api instance when forwarding is on; with several, each would send the same events.
Export and integrity. Download the trail from the page (Export CSV / Export JSON) or with GET /api/audit-events/export?format=csv|json|ndjson, which takes the same from, to, actorId, resourceType and action filters and streams every match. CSV cells that a spreadsheet would run as a formula get a leading apostrophe; use json or ndjson (one event per line, for SIEM ingestion) when you need the exact values. Each event also carries prevHash and hash: hash is the SHA-256 of the previous event's hash plus the event's own fields, so editing, reordering or deleting a row in the middle of the trail breaks the chain. Verify integrity on the page (or GET /api/audit-events/verify) walks the chain and names the first broken event. Two limits: events written before this feature are not chained and are only counted, and removing the newest events cannot be detected from inside the database, so record the headHash the verify call returns somewhere else if you need to prove nothing was cut off the end. The chain is not a signature: someone who can rewrite the whole database and recompute every hash can forge it, which is what shipping the export to a separate system protects against.
Test sends, previews and sign-ins are not recorded, and telemetry reads only with Audit:RecordReads.
Backups
The identity SQLite file isn't backed up by any special tooling — include
the identity-data volume (docker-compose) or .data/identity/ directory
(local Aspire dev) in whatever backup story you already have for the
clickhouse-data/redis-data volumes.
Last updated: