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 anAuthnRequestover 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 andLogoutRequests must be signed with it: query-string signatures for HTTP-Redirect, enveloped XML signatures (via the configuredsamlVerifier) for HTTP-POST. - Metadata —
/samlp/metadata/{client_id}publishes IdP metadata XML; itsentityIDis theIssuerthe 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}/logoutaccepts aLogoutRequest(HTTP-Redirect and HTTP-POST) and answers with aLogoutResponse. - 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
samlpconnections 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 —
metadataUrlormetadataXmlfill 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_attributefor 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 —
signOutEndpointis stored but noLogoutRequestis sent.