New Ory Agent Security is now live! Claim your complimentary test drive. Get Started!

Skip to main content

Generic SAML

This guide explains the settings you’d need to use to configure SAML with your Identity Provider. Once this is set up you should get an XML metadata file that should then be configured using the Ory Polis API (or calling the API controller connection method if using Ory Polis NPM).

Please do not add a trailing slash at the end of the URLs.

Create them exactly as shown below:

  • Assertion consumer service URL / Single Sign-On URL / Destination URL: http://localhost:5225/api/oauth/saml

  • Entity ID / Identifier / Audience URI / Audience Restriction: https://saml.boxyhq.com

  • Response: Signed

  • Assertion Signature: Signed

  • Signature Algorithm: RSA-SHA256

  • Assertion Encryption: Unencrypted

info

The deployed Ory Polis service has a Service Provider (SP) endpoint that exposes the above metadata and the same can be accessed at <jackson_endpoint>/.well-known/saml-configuration.

IdP entity ID and Issuer​

The IdP's entity ID is the entityID in the metadata you create the connection with. Ory Polis accepts a SAML response for a connection only if both of these name that entity ID:

  • the Issuer of the SAML response, which Ory Polis uses to find the connection
  • the Issuer of the signed assertion inside it

When the Issuer of the response names no connection, the request fails with a 403 error. When the Issuer of the signed assertion is not the connection's entity ID, the login fails: Ory Polis redirects to the app with error=access_denied and a generic error description that starts with the ID of an SSO trace. The trace names the Issuer of the assertion and the entity ID of the connection. In SAML federation, the request fails with an error instead of redirecting.

Most IdPs use their entity ID as the Issuer of both. If they differ, update the connection with the IdP's current metadata, or change the IdP application's issuer setting to match its metadata.

SAML profile/claims/attributes mapping​

As outlined in the guide above we try and support 4 attributes in the SAML claims - id, email, firstName, lastName. This is how the common SAML attributes map over for most providers, but some providers have custom mappings. Please refer to the documentation on Identity Provider to understand the exact mapping.

SAML AttributeOry Polis mapping
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifierid
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressemail
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennamefirstName
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surnamelastName