Native SAML service provider
The engine connects directly to the customer's SAML IdP. No broker participates in native authentication. The optional Keycloak administration adapter remains available for broker interoperability fixtures.
The native profile supports SP-initiated Web Browser SSO with Redirect authentication requests and POST responses. It requires a signed assertion, RSA-SHA256 signatures with 2048–8192-bit RSA keys, a trusted metadata issuer, and an administrator-controlled immutable subject attribute. Encrypted assertions, unsolicited login, artifact binding, SimpleSign, and SAML logout are unsupported. The engine remains an OIDC provider for downstream applications.
Configuration
Configure an administration tenant with a customer connection ID and an independent recovery connection.
Omit infrastructure to use native SAML.
The compact configuration uses local accounts for independent recovery.
The customer SSO panel accepts IdP metadata, as XML or as a URL, and its immutable subject attribute.
The stable organization-scoped endpoints are:
https://engine.example/saml/org_example/metadata
https://engine.example/saml/org_example/acsSP metadata can inspect an isolated draft with ?version=cfg_identifier.
An authorized administrator either pastes the metadata XML or gives its URL in metadata_url, not both.
The runtime fetches the URL when the draft is saved and stores the document in the draft.
The URL must be public HTTPS: the runtime refuses private addresses, including DNS answers at connection time, and follows no redirects or proxies.
A fetch times out after 10 seconds and stops at 256 KiB.
It accepts one IdP descriptor with a Redirect SSO endpoint and 1–8 signing certificates.
A certificate outside its validity period is listed with its dates but never verifies a response.
At least one certificate must be valid when the connection is validated, when a login starts, and when the response arrives.
Each XML document is limited to 256 KiB, 20000 nodes, and fewer than 50 nested levels.
DTDs, external entities, duplicate XML IDs, and encrypted elements are rejected.
When IdP metadata requires signed authentication requests, supply both deployment secret references:
administration:
saml_signing_key_env: SAML_SP_SIGNING_KEY
saml_signing_certificate_env: SAML_SP_SIGNING_CERTIFICATEThose environment variables contain the PEM private key and certificate. The private key stays on the engine. Configured signing material does not force a signature policy onto an IdP that does not request it. SP certificates are public metadata; coordinate their rotation with the customer IdP.
Test and activate
Create a draft, validate metadata, complete an independent test login, and activate against the expected active version. A draft test does not create a production membership or replace the administrator's session. Activation requires a fresh successful test and an independently authorized recovery owner. Certificate rollover uses a new tested draft with overlapping valid signing certificates. The old certificate can stay in the metadata after it expires.
With metadata_url, rollovers don't need a new draft.
While the version is active, the runtime fetches the URL every hour and stores the new document when only its signing certificates changed.
Each change is audited as administration.saml.metadata_refreshed.
When the fetched metadata names a different entity ID or sign-in URL, has no valid signing certificate, or can't be fetched, the runtime keeps the current metadata and shows the reason on the Single sign-on page.
A different entity ID or sign-in URL needs a new tested draft.
Logins signed with the current certificate keep working, and the runtime logs a warning for each expired certificate on every login.
The previous configuration remains available for an explicit tested transition or recovery.
The Single sign-on page shows when the active connection's last valid signing certificate expires.
An older certificate in a rollover set doesn't count while a newer one is valid.
The runtime checks every hour and publishes a configuration.certificate_expiring event 90, 60 and 30 days before that date, each once.
Subscribe to it to remind the customer's identity provider admin, who has to send renewed metadata unless the connection uses metadata_url.
New metadata with a later expiry date starts a new set of notices.
The validator checks issuer, audience, destination, recipient, request correlation, bearer confirmation, and time bounds.
It consumes only the validated signed assertion's claims.
The assertion expires within ten minutes, with 60 seconds of clock tolerance.
Force-authentication flows request ForceAuthn and check the signed authentication time.
The supported assurance is federated authentication; no implicit upstream MFA claim is invented.
PostgreSQL stores one-use login and draft flows and assertion replay claims across replicas. The ACS stages its POST in a sealed 60-second record, then redirects through a one-use same-origin finish URL. This preserves trusted-origin account-link cookies under SameSite=Lax without exposing assertions in URLs. The HTTP form limit is 400000 bytes; set the deployment body limit accordingly.
Profile attributes
The runtime reads the person's email address and display name from the assertion and stores them on the user. It looks for these attribute names, in this order, and takes the first one that has exactly one value:
| Field | Attribute names |
|---|---|
email, mail, emailAddress, User.email, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress, urn:oid:0.9.2342.19200300.100.1.3, then a NameID in the emailAddress format |
|
| Display name | displayName, http://schemas.microsoft.com/identity/claims/displayname, urn:oid:2.16.840.1.113730.3.1.241 |
| Given name | givenName, firstName, first_name, User.FirstName, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname, urn:oid:2.5.4.42 |
| Surname | sn, surname, lastName, last_name, User.LastName, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname, urn:oid:2.5.4.4 |
Without a display name, the runtime joins the given name and surname.
Entra ID sends the claim URIs by default.
In Okta and Google Workspace, add attribute statements named email, firstName and lastName.
Custom attribute names and transforms are not supported yet.
The runtime keeps the email only when its domain is one the organization has verified, and drops it otherwise.
The customer controls the identity provider, so it could state an address at another company.
The stored address appears as a verified email in ID tokens and lets the person accept invitations sent to it, so the domain must belong to the organization.
The same rule applies to an organization's own OIDC connection.
Profile fields never identify the person; the immutable subject attribute does.
A user with a local account keeps the profile from that account.
Diagnose failed sign-ins
When the runtime refuses a SAML response, the person signing in sees an ordinary failed sign-in.
Organization admins see the reason on the Single sign-on page.
A failed Test login shows the reason next to the draft.
For the active connection, the page shows the last successful sign-in, the last refused sign-in with its reason, and how many sign-ins failed since the last success.
The configuration API returns the same data in test_failure on each version and in customer_login on the overview.
Only responses to a sign-in request that the runtime started are counted. Unsolicited posts to the ACS URL are refused without a record, so they cannot hide a real failure or grow storage. The runtime keeps one health row per connection, not a history.
| Reason | What to check |
|---|---|
idp_error |
The identity provider returned an error status. Check its logs and the user's assignment to the app. |
signature_invalid |
The response is unsigned, or none of the metadata's signing certificates verifies it. Upload current metadata. |
no_valid_certificate |
Every signing certificate in the metadata has expired or is not valid yet. Upload renewed metadata. |
issuer_mismatch |
The response names a different entity ID than the metadata. |
audience_mismatch |
The assertion is for a different service provider entity ID. Compare it with the SP metadata. |
destination_mismatch |
The response was sent to a different ACS URL. |
request_mismatch |
The response does not answer the sign-in request, or the request expired. Retry from the start. |
outside_time_window |
The assertion is outside its validity period. Check the identity provider's clock and assertion lifetime. |
confirmation_invalid |
The bearer confirmation is missing, expired, or names another recipient. |
subject_missing |
The subject attribute is missing, repeated, or has more than one value. Check the attribute mapping. |
replayed |
The assertion was already used. |
unsupported |
The response uses a feature the runtime does not accept, such as encryption or a signature algorithm other than RSA-SHA256. |
malformed |
The response is not well-formed SAML. |
other |
Another refusal. OIDC connections report this reason for every refused response. |
Identity continuity
An explicit account link retains the canonical user, memberships, permission references, and downstream OIDC subject.
A matching email address cannot merge accounts.
The immutable subject also supplies the directory externalId mapping.
SCIM email attributes remain profile data and do not verify a canonical address.
Disabling or unlinking the method invalidates its prior proofs through the shared identity-version gates.
Removal reserves the upstream identity and rejects pending logins through that method.
Only an explicit account link or reviewed operator migration can enable it again.
Relinking does not restore old sessions, codes, or tokens.
Independent local recovery remains subject to its own account and organization policy.
Independent acceptance fixture
docker compose up -d postgres keycloak
node scripts/dev-embedded.mjs
# In another terminal:
node scripts/setup-native-saml.mjs
EMBEDDED_FIXTURE=1 npm run test:e2e:native-samlKeycloak 26.8.2 acts only as the independent IdP in realm oe-native-idp.
It talks directly to the native SP and validates signed requests.
The controlled Rust protocol tests supplement that journey with malformed XML, claim substitution, wrong destinations, request mismatches, and replay cases.
No commercial account is required.
The controlled protocol suite tests signed claims, invalid substitutions and XML, request correlation, metadata signing flags, and overlapping certificate trust followed by removal of the old key.
The independent browser journey also checks OIDC subject continuity, application references, MCP access, and replica replay protection.
It removes a linked method during a pending signed login and rejects old sessions, codes, access tokens, and refresh tokens.
Explicit relinking preserves the canonical user and does not revive old grants.
SCIM deactivation separately revokes pending and active authority.
E2E_PANEL_MODE=1 runs these workflows in the installed consumer's individual panels.