Configuration — Single Sign-On (SSO)
Buggregator supports Single Sign-On (SSO) for secure user authentication via OAuth2/OIDC.
Supported providers:
For OIDC-compatible providers (Auth0, Google, Keycloak, GitLab, generic OIDC), endpoints are auto-discovered from the provider URL via .well-known/openid-configuration. For GitHub, endpoints are hardcoded (GitHub does not support OIDC discovery).
Who can sign in
By default, anyone the provider signs in gets in. Since server 2.14.0, list who may sign in, by email or by domain:
auth:
allowed_emails: ["anna@gmail.com"] # env AUTH_ALLOWED_EMAILS=anna@gmail.com,max@gmail.com
allowed_domains: ["acme.com"] # env AUTH_ALLOWED_DOMAINS=acme.comA person gets in when their email is in allowed_emails or its domain is in allowed_domains. Example: with the settings above, anna@gmail.com and bob@acme.com sign in, eve@gmail.com does not.
- Only an email the provider has confirmed counts. Case does not matter.
- Google:
allowed_domainsmatches your Google Workspace domain, not the address. A personal Google account with an@acme.comaddress does not pass. Name the primary Workspace domain: an alias domain never matches. - GitHub: Buggregator reads the confirmed primary email, even a hidden one. This needs the scope
user:email, which is in the GitHub default (read:user,user:email). If you setAUTH_SCOPESyourself, keepuser:emailin it; without it only the public profile email counts, and a user with no public email is refused. - Microsoft Entra ID (Azure AD) does not confirm emails by default, so with a list everyone is refused. Add the optional claim
xms_edovto the ID token, see Microsoft Entra ID. - The list is checked on every request. Add a list and restart, and people who are not on it are signed out at once, even if they signed in before. Right after the upgrade to this version, everyone signs in once more, allowed people too.
- A refused person sees «Access denied: … is not allowed to sign in to this Buggregator».
- With no list, the server logs at start:
auth: no allowed_emails/allowed_domains set: every account the provider signs in gets access.
Without a list, any account the provider accepts can sign in
On servers older than 2.14.0, or with no list set, Buggregator does not check who signs in. If the provider lets a person log in, that person sees all your events. Example: with GitHub SSO on a public address, anyone with a GitHub account can open your Buggregator.
Set a list, or limit who can sign in at the provider, before you expose Buggregator:
- Google: on the OAuth consent screen, set User type to Internal. Then only accounts of your Google Workspace organization can sign in.
- Auth0: turn off sign-ups, and enable for the application only the connections your team uses.
- Keycloak: only users of the realm can sign in. Turn off User registration in the realm.
- GitLab: on gitlab.com any GitLab account can sign in. A self-hosted GitLab lets in only its own users; turn off sign-ups there.
- GitHub: a GitHub OAuth app cannot limit who signs in. Any GitHub account gets in. Use it only on a private network, or pick another provider.
- Generic OIDC: use your provider's own setting that assigns users or groups to the application.
Without a list or such a limit, do not expose Buggregator to the internet.
Configuration
buggregator.yaml
auth:
enabled: true
provider: oidc # auth0, google, github, keycloak, gitlab, oidc
provider_url: https://xxx.us.auth0.com
client_id: your-client-id
client_secret: your-client-secret
callback_url: http://localhost:8000/auth/sso/callback
scopes: openid,email,profile
jwt_secret: your-jwt-signing-secret
allowed_emails: [] # who may sign in, see «Who can sign in»
allowed_domains: []
admin_emails: [] # who may read the audit log, see «Audit log»Environment Variables
| Variable | Default | Description |
|---|---|---|
AUTH_ENABLED | false | Enable authentication |
AUTH_PROVIDER | oidc | Provider type: auth0, google, github, keycloak, gitlab, oidc |
AUTH_PROVIDER_URL | — | OIDC issuer URL (e.g., https://xxx.us.auth0.com) |
AUTH_CLIENT_ID | — | OAuth2 client ID |
AUTH_CLIENT_SECRET | — | OAuth2 client secret |
AUTH_CALLBACK_URL | — | Callback URL (e.g., http://buggregator.example.com/auth/sso/callback) |
AUTH_SCOPES | openid,email,profile; GitHub: read:user,user:email | Comma-separated OAuth2 scopes |
AUTH_JWT_SECRET | — | Required. Secret for signing internal JWT tokens |
AUTH_ALLOWED_EMAILS | — | Comma-separated emails that may sign in (since 2.14.0) |
AUTH_ALLOWED_DOMAINS | — | Comma-separated domains that may sign in; Google: Workspace domain (since 2.14.0) |
AUTH_ADMIN_EMAILS | — | Comma-separated emails that may read the audit log; empty: every signed-in user (since 2.14.0) |
Important:
AUTH_JWT_SECRETis required when authentication is enabled. It is used to sign the internal session JWT tokens.
Provider Setup
Auth0
- Sign up for an Auth0 account.
- Create a new Regular Web Application.
- Note the
Domain,Client ID, andClient Secret. - In application settings, set Allowed Callback URLs to
http://<your-server>/auth/sso/callback. - Configure Buggregator:
AUTH_ENABLED=true
AUTH_PROVIDER=auth0
AUTH_PROVIDER_URL=https://<domain>.auth0.com
AUTH_CLIENT_ID=xxx
AUTH_CLIENT_SECRET=xxx
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
AUTH_SCOPES=openid,email,profile
AUTH_JWT_SECRET=your-secret-keyGoogle
- Go to Google Cloud Console.
- Create a new OAuth 2.0 Client ID (Web application type).
- Add
http://<your-server>/auth/sso/callbackto Authorized redirect URIs. - Configure Buggregator:
AUTH_ENABLED=true
AUTH_PROVIDER=google
AUTH_PROVIDER_URL=https://accounts.google.com
AUTH_CLIENT_ID=xxx.apps.googleusercontent.com
AUTH_CLIENT_SECRET=xxx
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
AUTH_JWT_SECRET=your-secret-keyGitHub
- Go to GitHub Developer Settings.
- Create a new OAuth App.
- Set Authorization callback URL to
http://<your-server>/auth/sso/callback. - Configure Buggregator:
AUTH_ENABLED=true
AUTH_PROVIDER=github
AUTH_CLIENT_ID=xxx
AUTH_CLIENT_SECRET=xxx
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
AUTH_JWT_SECRET=your-secret-key
# optional: who may sign in
AUTH_ALLOWED_EMAILS=anna@example.com,max@example.comNote: GitHub does not support OIDC, so
AUTH_PROVIDER_URLis not needed. LeaveAUTH_SCOPESempty: for GitHub the default isread:user,user:email(since2.14.0; older servers ask foropenid,email,profile, which are not GitHub scopes). On Helm, setauth.scopes=read:user,user:email: the chart always sends its ownopenid,email,profile.
Keycloak
- Create a new Client in your Keycloak realm.
- Set Valid Redirect URIs to
http://<your-server>/auth/sso/callback. - Configure Buggregator:
AUTH_ENABLED=true
AUTH_PROVIDER=keycloak
AUTH_PROVIDER_URL=https://keycloak.example.com/realms/your-realm
AUTH_CLIENT_ID=xxx
AUTH_CLIENT_SECRET=xxx
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
AUTH_JWT_SECRET=your-secret-keyGitLab
- Go to Admin Area > Applications (or User Settings > Applications for self-managed).
- Create a new application with
openid,email,profilescopes. - Set Redirect URI to
http://<your-server>/auth/sso/callback. - Configure Buggregator:
AUTH_ENABLED=true
AUTH_PROVIDER=gitlab
AUTH_PROVIDER_URL=https://gitlab.com
AUTH_CLIENT_ID=xxx
AUTH_CLIENT_SECRET=xxx
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
AUTH_JWT_SECRET=your-secret-keyGeneric OIDC
Any OIDC-compliant provider can be used. The server will auto-discover endpoints from <provider_url>/.well-known/openid-configuration.
AUTH_ENABLED=true
AUTH_PROVIDER=oidc
AUTH_PROVIDER_URL=https://your-oidc-provider.com
AUTH_CLIENT_ID=xxx
AUTH_CLIENT_SECRET=xxx
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
AUTH_JWT_SECRET=your-secret-keyMicrosoft Entra ID
Entra ID (Azure AD) works as a generic OIDC provider:
AUTH_ENABLED=true
AUTH_PROVIDER=oidc
AUTH_PROVIDER_URL=https://login.microsoftonline.com/<tenant-id>/v2.0
AUTH_CLIENT_ID=xxx
AUTH_CLIENT_SECRET=xxx
AUTH_CALLBACK_URL=http://<server_address>/auth/sso/callback
AUTH_SCOPES=openid,email,profile
AUTH_JWT_SECRET=your-secret-key- Use your tenant id in the URL. Sign-in through the shared
/commonaddress works, but with an allow-list the token's issuer does not match, and everyone is refused. - With an allow-list (
AUTH_ALLOWED_EMAILS/AUTH_ALLOWED_DOMAINS), add the optional claimxms_edovto the ID token: App registration → Token configuration → Add optional claim → ID →xms_edov. It tells Buggregator the email's domain is verified by your tenant (since2.14.0). Without it, everyone is refused. - The profile picture does not show: Entra's picture link needs a Microsoft token.
Verifying the Configuration
Once you set the environment variables, start your Buggregator server. You should see a Login page with an option to sign in. If everything is set up right, clicking this option will take you to the provider's login page.

After logging in successfully, users will be redirected back to the Buggregator server and logged in. Click your picture in the bottom left corner to open the user menu. It shows your name and email, Audit log (admins only, see Audit log) and Logout. The name is the full name from the provider, or the login when the profile has no name (since 2.14.0). Example: Anna Petrova, or anna-p on GitHub without a name.

Signed-in users
Since server 2.14.0, Buggregator remembers who signs in. It keeps, in its database:
- users: name, email and picture from the provider. They are updated on every sign-in. Example: rename yourself at the provider, sign in again, and Buggregator shows the new name.
- sessions: one per sign-in, so that Logout really signs out;
- personal settings of each user;
- the audit log: who changed or deleted what.
Keep the database in a file
With the default in-memory database, a restart forgets all of this. Everyone is signed out, personal settings are gone, and the audit log is empty. Use a database file, see Database. The Helm chart already stores the database on a volume.
Right after the upgrade to 2.14.0, everyone signs in once more. Older tokens have no session on the server, so they stop working.
Sign out
Logout in the user menu ends the session on the server. The token stops working at once, even if someone copied it:
- the API answers
401; - open live-feed connections of this session are closed, and a new one is refused.
Only this browser is signed out. Example: you signed in on your laptop and your desktop; sign out on the laptop, and the desktop stays signed in.
Without sign-out, a session ends after 30 days, like its token.
Personal settings
Your settings are stored on the server, not only in the browser. Sign in from another browser or computer, and your settings are there. Example: switch to the light theme at work, sign in at home, and the light theme is on.
Saved this way: the theme, the period of the event list, the fixed header, the menu (hidden items, collapsed sidebar, event counters), the code editor and file path mapping, keyboard shortcuts and key hints, desktop notifications, Monolog context display, and the Sentry filters, views and the paused service map. The feed filters are not saved: they are part of the page address, so share the link instead.
The first time you sign in from a browser, settings your account already has replace this browser's, and the ones it lacks are taken from this browser. If someone else used this browser before, their settings are replaced by yours, not copied into your account. A setting the server refuses (over 16 KB) stays in this browser only.
Audit log
The audit log lists what people did:
| Action | When |
|---|---|
login | someone signed in |
login_denied | someone was refused by the allow-list |
logout | someone signed out |
settings.update | someone changed personal settings (the log shows which keys) |
events.clear | someone cleared events (the log shows the type, project and how many were selected) |
event.delete | someone deleted one event |
sentry.clear, smtp.clear | someone cleared Sentry data or emails |
the route, e.g. POST /api/mocks | any other change: mock rules, crons, Xdebug eval |
Admins open it from the user menu (Audit log) or the command palette. It lists the newest rows first; Show older loads more. Each row has the time (in your time zone), who, the action with the address that was called, the answer's status code (red when it failed) and the IP address. A person who is not an admin sees «Only admins can see the audit log».

The API answers the time in UTC. Reading pages and stepping through the debugger are not logged. Rows older than 90 days are deleted.
Who may read it: list the admins by email:
auth:
admin_emails: ["anna@acme.com"] # env AUTH_ADMIN_EMAILS=anna@acme.com,max@acme.comWith no admins listed, every signed-in user reads the audit log
The log shows every user's email and IP address. Set admin_emails if your team should not see each other's.
The IP address is the one that connected to Buggregator. Behind a reverse proxy (nginx, Traefik, a Kubernetes Ingress), it is the proxy's address, the same for every row.
On Helm (chart 3.3.0 and later): --set 'auth.adminEmails={anna@acme.com}', see Helm Chart. Older chart: pass AUTH_ADMIN_EMAILS (a comma list) through extraEnv.
Links to an event
Share a link to an event, and the person who opens it lands on that event, even when they have to sign in first. Link at the top of an event page copies its address. Example: you send https://buggregator.example.com/sentry/event/<uuid> in chat. Your teammate opens it, signs in at the provider, and sees that Sentry error, not the start page.
Link is on the common event page. Sentry trace, cron and queue pages have no Link button: copy the address from the browser. Such a link also returns to its page after sign-in.
To start a sign-in that returns to a page, open /auth/sso/login?return_to=<path>, with the path URL-encoded. Buggregator accepts only a path on the same server, starting with one /. Any other value (another site, //host) is dropped, and the person lands on the start page.
Calling the API from Scripts
With SSO on, the APIs behind the UI need a login token in the X-Auth-Token header. Without it they answer 401. This covers /api/events, Sentry (/api/sentry/*), the profiler, the SMTP testing API (/api/smtp/*), attachment lists, /api/metrics, mock rules (/api/mocks*) and Xdebug (/api/xdebug*).
Since v2.6.0 this includes the Sentry, profiler and SMTP testing APIs. Before, they answered without a token. A test script that reads captured emails must now send the header:
curl http://buggregator.example.com/api/smtp/messages \
-H "X-Auth-Token: $BUGGREGATOR_TOKEN"The token is the one the UI gets after you sign in. It is valid for 30 days. To copy it, open the browser's developer tools on the Buggregator page and read token from Local Storage.
These stay open, so your apps keep sending events without a token:
- event ingestion (Sentry SDK, Ray, Inspector, profiler, SMS, HTTP dumps) and the TCP ports;
- the mock server under
/mock/; /api/version,/api/settingsand the SSO login pages;- attachment download and preview:
/api/{smtp,http-dump}/attachments/{eventUuid}/{uuid}and/api/{smtp,http-dump}/attachments/{eventUuid}/preview/{uuid}. The UI opens them as plain links, which carry no token. A link needs both the event and the attachment UUID, and with SSO on only signed-in clients (the protected API and the live feed) get those; - Prometheus
GET /metricson the main port, when metrics are on andmetrics.addris empty. It has counters only, no event content. Setmetrics.addrto move it to its own port.
The live feed needs the same token. A WebSocket client of /connection/websocket sends it as token in its Centrifugo connect command. Without a valid token the connect gets error 109 unauthorized, the socket is closed with code 1008, and no events are pushed. The UI does this by itself after you sign in.
With SSO off, nothing needs a token.
Account API
Since server 2.14.0. All calls need X-Auth-Token. They exist only with SSO on.
| Call | Answer |
|---|---|
GET /api/me | {"data": {"id", "provider", "username", "email", "avatar", "logout_url", "is_admin"}}. is_admin: may read the audit log |
POST /api/auth/logout | 204. The token stops working at once |
GET /api/me/settings | {"data": {"<key>": <any JSON>}} |
PUT /api/me/settings | Body {"<key>": <value>} adds or replaces keys; null removes a key. Answers all settings, like GET |
GET /api/audit?limit=100&before=<id> | {"data": [{"id", "at", "user_id", "user", "action", "target", "status", "ip"}], "next_before": <id>}, newest first. limit 1–500, default 100. 403 for a user who is not an admin |
Settings limits: 64 keys per user, a key up to 128 characters, a value up to 16 KB, a request up to 256 KB. Over a limit the server answers 400 or 413 with {"message", "code"}.
To read the next page of the audit log, pass the last next_before as before:
curl "http://buggregator.example.com/api/audit?limit=50" -H "X-Auth-Token: $BUGGREGATOR_TOKEN"
curl "http://buggregator.example.com/api/audit?limit=50&before=1234" -H "X-Auth-Token: $BUGGREGATOR_TOKEN"Troubleshooting
If you encounter issues during the authentication process, ensure that:
- All environment variables are correctly set without any typos.
- The callback URL in your provider's configuration matches the
AUTH_CALLBACK_URLyou specified. AUTH_JWT_SECRETis set (it is required for session management).- «Sign-in expired»: the sign-in started in another tab, or took more than 10 minutes. Start it again. Two sign-ins in two tabs at once end the same way for the first one.
- «Access denied»: the email is not on
allowed_emails/allowed_domains, or the provider did not confirm it. The server log names the email and whether it was confirmed. - For OIDC providers, the
AUTH_PROVIDER_URLpoints to the issuer root (e.g.,https://xxx.auth0.com, nothttps://xxx.auth0.com/authorize).