FarWatch 1.3.1 is availableRead the upgrade notes

Okta

Sign in through Okta with OpenID Connect or SAML 2.0, link Okta groups to FarWatch groups, and sync membership with the Management API.

What it does

FarWatch signs users in through Okta. The interface presents Okta as the provider. Underneath, each provider uses OpenID Connect, which is the recommended protocol, or SAML 2.0. You choose the protocol once, when you create the provider, and it is fixed afterwards.

Providers are managed under Global Settings > Users & Access > Identity providers, beside the Active Directory connection. Local accounts and Active Directory keep working beside them.

How access works

A provider never grants access by itself. Access comes from linked groups, the same rule as for Active Directory.

  1. An administrator links an Okta group to a FarWatch group. In Users & Access > Groups, choose New group and pick the provider as the source. The FarWatch group carries the platform grants. See Roles and grants.
  2. At sign-in, FarWatch reads the groups Okta sends and matches them to linked groups by name, ignoring case, or by Okta group id when the Management API sync supplied one.
  3. If nothing matches and the user is not pinned, sign-in is refused with "Your account is not in any group that has access to this dashboard." No user record is created.
  4. Users an administrator adds, from Users & Access > Users > Create user with the provider as the source, are pinned. A pinned user signs in with no group match and is never deactivated by the sync.

FarWatch never links an Okta sign-in to an existing local or Active Directory account. If the user name is taken by another identity, the new user is stored as <username>#<provider slug>.

The URLs to paste into Okta

Set the FarWatch address first. The provider drawer builds the URLs from the base URL saved under Global Settings > Intelligence > Agent notifications. If it is blank, the drawer warns that the URLs come from the browser's host, which is wrong behind a reverse proxy.

PurposePath
OpenID Connect sign-in redirect URI<base>/api/auth/sso/<slug>/callback
SAML ACS URL<base>/api/auth/sso/<slug>/acs
SAML service provider metadata<base>/api/auth/sso/<slug>/metadata
Start a sign-in<base>/api/auth/sso/<slug>/start?returnTo=/

On a multi-tenant install the paths read /api/t/<tenant>/auth/sso/...

Okta OpenID Connect app

  1. In Okta Admin, choose Applications > Create App Integration > OIDC, Web Application.
  2. Set the sign-in redirect URI to the value in the drawer. Leave the sign-out redirect blank. Assign the groups that should sign in.
  3. On the Sign On tab, under OpenID Connect ID Token, set the groups claim filter to groups, Matches regex, .*. Okta sends at most 100 groups in a token. The Management API sync covers the rest.
  4. In FarWatch, add an OIDC provider. The Issuer URL is the Okta org, for example https://example.okta.com, or a custom authorization server URL. Client ID and Client secret come from the Okta app. Press Save and test, then switch Enabled on.

Defaults: the scopes are openid profile email groups, and the claims are sub for the subject, email, name and groups. FarWatch uses the authorization code flow with PKCE and accepts RS256 ID tokens only.

Okta SAML app

  1. In Okta Admin, choose Applications > Create App Integration > SAML 2.0.
  2. Set the single sign-on URL to the ACS URL from the drawer. Set the Audience URI (SP Entity ID) to the value from the drawer. Set the Name ID format to EmailAddress and the application user name to the Okta user name.
  3. Add a group attribute statement named groups with filter Matches regex .*.
  4. Copy the app's Identity Provider metadata URL into IdP metadata URL in FarWatch and press Import. That fills the entity ID, the sign-on URL and the certificate. Press Save and test, then switch Enabled on.

Defaults: the subject attribute is nameid, and email and groups are read from attributes of the same names. Assertions must be signed unless you turn that off. IdP-initiated sign-in is refused unless Allow IdP-initiated sign-in is on, and it lands on the home page.

Management API

The Management API lets FarWatch search Okta groups and users when you add them, resolve group ids, and sync membership on a schedule.

  1. In Okta Admin, choose Security > API > Tokens > Create token. Use an account that can read users and groups. Okta expires a token after 30 days without use. The sync interval keeps it alive, but if the sync stays off for a month the token must be replaced.
  2. In FarWatch, set Management API kind to Okta, set Base URL to the Okta org, paste the token, choose the sync interval (5 to 1440 minutes), and decide whether to deactivate removed users.
  3. Sync now runs one pass and the table below the button lists the last ten runs. A failing sync raises an "IdP sync failed" alert.

Without a token, the pickers become plain text inputs. Type the group name exactly as in Okta, or the user's email address.

Secrets

The client secret, the Management API token and the service provider signing key are stored encrypted and are never returned by the API. A field shows "saved" when a value exists. Leave it blank to keep it, type to replace it, or use Clear. Changing the issuer clears the saved client secret, and changing the Management API base URL clears the saved token, so a stored secret only goes to the address it was saved for.

Sign-in error codes

The login page shows these when the server redirects back with ?error=<code>.

CodeText shownUsual cause
sso_providerThat sign-in option is not available.Slug unknown or provider disabled.
sso_stateThe sign-in attempt expired. Try again.More than 10 minutes between start and return, or a reused link.
sso_tokenThe identity provider's answer could not be verified.Token request refused: wrong client secret or redirect URI.
sso_idtokenSame as above.The ID token failed signature, issuer, audience or nonce checks.
sso_signatureSame as above.SAML signature invalid: a stale certificate in FarWatch.
sso_assertionSame as above.The SAML assertion failed validation, such as audience or time window.
sso_no_accessYour account is not in any group that has access to this dashboard.No linked group matches and the user is not pinned.
sso_inactiveYour account is disabled.The user is inactive in FarWatch or in Okta.
sso_jit_disabledYour account has not been added to this dashboard yet.Creating users on first sign-in is off.
sso_unavailableThe identity provider is unreachable.Network or DNS from FarWatch to the provider.
sso_replayThat sign-in response was already used.The same SAML response was submitted twice.

Each failure is logged as [sso] <slug> <code>: <detail> and recorded in the audit log as login.failed.

Troubleshooting

  • Save and test fails on discovery: the Issuer URL must match the issuer in <issuer>/.well-known/openid-configuration exactly, apart from a trailing slash.
  • Signed in but no access: the groups claim is missing or the name differs. Check Okta's groups claim filter and compare the linked group name with the Okta group name.
  • More than 100 groups: Okta truncates the claim. Turn on the Management API and link groups through the picker so the sync supplies membership.
  • Redirect URI mismatch at Okta: the URL came from the browser host. Set the base URL and copy the URLs again.
  • The Enabled switch is greyed out: run Save and test and get a clean result first.
  • A deleted provider removes its linked groups and their grants. Users stay and lose access until another source supplies it.

Okta sign-in has been tested against a developer tenant. This page does not cover other identity providers.