Skip to content

Single sign-on and API tokens

FireHawk signs users in through any OpenID Connect provider: Microsoft Entra ID, Okta, Keycloak, Google Workspace, Authentik and others. It uses the authorization code flow with PKCE and always verifies the ID token against the provider’s signing keys.

Users are created at their first login. Their identity-provider groups are mapped to FireHawk user groups, re-synced at every login, so their rights come from the grants of those groups.

Single sign-on is configured under Users & access → Single sign-on by an admin (a FireHawk admin when workspaces are in use).

In Sign-in options, set FireHawk public URL to the address users open, for example https://firehawk.example.com. It is used for the redirect URI and in notification links.

Create an application (OIDC client, “web” type) at your provider with this redirect URI:

{public URL}/api/auth/oidc/callback

For example https://firehawk.example.com/api/auth/oidc/callback. The settings page shows the exact URI under Register this redirect URI with the provider: with a Copy button. Configure the provider to include group claims in the ID token or userinfo if you want group mapping.

In the OpenID Connect provider card:

Field Notes
Enable single sign-on Shows the sign-in button on the login page.
Issuer URL For example https://login.microsoftonline.com/<tenant-id>/v2.0. Must use https unless the issuer is on a private address.
Button label Text of the login button, for example Microsoft.
Client ID From the provider.
Client secret From the provider; leave empty for a public client with PKCE. When editing, empty keeps the stored one.
Scopes Default openid email profile.
Groups claim Default groups.
Email claim Default email.
Allowed email domains (optional) For example example.com, example.org; other domains are refused.

Click Test provider to check that FireHawk can fetch the provider’s discovery document and signing keys. It reports the number of signing keys and the authorization endpoint found.

In Access from identity-provider groups:

  1. Click Add mapping.
  2. Enter the Provider group (name or ID) (Entra ID sends group object IDs) and pick the FireHawk user group.
  3. Optionally list Provider groups that make a user an administrator (one per line).
  4. Refuse users in no mapped group (on by default) refuses users that match no mapping and are not admins.

At every login, membership of the mapped FireHawk user groups is synced from the provider. Memberships of unmapped user groups are left alone. A mapped user group also makes the user a member of its workspace.

  • A user is recognised by the provider’s issuer and subject. On the first SSO login, an existing local account with the same e-mail is linked, unless the provider says the e-mail is unverified. An e-mail already linked to another identity is refused.
  • Administrator groups only set the role of users created by single sign-on. A linked local admin is never demoted by the provider.

In Sign-in options, untick Allow password sign-in for everyone. Only administrators can then still use their password, as break-glass access, through Administrator sign-in with a password on the login page. This option requires single sign-on to be enabled.

Click Save single sign-on settings. SSO logins and refusals are recorded in the audit log (auth.login, auth.sso_refused).

API tokens let scripts and CI/CD pipelines call the FireHawk API as you, with your rights.

  1. Open API tokens in the sidebar.
  2. In New token, enter a Name (for example gitlab-ci).
  3. Access: Full (my rights) or Read-only (GET requests).
  4. Expires after: 7, 30, 90, 180 or 365 days.
  5. Click Create token and copy it.

Send it as a bearer token:

Terminal window
curl -H "Authorization: Bearer $TOKEN" https://firehawk.example.com/api/hosts

Tokens start with fhp_. The list shows each token’s prefix, access, expiry, last use and the IP it was used from.

  • A token acts as its owner: the same access checks apply, and it only sees the workspace it was created in.
  • Read-only tokens can only make GET (and HEAD, OPTIONS) requests.
  • Tokens cannot create other tokens or change passwords.
  • Disabling a user stops their tokens; deleting a user deletes them.

Click Revoke on the token. Anything using it stops working at once. Admins see every user’s tokens in the API tokens tab of Users & access and can revoke them.

See the API reference for the endpoints.