For AI agents: the documentation index is at /docs/interbox/llms.txt. A Markdown version of this page is available at /docs/interbox/secure/sign-in-providers.md or by requesting it with the Accept: text/markdown header.
Interbox Docs

Sign-in provider examples

Each example below sets up the built-in sign-in against one identity provider. Securing dashboard access explains every setting they use.

Worked example: Google

In the Google Cloud console, under Google Auth Platform → Clients, choose Create client, pick the application type Web application and add one authorised redirect URI:

https://interbox.internal.example/api/auth/callback

Then set:

INTERBOX_PUBLIC_URL=https://interbox.internal.example
INTERBOX_AUTH_ISSUER=https://accounts.google.com
INTERBOX_AUTH_CLIENT_ID=<client id>.apps.googleusercontent.com
INTERBOX_AUTH_CLIENT_SECRET=<client secret>
INTERBOX_AUTH_ALLOWED_DOMAINS=example.com
INTERBOX_AUTH_REQUIRED_CLAIMS={"hd":"example.com"}
INTERBOX_AUTH_ADMIN_ENABLED=false

The secret is required here: a Google Web application client is confidential and its token endpoint expects one.

The allow-rule is the whole access control. Google makes that obvious, because without a rule every Google account on earth is an account on this instance, which is why Interbox parks the dashboard. Setting INTERBOX_AUTH_ALLOWED_DOMAINS to a domain you own is the control. Setting it to gmail.com restricts nothing.

For a Workspace domain, also add INTERBOX_AUTH_REQUIRED_CLAIMS={"hd":"example.com"}. hd is the hosted-domain claim Google puts in the token for a Workspace account, so pinning it keeps out a personal account that only has an address at your domain. The claim narrows, and the domain rule still admits.

Google marks email_verified, which Interbox requires for any email or domain rule, so this configuration works as written.

Worked example: Aidbox

Aidbox is an OpenID Connect provider in its own right, so an Aidbox you already run can sign people in, with no third-party IdP and no extra component. This walkthrough was verified end to end against a licensed Aidbox.

1. Find the issuer. It is whatever Aidbox publishes about itself, and Interbox compares it byte for byte:

curl -s https://aidbox.example.com/.well-known/openid-configuration | jq -r .issuer

Copy that value exactly. Interbox fetches this document server-side, so the issuer must be an address the Interbox process itself can reach. An address that only the browser can reach is not enough.

2. Register a client in Aidbox. Use the REST API, or the Aidbox console, which edits the same resource:

PUT /Client/interbox-dashboard
{
  "resourceType": "Client",
  "id": "interbox-dashboard",
  "secret": "<generate one: openssl rand -base64 24>",
  "first_party": true,
  "grant_types": ["authorization_code"],
  "auth": {
    "authorization_code": {
      "redirect_uri": "https://interbox.internal.example/api/auth/callback",
      "token_format": "jwt",
      "access_token_expiration": 3600,
      "refresh_token": false
    }
  }
}
fieldwhy
grant_types: ["authorization_code"]the only flow Interbox uses
auth.authorization_code.redirect_urimust equal <INTERBOX_PUBLIC_URL>/api/auth/callback exactly
secretInterbox sends it as HTTP Basic at the token endpoint
first_party: trueskips Aidbox's consent screen. Without it, every sign-in stops on a "do you allow this application" page
refresh_token: falseInterbox never asks for one and never stores provider tokens

3. Make sure the people signing in exist as Aidbox User resources. Interbox admits on the User id, so note it:

PUT /User/alice
{ "resourceType": "User", "id": "alice", "email": "alice@example.com", "password": "..." }

4. Configure Interbox:

INTERBOX_PUBLIC_URL=https://interbox.internal.example
INTERBOX_AUTH_ISSUER=https://aidbox.example.com      # exactly what step 1 printed
INTERBOX_AUTH_CLIENT_ID=interbox-dashboard
INTERBOX_AUTH_CLIENT_SECRET=<the secret from step 2>
INTERBOX_AUTH_ALLOWED_SUBJECTS=alice,bob             # Aidbox User ids
INTERBOX_AUTH_ADMIN_ENABLED=false

Worked example: Microsoft Entra ID

1. Register the application. In the Entra admin centre, go to Identity → Applications → App registrations → New registration. Give it a name, choose Accounts in this organizational directory only, and under Redirect URI pick platform Web with:

https://interbox.internal.example/api/auth/callback

You can do the same from the command line:

az ad app create \
  --display-name "Interbox dashboard" \
  --sign-in-audience AzureADMyOrg \
  --web-redirect-uris "https://interbox.internal.example/api/auth/callback"
az ad sp create --id <application (client) id>

The portal's New registration creates both the application and its service principal. az ad app create creates only the application, which is why the second command is there.

2. Add a client secret. Use Certificates & secrets → New client secret, or az ad app credential reset --id <app id>. Copy the secret at once, because Entra shows it only once.

3. Find the object id of each person who may sign in. In the portal, open Identity → Users → the person → Object ID. For your own, run az ad signed-in-user show --query id -o tsv. You allow-list the object id, and step 5 explains why you do not use the email address.

4. Configure Interbox:

INTERBOX_PUBLIC_URL=https://interbox.internal.example
INTERBOX_AUTH_ISSUER=https://login.microsoftonline.com/<tenant id>/v2.0
INTERBOX_AUTH_CLIENT_ID=<application (client) id>
INTERBOX_AUTH_CLIENT_SECRET=<the secret from step 2>
INTERBOX_AUTH_ALLOWED_SUBJECTS=<object id>,<object id>
INTERBOX_AUTH_ADMIN_ENABLED=false

The sign-in button reads Sign in with Microsoft without further configuration. The name comes from the issuer host, and the Entra hosts are known ones. That covers the commercial cloud, US Government, the operator in China, and B2C and External ID tenants on .b2clogin.com and .ciamlogin.com.

5. Two things about Entra specifically.

Use your tenant id in the issuer, never common or organizations. Those multi-tenant endpoints publish a discovery document whose issuer is the literal string https://login.microsoftonline.com/{tenantid}/v2.0, which is a template and not an issuer. Interbox compares the advertised issuer with the configured one byte for byte, so it refuses with "the discovery document names a different issuer". That refusal protects you. An issuer that matched every tenant would let an account in any Entra tenant anywhere sign in to your dashboard, which is a real attack. If you do want more than one tenant, name each one and run the check per tenant. Do not delegate the question to Microsoft.

Allow-list object ids, not email addresses. Entra does not send email_verified, and Interbox requires that boolean before it trusts an address, so INTERBOX_AUTH_ALLOWED_EMAILS and _ALLOWED_DOMAINS refuse everyone against Entra. Entra's email claim can also carry an unverified otherMails entry, which is why Interbox requires the boolean. Interbox matches a subject rule against both the token's sub and its oid. The sub is unique per application and appears nowhere in the portal, while the oid is the object id the portal shows you, so allow-listing what you read off the screen works.

One consequence to know before you rely on it: the session and the audit log record sub, so if you allow-list an oid, the audited value is not the string you configured. It is the same person with a different identifier.

6. Admitting people by group. Entra can carry group membership in the token, and Interbox matches on it. A new registration, however, issues no group claim by default, so a group rule admits nobody. Turn the claim on with Token configuration → Add groups claim → Security groups, or:

az rest --method patch \
  --url "https://graph.microsoft.com/v1.0/applications/<app OBJECT id>" \
  --body '{"groupMembershipClaims":"SecurityGroup"}'

That URL takes the application's object id, not its application (client) id. az ad app show --id <client id> --query id -o tsv prints it.

Entra puts group object ids in the token, not display names. Measured against a live tenant: with the claim enabled, a member of one group receives "groups": ["<guid>", "<guid>"]. Write the rule with ids:

INTERBOX_AUTH_ALLOWED_GROUPS=11111111-2222-3333-4444-555555555555

Read the id from Identity → Groups → the group → Object ID, or run az ad group show --group "<display name>" --query id -o tsv. A display name in that variable never matches anything.

This settles the warning in Securing dashboard access for Entra. The caution about group rules concerns providers that emit a name the person signing in might be able to influence. The directory assigns an Entra object id, and a member cannot choose it.

Watch for one failure mode. It is Microsoft's documented behaviour and was not measured here. Past roughly two hundred group memberships, Entra stops sending groups and sends _claim_names and _claim_sources instead, which point at Graph. Interbox has no group array to match, so it refuses. It fails closed, which is the right direction, but it looks exactly like a broken configuration. If some people can sign in and others cannot, count their groups before you re-read your config.

Use _SUBJECTS, not _EMAILS or _DOMAINS

Aidbox's id_token carries sub, iss, aud, iat, exp, jti, nonce and email, but not email_verified, and Interbox requires that boolean before it trusts an address. An email or domain rule against Aidbox therefore admits nobody, and the refusal looks like a rejected account and not a configuration mistake. Match on the subject, which is the Aidbox User id.

To add a person, create their User in Aidbox, add the id to INTERBOX_AUTH_ALLOWED_SUBJECTS, and restart. To remove one, do the reverse. revoke-all ends any session they already hold.

When Aidbox itself signs people in with Google, Okta or Entra

Aidbox can delegate to an external provider of its own through an IdentityProvider resource, which puts an extra button on the Aidbox login page. That changes nothing about how you configure Interbox:

Interbox  →  Aidbox  →  Google (or Okta, Entra, another Aidbox…)
          ↑ the issuer         ↑ Aidbox's business, invisible to Interbox

Interbox's issuer stays Aidbox. It never learns which upstream provider authenticated anyone, never sees those credentials, and needs no configuration for them. INTERBOX_AUTH_ISSUER, _CLIENT_ID and _CLIENT_SECRET are exactly as above. You register the external provider in Aidbox, not in Interbox. Its redirect URI is <your aidbox>/auth/callback/<IdentityProvider id>.

What does change is the subject. A person who signs in through an external provider gets an Aidbox User whose id is a UUID. It is neither their email nor a name you chose:

INTERBOX_AUTH_ALLOWED_SUBJECTS=a0ffc845-77f9-4ae5-af8b-cd6a4f04d18a,7c1e...

That is the sub Aidbox puts in the id_token. Interbox matches a subject rule against the token's sub and against oid, because Microsoft Entra identifies a directory object by oid, and an operator reading it out of the Entra portal would otherwise have nothing that works. Aidbox issues no oid, so against Aidbox the rule matches sub only.

The audit line and the session record the token's sub either way. If you allow-list an Entra oid, you will not see that value in any log. Match on sub if you want the log to name the rule that admitted someone.

Two more consequences to plan for:

  • The subject only exists after the person has signed in once. The first attempt is meant to fail. Let them sign in, watch Interbox refuse it, and read the subject out of the audit line:

    {"audit":"sign-in-refused","method":"oidc","issuer":"https://aidbox.example.com",
     "subject":"a0ffc845-77f9-4ae5-af8b-cd6a4f04d18a","reason":"not admitted"}
    

    Add that value to INTERBOX_AUTH_ALLOWED_SUBJECTS, restart, and they are in. A 403 saying "this account may not use this instance" is this step and not a broken configuration. It means authentication worked and no rule matched.

    You can also list the users from Aidbox directly:

    curl -s -u <admin> 'https://aidbox.example.com/User?_elements=id,email' | jq '.entry[].resource'
    
  • Signing in creates the account. Aidbox provisions the User on the person's first successful sign-in through the provider. The User has no password, and Aidbox records an identifier for each upstream system that has vouched for the person. Whether a second route later links to that same User or makes another one is Aidbox's behaviour. Confirm it for your setup before you assume either. If Aidbox makes another User, that is a second subject, and you must list both.

Email and domain rules still do not work here, for the same reason as before: the claim Interbox needs, email_verified, is not in Aidbox's id_token however the person reached it. The upstream provider may verify addresses thoroughly, but that fact does not survive the hop.

Failures particular to Aidbox

what you seewhat it is
Sign-in stops on an Aidbox "do you allow this application" pagethe Client is missing first_party: true
403 "this account may not use this instance" after a successful Aidbox loginthe User id is not in INTERBOX_AUTH_ALLOWED_SUBJECTS, or you used _EMAILS/_DOMAINS, which cannot work here. If they signed in through an external provider, this is expected on the first attempt: take the subject from the audit line
No button for Google (or Okta, Entra) on the Aidbox login pageAidbox has no IdentityProvider for it. That is Aidbox configuration, not Interbox's

When a sign-in fails covers the other failures.

Last updated: