Skip to content

SAML 2.0 ​

Spec: OASIS SAML 2.0Status: Partial

SAML 2.0 support is provided by @authhero/saml and works in both directions: AuthHero as the identity provider for downstream SAML applications, and AuthHero as the service provider federating to an upstream SAML identity provider.

AuthHero as identity provider ​

Implemented ​

  • SSO endpoint — /samlp/{client_id} accepts an AuthnRequest over the HTTP-Redirect (GET) and HTTP-POST (POST) bindings and issues a signed SAML response. Requests are read whatever namespace prefix the SP uses.
  • Signed requests — with the SP's certificate in the application's addons.samlp.signingCert, AuthnRequests and LogoutRequests must be signed with it: query-string signatures for HTTP-Redirect, enveloped XML signatures (via the configured samlVerifier) for HTTP-POST.
  • Metadata — /samlp/metadata/{client_id} publishes IdP metadata XML; its entityID is the Issuer the assertions carry.
  • HTTP-POST binding — SAML responses are delivered via an auto-submitting HTML form POST to the SP's AssertionConsumerServiceURL, which must be one of the application's callback URLs.
  • Signed assertions — assertions are signed with the tenant's X.509 signing key. Certificates are tenant-scoped and can be rotated with a staging window, renewed over the same key pair, or revoked — see Certificate lifecycle.
  • Attribute statements — standard user attributes are mapped into SAML attributes.
  • Single Logout — /samlp/{client_id}/logout accepts a LogoutRequest (HTTP-Redirect and HTTP-POST) and answers with a LogoutResponse.
  • Custom signers — tenants can supply their own signing implementation via the SAML package.

Partial / not yet implemented ​

  • IdP-initiated SSO — a response is only issued for an AuthnRequest.
  • Assertion encryption — assertions are signed but not encrypted.

AuthHero as service provider (SAML connections) ​

See SAML Connections.

Implemented ​

  • samlp connections with Auth0's option names, entity ID (urn:auth0:{tenant}:{connection}) and endpoints.
  • AuthnRequest over the HTTP-Redirect binding (optionally signed with the tenant's SAML key) or the HTTP-POST binding.
  • ACS — POST /login/callback?connection={connection} accepts responses over the HTTP-POST binding.
  • Response validation — signature against the configured IdP certificate(s), with the assertion read only from signed content; one assertion per response; InResponseTo, Recipient, Destination, audience, issuer and validity window checks; replay protection through single-use login state.
  • SP metadata — GET /samlp/metadata?connection={connection}.
  • IdP metadata import — metadataUrl or metadataXml fill the sign-in URL, sign-out URL, certificates and IdP entity ID on create/update.
  • Attribute mapping — WS-Fed claim URIs, LDAP OIDs and common friendly names, overridable with fieldsMap; user_id_attribute for the user id.
  • Home Realm Discovery via domain_aliases.

Partial / not yet implemented ​

  • IdP-initiated SSO — unsolicited responses are rejected.
  • Encrypted assertions and encrypted NameIDs — rejected with a clear error.
  • Signed AuthnRequests over HTTP-POST — signing needs the HTTP-Redirect binding.
  • SP-initiated Single Logout — signOutEndpoint is stored but no LogoutRequest is sent.

Dual-licensed: AGPL-3.0-only or commercial license.