Single sign-on and API tokens
Single sign-on (OpenID Connect)
Section titled “Single sign-on (OpenID Connect)”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).
Public URL
Section titled “Public URL”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.
Register FireHawk at the provider
Section titled “Register FireHawk at the provider”Create an application (OIDC client, “web” type) at your provider with this redirect URI:
{public URL}/api/auth/oidc/callbackFor 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.
Configure the provider in FireHawk
Section titled “Configure the provider in FireHawk”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.
Map identity-provider groups
Section titled “Map identity-provider groups”In Access from identity-provider groups:
- Click Add mapping.
- Enter the Provider group (name or ID) (Entra ID sends group object IDs) and pick the FireHawk user group.
- Optionally list Provider groups that make a user an administrator (one per line).
- 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.
Linking and administrator rights
Section titled “Linking and administrator rights”- 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.
Turn off password sign-in
Section titled “Turn off password sign-in”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).
Personal API tokens
Section titled “Personal API tokens”API tokens let scripts and CI/CD pipelines call the FireHawk API as you, with your rights.
Create a token
Section titled “Create a token”- Open API tokens in the sidebar.
- In New token, enter a Name (for example
gitlab-ci). - Access: Full (my rights) or Read-only (GET requests).
- Expires after: 7, 30, 90, 180 or 365 days.
- Click Create token and copy it.
Use a token
Section titled “Use a token”Send it as a bearer token:
curl -H "Authorization: Bearer $TOKEN" https://firehawk.example.com/api/hostsTokens 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.
Revoke a token
Section titled “Revoke a token”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.
