Skip to main content
Version: 2.0

SAML 2.0

SAML 2.0 is an enterprise-grade XML-based standard for Single Sign-On. Use it to integrate with corporate identity providers such as Okta, OneLogin, Microsoft Entra ID (Azure AD), PingFederate, and other SAML 2.0-compliant services.

How It Works

SP-Initiated SSO (Default)

  1. A user clicks Sign in with {Provider Name} on the login page.
  2. MaestroHub generates a SAML AuthnRequest and redirects the user to the identity provider's SSO URL.
  3. The user authenticates at the identity provider.
  4. The identity provider sends a SAML Response (containing an assertion with user attributes) back to MaestroHub's Assertion Consumer Service (ACS) URL.
  5. MaestroHub validates the assertion signature and conditions, extracts user attributes, and creates or links a local user account.
  6. The user is logged in.

IdP-Initiated SSO (Optional)

When enabled, users can start the login flow directly from the identity provider's portal without first visiting MaestroHub. The identity provider sends an unsolicited SAML Response to MaestroHub, which validates and processes it the same way.

Configuration Reference

IdP Metadata Configuration

The simplest way to configure a SAML provider is to supply the identity provider's metadata. MaestroHub auto-extracts all required IdP settings from it.

FieldTypeRequiredDescription
IdP Metadata URLURLConditionalURL to fetch the IdP metadata XML automatically. Recommended — keeps configuration up to date when the IdP rotates certificates.
Raw Metadata XMLTextareaConditionalPaste the raw IdP metadata XML if a URL is not available. Alternative to the URL.
info

You must provide one of: the IdP Metadata URL, the Raw Metadata XML, or the manual IdP settings below. If metadata is provided, the manual fields are auto-populated from it.

Manual IdP Settings

Use these fields if you don't have a metadata URL or XML. All three are required when configuring manually.

FieldTypeRequiredDescription
IdP Entity IDTextConditionalThe identity provider's unique entity identifier. Found in the IdP's SAML metadata or configuration page.
IdP SSO URLURLConditionalThe identity provider's Single Sign-On endpoint where AuthnRequests are sent.
IdP X.509 CertificateTextarea (PEM)ConditionalThe identity provider's signing certificate in PEM format (including -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- markers). Used to verify SAML assertion signatures.
IdP Single Logout URLURLNoThe identity provider's Single Logout endpoint. Leave empty if SLO is not supported.

Service Provider (SP) Settings

These values identify your MaestroHub instance to the identity provider.

FieldTypeRequiredDefaultDescription
SP Entity IDTextYesYour application's SAML entity identifier. Typically your application URL (e.g., https://your-domain.com/saml/metadata). Must match what you configure in the identity provider.
ACS URLURLYesAuto-generatedAssertion Consumer Service URL — the endpoint where the IdP posts the SAML response. Format: https://your-backend-url/auth/saml/providers/your-slug/callback. Auto-populated from the provider slug. Configure this exact URL in your identity provider.

Advanced Settings

Signature and Digest

FieldTypeDefaultDescription
Signature MethodSelectRSA-SHA256Algorithm for signing SAML requests. Options: RSA-SHA1, RSA-SHA256, RSA-SHA512.
Digest MethodSelectSHA256Algorithm for message digests. Options: SHA1, SHA256, SHA512.
Name ID FormatTexturn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressRequested format for the NameID element. Common values: emailAddress, persistent, transient.

Security

FieldTypeDefaultDescription
Sign RequestsSwitchOffSign SAML AuthnRequests sent to the IdP. Requires SP certificate and private key below.
Require Signed AssertionsSwitchOnRequire the IdP to sign SAML assertions. Recommended for security.
Require Signed ResponseSwitchOffRequire the IdP to sign the entire SAML response (not just the assertion).
Allow UnencryptedSwitchOffAllow unencrypted SAML assertions. When disabled, assertions must be signed.

SP Certificate and Private Key

Required only when Sign Requests is enabled.

FieldTypeDescription
SP CertificateTextarea (PEM)Your service provider's X.509 certificate in PEM format. Used by the IdP to verify signed requests.
SP Private KeyTextarea (PEM)Your service provider's private key in PEM format. Used to sign AuthnRequests.

Session and Authentication

These settings are configured via defaults and are available in the backend configuration:

SettingDefaultDescription
Session Duration3600 secondsHow long a SAML session remains valid.
Allow IdP-Initiated SSOOffAccept unsolicited SAML responses from the identity provider.
Force Re-authenticationOffInclude ForceAuthn="true" in AuthnRequests, requiring the user to re-authenticate even if they have an active IdP session.
AuthnRequest BindingHTTP-RedirectHow AuthnRequests are sent. Options: HTTP-Redirect, HTTP-POST.

Attribute Mapping

Map SAML assertion attributes to MaestroHub user fields.

FieldPlaceholderDescription
Email AttributeemailAttribute containing the user's email address
First Name AttributefirstNameAttribute containing the user's first name
Last Name AttributelastNameAttribute containing the user's last name
Display Name AttributedisplayNameAttribute containing the full display name
Groups AttributegroupsAttribute containing group memberships (used for role mapping)
tip

The attribute names must exactly match the attribute names in your IdP's SAML assertions. Check your IdP's attribute mapping or SAML response viewer to find the correct names. Common variations include http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress for Microsoft Entra ID.

Role Mapping

Optionally map SAML group attributes to MaestroHub roles.

FieldTypeDefaultDescription
Enable Role MappingSwitchOffActivate role mapping for this provider.
Role ClaimTextThe SAML attribute name containing group memberships (e.g., http://schemas.xmlsoap.org/claims/groups).
Default RoleSelectMemberRole assigned when no mapping matches.
Strict EnrollmentSwitchOffBlock login if no specific mapping matches.
MappingsKey → Value pairsMap IdP group names to MaestroHub roles.

Setup Guide

Step 1: Gather IdP Metadata

In your identity provider's admin console:

  1. Create a new SAML application.
  2. Copy the IdP Metadata URL (preferred) or download the metadata XML.
  3. Note the IdP Entity ID and SSO URL if configuring manually.

Step 2: Create the Provider in MaestroHub

  1. Go to Identity & Access → SSO Configuration.
  2. Click Add ProviderSAML 2.0.
  3. Fill in the provider name and slug.
  4. Enter the IdP Metadata URL (or paste the raw XML).
  5. Set the SP Entity ID — this must match what you configure in the identity provider.
  6. Verify the ACS URL and configure it in your identity provider's SAML settings.

Step 3: Configure the IdP

In your identity provider, configure:

  • ACS URL (Assertion Consumer Service): Copy from the MaestroHub form.
  • SP Entity ID (Audience): Copy from the MaestroHub form.
  • Name ID Format: emailAddress (default) or as required.
  • Attribute Statements: Map user attributes (email, first name, last name) to the attribute names configured in MaestroHub.

Step 4: Test and Enable

  1. Click Test Connection. MaestroHub fetches and validates the IdP metadata.
  2. Save the provider.
  3. The provider appears on the login page as a Sign in with {Name} button.

SP Metadata

After creating the provider, you can share MaestroHub's SP metadata with your identity provider. The SP metadata XML is available at:

GET /auth/saml/providers/{provider-id}/metadata

Some identity providers can import this URL directly to auto-configure the integration.

Single Logout (SLO)

MaestroHub supports SAML Single Logout when the IdP provides an SLO URL:

  1. The local session is invalidated.
  2. A SAML LogoutRequest is sent to the IdP's SLO endpoint.
  3. The IdP terminates its session and sends a LogoutResponse back.
  4. The user is redirected to the login page.

MaestroHub also handles IdP-initiated logout — when the user logs out from the identity provider's portal, the IdP sends a LogoutRequest to MaestroHub to terminate the local session.

Troubleshooting

ProblemSolution
"Certificate errors"Ensure the X.509 certificate is in PEM format with proper BEGIN CERTIFICATE and END CERTIFICATE markers. No extra whitespace or characters.
"Assertion expired"Check clock synchronization between MaestroHub and the identity provider. SAML assertions have time-based validity windows.
"Audience mismatch"The SP Entity ID in MaestroHub must exactly match the Audience Restriction configured in the IdP.
"Signature invalid"The IdP may have rotated its signing certificate. Update the certificate in MaestroHub or re-import the metadata.
"Recipient mismatch"The ACS URL in MaestroHub must exactly match the recipient URL the IdP sends in the assertion.
"Attribute mapping issues"Verify attribute names match the SAML assertion exactly. Use your IdP's SAML response viewer or tracer to inspect the actual attribute names.
"Metadata fetch failed"Confirm the IdP Metadata URL is accessible from the MaestroHub server. Check firewall rules and DNS resolution.
Users not getting correct rolesVerify the Groups Attribute matches the actual attribute name in the SAML assertion, and that the group names in Mappings match exactly.