Skip to main content

Single sign-on

Route/admin/dashboard/settings
Legacy screen
This surface predates the Hive redesign; it is scheduled under #5272.

Single sign-on lets the people of one company sign in to Apiome with their work account, through that company's own identity provider (IdP) — Okta, Microsoft Entra ID, Google Workspace, Keycloak, Auth0 or any other that speaks SAML 2.0 or OpenID Connect (OIDC). You connect the IdP once, give it the email domains the company owns, and from then on anyone with an address at those domains can choose “Sign in with SSO” on the sign-in page.

A workspace's owners and admins set it up for their own workspace, and prove each domain with a DNS record, on Workspace → Single sign-on. This page is the installation administrator's view of the same providers, for every workspace: sign in to the admin console, choose System settings in the sidebar and find the Single sign-on card.

System settings: the Single sign-on card with Northwind Okta (OIDC, Live, northwind.io verified) and Contoso Entra ID (SAML 2.0, needs a verified domain)System settings: the Single sign-on card with Northwind Okta (OIDC, Live, northwind.io verified) and Contoso Entra ID (SAML 2.0, needs a verified domain)
Route/admin/dashboard/settings

SAML or OIDC?​

Use whichever your IdP offers — most offer both.

OIDCSAML 2.0
You give ApiomeThe issuer URL, a client ID and a client secretThe IdP's metadata URL, or its metadata XML pasted in
You give the IdPThe Redirect URI Apiome showsThe ACS URL and the SP entity ID Apiome shows
Where the email comes fromThe ID token's email — the IdP must mark it verifiedThe NameID, or an attribute you name

The client secret, and a SAML signing key if you add one, are stored encrypted and never shown again.

Connect an identity provider​

  1. Click “Add identity provider” on the Single sign-on card.

  2. Choose OIDC or SAML 2.0, and give it a Name (for example Northwind Okta). The ID fills in from the name; it appears in sign-in URLs and in the audit trail as sso:<id>.

  3. Enter the Workspace ID the IdP's people belong to. It is required: people who sign in through the provider for the first time become members of that workspace.

  4. For OIDC, enter the Issuer URL (for example https://northwind.okta.com), the Client ID and the Client secret from the app you registered at the IdP. Apiome reads the issuer's discovery document and checks it before saving.

    For SAML 2.0, enter the IdP metadata URL or paste the IdP metadata XML, then choose where the email address comes from: The NameID (when the IdP sends the email as NameID) or An attribute and its name (for example email).

  5. Click “Add provider”. The provider is added disabled.

  6. Copy the values the card now shows into your IdP's app settings: the Redirect URI for OIDC, or the ACS URL (reply URL) and SP entity ID (audience) for SAML.

Apiome refuses an IdP it could never sign anyone in through, and says why — for example “The IdP offers single sign-on only over HTTP-Artifact” (Apiome sends sign-in requests over HTTP-Redirect), or a discovery document that names a different issuer.

Add the company's email domains​

  1. In the provider's row, type a domain in the domain box — for example northwind.io — and click “Add domain”.
  2. Click “Mark verified” once you have confirmed the company owns the domain.

Only verified domains are used for sign-in, and a verified domain belongs to only one identity provider on the installation: adding or verifying a domain another provider has verified is refused. A domain that is listed but not verified reserves nothing.

“Mark verified” takes your word for it. A workspace's owners verify a domain by DNS record instead, on Workspace → Single sign-on.

:::caution Verify only domains the company owns An identity provider signs in anyone at its verified domains. Marking a domain you have not confirmed would let that IdP sign in people at a company it does not represent. :::

Turn it on​

Click “Enable”. The provider shows Live once it is enabled and has at least one verified domain — from the next sign-in, people at those domains can use “Sign in with SSO”, and the sign-in form offers them “Continue with SSO” as soon as they type their work email. Needs a verified domain means it is enabled but nothing routes to it yet. “Disable” stops new sign-ins through it at once; “Remove…” deletes it, with its secrets.

What happens when someone signs in​

Apiome applies the same rules to a single sign-on as to any other sign-in:

  • Only verified domains. An IdP can sign in only addresses at its own verified domains. An address anywhere else is refused, whatever the IdP says.
  • A verified email. For OIDC, the IdP must mark the email verified in the ID token; an unverified email is refused, never linked to an account.
  • One email, one account. If an Apiome account with that email already exists, single sign-on is added to it, and the person keeps everything they had. A first-time person gets an account, under your sign-up policy, without being asked to create a workspace.
  • Straight into the provider's workspace. Everyone who signs in through a provider becomes a member of its workspace, with the provider's default role, the first time. Existing members keep their role. When the workspace has no seat left the person signs in but is not added. See Who becomes a member.
  • Disabled and suspended accounts stay out, and an account with two-factor authentication still asks for its code.
  • Every attempt is recorded in the sign-in audit trail as sso:<id>, and so is every change on this card.

Each sign-in must answer a request Apiome sent, within five minutes; a SAML response can be used once, must be signed, and must carry valid timestamps. A sign-in started from the IdP's own dashboard (IdP-initiated) is refused — start from Apiome's sign-in page.

When sign-in fails​

The sign-in page explains each refusal. The codes appear in the address bar and the audit trail:

CodeWhat it meansWhat to do
sso-provider-not-foundNo live provider covers the email's domainCheck the domain is added, verified and the provider enabled
sso-email-domain-mismatchThe IdP returned an email outside the provider's domainsCheck the IdP sends the work email, or add the domain
unverified-emailThe OIDC IdP did not mark the email verifiedVerify the email in the IdP
sso-token-invalidApiome could not verify the OIDC ID tokenCheck the client ID and the issuer
sso-assertion-invalidApiome could not verify the SAML responseCheck the ACS URL, SP entity ID and the IdP's signing certificate
sso-assertion-replayedThe SAML response was used beforeStart again from the sign-in page
sso-state-invalidThe sign-in took too long or was started elsewhereStart again from the sign-in page
sso-binding-unsupportedThe IdP answered over HTTP-ArtifactHave the IdP send responses over HTTP-POST
sso-discovery-failedApiome could not read the OIDC discovery documentCheck the issuer is reachable
sso-account-not-linkedAn account with the email exists but could not be linkedAsk the person to sign in another way
sso-provisioning-failedThe sign-in was good, but Apiome could not add the person to the workspace just thenAsk them to try again; check apiome-rest is reachable from apiome-ui

When you add or change a provider, the card can also refuse with:

CodeWhat it meansWhat to do
sso-tenant-requiredThe provider has no Workspace IDEnter the workspace's ID
sso-tenant-not-foundNo workspace has that IDCopy the ID from Tenants in the admin console

Providers added before workspaces were required​

Earlier versions let you add a provider with no workspace. Upgrading disables each of those providers — nobody can sign in through them — and keeps their settings, domains and secrets. To use one again, give it a workspace through the REST API (PATCH /v1/admin/sso/providers/{id} with tenant_id), then click “Enable”. Until it has a workspace, no other change to it is accepted.

For operators​

  • The card needs AUTH_CONFIG_ENC_KEY set (the same key that seals sign-in provider secrets) and INTERNAL_SERVICE_TOKEN shared between apiome-ui and apiome-rest; without the token, no single sign-on is offered.
  • Apiome fetches discovery documents and metadata only from public https:// addresses. To test against an IdP on your own network, set APIOME_SSRF_ALLOW_PRIVATE=true on apiome-rest — never in production.
  • The same operations are available over the REST API: /v1/admin/sso/providers.
  • Workspace owners manage their own providers at /v1/tenants/{tenant}/sso/providers; see Workspace → Single sign-on.