SSO with your own login and Permissions (combo C)
You run permissions-service only and keep your login provider: Okta, Microsoft Entra ID, Auth0, WorkOS or Google. People sign in there. Permissions verifies the provider's tokens and decides access from the company's SCIM directory and the group mappings you approve. Read Enterprise SSO for the shared concepts, and Keep your existing sign-in for using Permissions with an external provider.
Pre-release; names are provisional until the SSO naming review; pricing is not decided. See the status note in Enterprise SSO.
In C, SaaSLayer never sees a sign-in. Sessions, MFA, session length and sign-out are your provider's. SaaSLayer
verifies each token, keeps a SCIM directory per company, and grants and withdraws access. Every route below is the
Permissions API, called by a platform (deployment-scope) administrator. There is no saaslayer CLI command for issuer
grants or SCIM directories yet.
1. Trust the company's issuer for one org: an issuer grant with an adapter
An issuer grant connects one issuer (and the app client ids it issues tokens to) to one org. The adapter pins how that provider's tokens are read:
- Token type. An ID-token grant never accepts an access token.
- Principal claim. Okta ID tokens use
sub(Okta access tokens useuid); Entra usesoid; Auth0, WorkOS and Google usesub. - Tenant. Entra's
tidmust be the GUID in the issuer; Google's signedhdmust equalproviderTenant; WorkOS'sorg_idcan be pinned. - Group authority.
token,scimornone.
POST /issuer-grants
Content-Type: application/json{
"issuer": "https://acme.okta.com/oauth2/default",
"orgId": "org_acme",
"audience": ["0oa1exampleclientid"],
"adapter": { "provider": "okta", "tokenType": "id", "groups": { "authority": "scim" } }
}Which group authority each provider can have:
| Provider | groups.authority: token | scim | Notes |
|---|---|---|---|
| Okta, custom authorization server, ID tokens | allowed: groups are ordered by the token's iat (tested end to end with Okta's custom server) | allowed | The org authorization server and access tokens can't use token. An aud naming the Okta org is refused (FOREIGN_TOKEN_OKTA_ORG_AUDIENCE). |
| Entra ID | refused (FOREIGN_ADAPTER_FRESHNESS_INSUFFICIENT) | allowed | providerTenant = the tenant GUID. Preview: not yet tested end to end. |
| Auth0, WorkOS | refused | allowed only with a trusted upstream directory id: directoryId: { "claim": "<claim>" } or { "association": "server" } | The broker's own sub, an email or a UPN is never a directory id. |
| refused | not available (no directory sync) | providerTenant = the Workspace domain (hd). No group-derived access. |
- Token authority (Okta only). Each verified token's groups are recorded for its person. A newer token replaces an
older one, an older token never wins, and two tokens with the same
iatand different groups are refused. - Incomplete groups. A missing, oversized or overage groups claim counts as incomplete: it withdraws group-derived access and never falls back to a default grant.
- First token. The person's principal is created at their first verified token whose groups grant a role.
- Switching to
nonewithdraws what token groups granted. - Revoking the grant (
POST /issuer-grants/revoke) withdraws the grant's whole group source.
2. A SCIM directory per company
For a grant whose adapter has groups.authority: scim:
POST /scim-directories
Content-Type: application/json{ "issuer": "https://acme.okta.com/oauth2/default", "orgId": "org_acme" }The answer gives the directory id (conn_…) and scimBaseUrl (<permissions API base>/scim/v2/<directory id>). Issue
the bearer token for the identity provider with POST /scim-directories/{connectionId}/credentials. The token is in that
response only; …/credentials/{credentialId}/rotate and …/revoke sit beside it.
externalId must be the provider's immutable directory id:
- Okta: the Okta user id. It is also the token subject, so the person is linked at once.
- Entra: the object id, scoped by its tenant. Entra's default
mailNicknamemapping is wrong: change it first. - Auth0 or WorkOS: the upstream id from the configured claim. With
{ "association": "server" }, link a broker subject explicitly withPOST /scim-directories/{connectionId}/associations{ "externalId", "subject" }.
Emails and user names are refused as ids. Group members resolve only through SCIM user ids. Status: Supported (preview) with Okta's and Entra's own SCIM clients (see Provider setup).
3. Map groups to orgs and roles
Mappings work as in combo A, with the issuer grant as the source: issuer:<first 32 hex characters of sha256(issuer)>.<orgId>
(URL-encoded in the path).
- The deployment owner sets the ceiling:
PUT /sso-group-mappings/{source}/orgs/{orgId}/ceiling, withallowedOrgIdsandapprovedRoles. - The tenant's admin sets the rules:
PUT /sso-group-mappings/{source}/orgs/{orgId}/rules, withrulesanddefaultGrant. - Read both:
GET /sso-group-mappings/{source}/orgs/{orgId}.
printf '%s' 'https://acme.okta.com/oauth2/default' | shasum -a 256 | cut -c1-32 # → the source's hash4. Check permissions through the Permissions API
Combo C decisions must go through permissions-service: the Permissions API, its API Gateway authorizer, or
@saaslayer/permissions/server in HTTP mode. This is the current-state integration that gives you an immediate cutoff:
- Deactivated in the org. A person SCIM deactivated (
active:false) or deleted is refused in that org at the next verification (IDENTITY_LINK_INACTIVE). If every directory holding them deactivated them, they are refused everywhere. Their memberships, roles and org API keys from this source are withdrawn. Manual grants and other sources stay. - Direct mode isn't supported in C. It verifies only SaaSLayer user pools and doesn't read the C directory state. An app that decides locally would not see a deactivation.
- Authorizer caching: set the API Gateway authorizer's result cache TTL to 0, or a cached Allow outlives the removal.
What SaaSLayer can't do in C
- Provider sessions continue. SaaSLayer never ends the person's session at your provider, or their access to other apps. A SCIM deactivation stops what Permissions grants; the provider's own tokens stay valid at the provider until they expire.
- No SCIM, no deprovisioning signal. A person disabled only at the provider keeps their access until their provider token expires (often an hour). With token authority, a group removal applies when their next, newer token arrives.
- No SSO session controls. The connection settings of combos A and B do not exist in C: session cap, token TTL, delegated MFA, domain enforcement, break-glass, setup links, the hosted pages and dashboard tiles. Your provider's policies govern sign-in.