Single Sign-On

Central Logging can sign the admin in through an OpenID Connect (OIDC) provider. Once it is configured, the login page shows a Sign in with single sign-on button below the password form.

Single sign-on is another way into the same single admin account. It does not add users or roles, and it does not replace the password: the password login, and HTTP Basic Auth for curl and scripts, keep working. If the provider is down or misconfigured, log in with the password.

Who can sign in

The provider confirms who the person is. Central Logging then decides whether to let them in. A sign-in is accepted when either:

  • the provider reports a verified email that matches OIDC Allowed Email, or Admin Email when that is blank (case does not matter), or
  • the person is a member of OIDC Allowed Group, read from the groups claim of the ID token.

If both the allowed email and the allowed group are blank, nobody can sign in with single sign-on.

Providers such as GitLab and Google let anyone create an account and finish their sign-in page. That alone never grants access: anyone who does not pass the check above is sent back to the login page with Single sign-on failed.

Settings

Single sign-on is configured on the Settings page. It is turned on when both the issuer URL and the client ID are set.

  • OIDC Issuer URL — Base URL of the provider, for example https://id.example.com, https://gitlab.com or https://accounts.google.com. Leave blank to turn single sign-on off.
  • OIDC Client ID — The client ID from the provider.
  • OIDC Client Secret — The client secret from the provider.
  • OIDC Allowed Email — The verified email allowed to sign in. Leave blank to use the Admin Email.
  • OIDC Allowed Group — Members of this group may also sign in. Setting it makes Central Logging request the groups scope, so only set it with a provider that supports one (see below).

Changes take effect on the next sign-in.

Setting up the provider

Every provider needs a client (sometimes called an application) for Central Logging with:

  • Callback / redirect URL: https://<host>/auth/oidc/callback, where <host> is the Host setting
  • Client type: confidential, with a client secret
  • Scopes: openid, email and profile, plus groups if you use an allowed group

Both your browser and the Central Logging server must be able to reach the provider over HTTPS. The server connects to it directly to read its configuration and to finish each sign-in.

Pocket ID

Pocket ID is a self-hosted provider that signs in with passkeys.

  1. In Pocket ID, open OIDC Clients and add a client named Central Logging.
  2. Set the callback URL to https://<host>/auth/oidc/callback.
  3. Copy the client ID and client secret into Central Logging’s settings.
  4. Set OIDC Issuer URL to your Pocket ID address, for example https://id.example.com.

To allow a group instead of one email, create a user group in Pocket ID, add the people who may sign in, and set OIDC Allowed Group to the group’s name as it appears in the groups claim.

GitLab

Works with GitLab.com and self-managed GitLab.

  1. In GitLab, open your avatar menu, then Edit profile → Applications → Add new application.
  2. Set the redirect URI to https://<host>/auth/oidc/callback, check Confidential, and select the openid, profile and email scopes.
  3. Copy the application ID and secret into OIDC Client ID and OIDC Client Secret.
  4. Set OIDC Issuer URL to https://gitlab.com, or the URL of your GitLab server.

Leave OIDC Allowed Group blank. GitLab does not put group membership in the ID token claim that Central Logging reads.

Google

  1. In the Google Cloud console, open APIs & Services → OAuth consent screen. Choose External. While the app is in testing mode, add your Google address as a test user.
  2. Open Credentials → Create credentials → OAuth client ID and choose Web application.
  3. Add https://<host>/auth/oidc/callback as an authorized redirect URI.
  4. Copy the client ID and secret into Central Logging’s settings, and set OIDC Issuer URL to https://accounts.google.com.

Leave OIDC Allowed Group blank. Google rejects the groups scope.

GitHub

GitHub is not supported. Its sign-in is plain OAuth 2.0 without OpenID Connect, so it does not issue the ID token that Central Logging verifies.

Troubleshooting

A failed sign-in shows Single sign-on failed on the login page. The reason is in the server log, on a line starting with oidc login failed: (for the systemd service, run journalctl -u centrallogging).

  • provider returned an error — The provider refused the request. The most common cause is a callback URL that does not exactly match https://<host>/auth/oidc/callback. The log line includes the provider’s error message.
  • state mismatch or expired — Start again from the login page, and finish the sign-in in the same browser. Each sign-in can be used once.
  • code exchange failed — Usually a wrong client secret.
  • identity not allowed — The provider signed the person in, but they did not pass the check in Who can sign in. The log line shows the email and whether the provider marked it verified. If email_verified=false for an address you expect to work, verify the email with the provider, or use an allowed group.

Could not reach the sign-in provider means the Central Logging server could not load <issuer URL>/.well-known/openid-configuration. Check the issuer URL, and that the server can reach the provider.

To turn single sign-on off, clear OIDC Issuer URL.

💌 Get notified on new features and updates

Only sent when a new version is released. Nothing else.