Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 261:integration:saml [2026/04/27 09:56] – [Configure the SAML Service Provider (SP)] Weinlein, Thomas | 261:integration:saml [2026/04/28 09:04] (current) – [Configure signing] Weinlein, Thomas | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Configure SAML Authentication | + | ====== Configure SAML Authentication ====== |
| SAML stands for Security Assertion Markup Language. It is a current standard for authenticating users in a distributed system. | SAML stands for Security Assertion Markup Language. It is a current standard for authenticating users in a distributed system. | ||
| Line 58: | Line 58: | ||
| sp.saml.keystore.password = SECRET | sp.saml.keystore.password = SECRET | ||
| </ | </ | ||
| + | |||
| + | //Please make sure to call **'' | ||
| ===== Generate the SAML SP metadata ===== | ===== Generate the SAML SP metadata ===== | ||
| - | After configuring | + | When you are done with generating |
| - | For SP metadata generated correctly the whole authentication section must be present in config.xml : [[https://doc.stagesasaservice.com/ | + | < |
| + | < | ||
| + | | ||
| + | <method type=" | ||
| + | < | ||
| + | [...] | ||
| + | < | ||
| + | [...] | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| - | The resulting XML file can be sent to the SAML IdP administrators and contains all information necessary to set up the trust relationship on the IdP side. After the SAML IdP has been configured with the SP metadata, users will be able to authenticate successfully with Stages through the SAML IdP. | + | '' |
| - | ===== ===== | + | <code properties> |
| + | sp.saml.metadata.path=file: | ||
| + | </ | ||
| + | Restart Stages and access the Login page. The sp-metadata.xml should now be generated. | ||
| - | ===== Configure | + | The resulting XML file can be sent to the SAML IdP administrators and contains all information necessary to set up the trust relationship on the IdP side. |
| - | The SAML Identity Provider describes the remote service | + | //Please note that you need to delete the sp-metadata.xml file whenever you change |
| - | The most reliable way to configure | + | After the SAML IdP has been configured with the SP metadata, you will receive an idp-metadata.xml file with the IDP specific part of the SAML configuration. |
| - | From this metadata, you will be able to derive the parameters | ||
| - | * EntityIdfromMetadata | + | ===== Configure the SAML Identity Provider (IdP) ===== |
| - | * SingleSignOnServiceLocationFromMetadata (should be HTTPS, please see [[: | + | The SAML Identity Provider describes the remote service that Stages uses to authenticate users. Typically, it is run by the access management group within your IT organization. |
| - | * DisplayName | + | The most reliable way to configure the SAML Identity Provider |
| - | * EMailAddress | + | Store this metadata in '' |
| + | '' | ||
| + | <code xml> | ||
| + | <method type=" | ||
| + | < | ||
| + | [...] | ||
| + | < | ||
| + | [...] | ||
| + | </ | ||
| + | [...] | ||
| + | </ | ||
| + | </ | ||
| - | for the following configuration: | + | '' |
| - | + | <code properties> | |
| - | <code -> | + | idp.saml.metadata.path = file:conf/secret/idp-metadata.xml |
| - | < | + | </code> |
| - | | + | |
| - | | + | |
| - | keystorePass=" | + | |
| - | + | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | providerId=" | + | |
| - | providerUrl=" | + | |
| - | nameIdPolicyFormat=" | + | |
| - | sendBinding=" | + | |
| - | userFullnameTemplate=" | + | |
| - | + | ||
| - | <!-- userFullnameTemplate is used to build the user's full name from multiple IDP attributes | + | |
| - | as defined below as < | + | |
| - | In the example above the firstname and lastname attributes are concatenated speparated by a space. --> | + | |
| - | + | ||
| - | <!-- hardcoded magic value that specifies the NameID from the SAML reply --> | + | |
| - | < | + | |
| - | + | ||
| - | | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | <!-- This matches if the SAML assertion contains a SAML attribute " | + | |
| - | <!-- | + | |
| - | < | + | |
| - | id=" | + | |
| - | pattern=" | + | |
| - | defaultRolesUsername=" | + | |
| - | defaultLicenseType=" | + | |
| - | licensePoolIdent="" | + | |
| - | autocreateUser=" | + | |
| - | /> | + | |
| - | --> | + | |
| + | A complete SAML configuration should then look like that: | ||
| + | <code xml> | ||
| + | <method type=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| <!-- This is the default matcher, identified by id and pattern attributes set to " | <!-- This is the default matcher, identified by id and pattern attributes set to " | ||
| - | <identity-provider-attribute-match | + | < |
| - | id=" | + | id=" |
| - | pattern=" | + | pattern=" |
| - | | + | |
| - | defaultLicenseType=" | + | defaultLicenseType=" |
| - | licensePoolIdent=" | + | autocreateUser=" |
| - | autocreateUser=" | + | |
| /> | /> | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| - | | + | '' |
| - | | + | <code properties> |
| - | signature verification of the authentication response. | + | sp.id = https:// |
| - | The key data can also be copied from the IdP metadata. | + | #needs to be generated. Path needs to be relative to ${STAGES_ROOT} |
| - | If no signing certificate is specified, no signature | + | sp.saml.keystore.path = file: |
| - | validation will be performed. | + | #will be generated on first login page access (path needs to be relative to ${STAGES_ROOT}) |
| - | --> | + | sp.saml.metadata.path = file: |
| - | < | + | |
| - | <!-- MIIDCTCC...Qwgf5bXby+ug== --> | + | idp.saml.enabled = false |
| - | </ | + | #exported metadata from SAML IDP (path needs to be relative to ${STAGES_ROOT}) |
| + | idp.saml.metadata.path = file: | ||
| + | idp.saml.attribute.firstname | ||
| + | idp.saml.attribute.lastname | ||
| + | idp.saml.attribute.email = urn: | ||
| + | idp.saml.fullname.template = %firstname% %lastname% | ||
| + | idp.saml.autocreate = true | ||
| - | <!-- | + | user.default.username |
| - | In case the IDP only provides encrypted assertions specify | + | user.default.licenseType |
| - | | + | |
| - | IdP metadata. If no encryption certificate is specified, no encrypted | + | |
| - | | + | |
| - | --> | + | |
| - | < | + | |
| - | < | + | |
| - | </ | + | |
| - | </ | + | |
| - | + | ||
| - | <!-- | + | |
| - | This identity provider statement with the " | + | |
| - | magic id enables local Stages logins to be available | + | |
| - | for selection between multiple identity providers | + | |
| - | (NOT IMPLEMENTED YET). | + | |
| - | If the authentication with the IdP fails and the " | + | |
| - | provider is enabled, the Stages login screen is shown, so | + | |
| - | the user may log in with a local user id. If it is not | + | |
| - | configured, the server answers with a 403 (Forbidden) | + | |
| - | status code. | + | |
| - | --> | + | |
| - | < | + | |
| - | </ | + | |
| </ | </ | ||
| Line 186: | Line 174: | ||
| ===== Changing the license pool and license type for existing users ===== | ===== Changing the license pool and license type for existing users ===== | ||
| - | '' | + | '' |
| ===== Configuring Stages attributes in default-matcher section with JavaScript ===== | ===== Configuring Stages attributes in default-matcher section with JavaScript ===== | ||
| - | '' | + | JavaScript control flow statements (e.g. " |
| - | | + | <code javascript> |
| - | | + | </ |
| - | /> | + | **JavaScript notation of if-clauses: |
| + | <code javascript> | ||
| + | </code> | ||
| + | **JavaScript notation of value conditions: | ||
| + | ** SAML Attributes that are defined via identity_provider_attribute elements can be used in these scripts. E.g. | ||
| + | <code xml> | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | **Names of license types for license assignment** | ||
| + | ^License name^License type^ | ||
| + | |Modeler|QM| | ||
| + | |Contributor|FloatingADev| | ||
| + | |Participant|FloatingDev| | ||
| + | |Project Manager|FloatingPM| | ||
| + | |Viewer|AuthPsReader| | ||
| + | |||
| + | **Example configuration: | ||
| + | '' | ||
| + | * The pattern matches the entry of the SAML attribute " | ||
| + | * Depending on the users' email address (domain-part), | ||
| + | |||
| + | <code xml> | ||
| + | < | ||
| + | id=" | ||
| + | pattern=" | ||
| + | defaultRolesUsername=" | ||
| + | else if (email.match(/ | ||
| + | else ' | ||
| + | defaultLicenseType=" | ||
| + | else if (email.match(/ | ||
| + | else ' | ||
| + | licensePoolIdent=" | ||
| + | else '';" | ||
| + | autocreateUser=" | ||
| + | /> | ||
| </ | </ | ||
| Line 204: | Line 227: | ||
| ===== Configure the SAML Request Type ===== | ===== Configure the SAML Request Type ===== | ||
| - | The default binding type of the SAML Request is '' | + | The default binding type of the SAML Request is '' |
| - | Some IDPs do not work with that type and rather need a POST Request. This can only be found out on the IDP. | + | Some IDPs do not work with that type and rather need a " |
| - | This can be configured in the '' | + | This can be configured in the authentication method properties |
| - | < | + | < |
| - | sendBinding=" | + | <method type=" |
| + | < | ||
| + | [...] | ||
| + | < | ||
| + | [...] | ||
| + | </ | ||
| + | | ||
| + | </ | ||
| + | </ | ||
| + | ===== Configure signature validation ===== | ||
| + | |||
| + | By default Stages send authentication requests signed and expects assertions in the response as well as the response itself to be signed. | ||
| + | In case this is not supported by the IDP it can be disabled by setting the according property to **false**. | ||
| + | |||
| + | //Please use with care as it degrades security.// | ||
| + | <code xml> | ||
| + | <method type=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | ===== Configure multiple SAML IDPs ===== | ||
| + | |||
| + | Stages does now allow to configure multiple IDPs. Just add another authentication method of type SAML2 and ensure it has an **unique name**. E.g. | ||
| + | |||
| + | <code xml> | ||
| + | < | ||
| + | [...] | ||
| + | <method type=" | ||
| + | [...] | ||
| + | </ | ||
| + | <method type=" | ||
| + | [...] | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | This will create a SSO button on the login page for each IDP. | ||
| + | Please provide a user understandable naming by defining a translation property for each login.sso.[name] propertyin each supported language: | ||
| + | '' | ||
| + | <code properties> | ||
| + | login.sso.saml-idp-1 = Single Sign-On for company 1 | ||
| + | login.sso.saml-idp-2 = Single Sign-On for company 2 | ||
| </ | </ | ||
| Line 220: | Line 288: | ||
| * Azure AD IdP | * Azure AD IdP | ||
| - | * Okta | + | * Keycloak |
| - | * JumpCloud | + | |
| - | * Cisco Central Web Authentication (CWA) | + | |
| - | * Oracle Access Manager (OAM) | + | |
| * Shibboleth IdP | * Shibboleth IdP | ||
| - | * Active Directory Federation Services (ADFS) | ||
| Please let us know if you were able to make Stages SAML work with your server and it is not on this list yet. | Please let us know if you were able to make Stages SAML work with your server and it is not on this list yet. | ||