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] – [Enable SAML for Stages] 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 59: | Line 59: | ||
| </ | </ | ||
| - | ===== Configure the SAML Service Provider (SP) ===== | + | //Please make sure to call **'' |
| - | The SAML Service Provider describes your local Stages server. | ||
| - | To configure, add or enable | + | ===== Generate |
| - | < | + | |
| - | < | + | |
| - | ... | + | |
| - | <service-provider | + | When you are done with generating the keystore and other service provider |
| - | providerId=" | + | |
| - | keyAlias=" | + | |
| - | | + | <code xml> |
| + | < | ||
| + | [...] | ||
| + | <method type=" | ||
| + | < | ||
| + | [...] | ||
| + | < | ||
| + | [...] | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </code> | ||
| - | ... | + | '' |
| - | + | ||
| - | </ | + | |
| + | <code properties> | ||
| + | sp.saml.metadata.path=file: | ||
| </ | </ | ||
| - | The '' | + | Restart Stages and access the Login page. The sp-metadata.xml |
| - | The '' | + | The resulting XML file can be sent to the SAML IdP administrators and contains all information necessary |
| - | ===== ===== | + | |
| - | ===== Generate the SAML SP metadata ===== | + | //Please note that you need to delete |
| - | + | ||
| - | After configuring the SAML SP and logged on as root, you can download the SAML SP metadata directly by navigating | + | |
| - | + | ||
| - | For SP metadata generated correctly the whole authentication section must be present in config.xml : [[https:// | + | |
| - | + | ||
| - | 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. | + | |
| - | ===== ===== | + | 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. |
| Line 102: | Line 100: | ||
| The most reliable way to configure the SAML Identity Provider (IdP) is to ask the access management team for the IdP metadata. | The most reliable way to configure the SAML Identity Provider (IdP) is to ask the access management team for the IdP metadata. | ||
| - | From this metadata, you will be able to derive | + | Store this metadata |
| + | '' | ||
| + | <code xml> | ||
| + | <method type=" | ||
| + | < | ||
| + | [...] | ||
| + | < | ||
| + | [...] | ||
| + | </ | ||
| + | [...] | ||
| + | </ | ||
| + | </ | ||
| - | * EntityIdfromMetadata | + | '' |
| + | <code properties> | ||
| + | idp.saml.metadata.path = file: | ||
| + | </ | ||
| - | * SingleSignOnServiceLocationFromMetadata (should | + | A complete SAML configuration |
| + | <code xml> | ||
| + | <method type=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | <!-- This is the default matcher, identified by id and pattern attributes set to " | ||
| + | < | ||
| + | id=" | ||
| + | pattern=" | ||
| + | defaultUserGroupsUsername=" | ||
| + | defaultLicenseType=" | ||
| + | autocreateUser=" | ||
| + | /> | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| - | * DisplayName (alternative: FirstName, LastName) | + | '' |
| + | <code properties> | ||
| + | sp.id = https:// | ||
| + | #needs to be generated. Path needs to be relative to ${STAGES_ROOT} | ||
| + | sp.saml.keystore.path = file: | ||
| + | #will be generated on first login page access (path needs to be relative to ${STAGES_ROOT}) | ||
| + | sp.saml.metadata.path = file: | ||
| - | * EMailAddress | + | 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 = urn: | ||
| + | idp.saml.attribute.lastname = urn: | ||
| + | idp.saml.attribute.email = urn: | ||
| + | idp.saml.fullname.template = %firstname% %lastname% | ||
| + | idp.saml.autocreate = true | ||
| - | for the following configuration: | + | user.default.username = default |
| + | user.default.licenseType = AuthPsReader | ||
| + | </ | ||
| - | <code -> | + | After you configured the service provider and identity provider in '' |
| - | < | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | < | + | ===== Changing the license pool and license type for existing users ===== |
| - | | + | |
| - | | + | |
| - | </ | + | '' |
| - | < | + | ===== Configuring Stages attributes in default-matcher section with JavaScript ===== |
| - | providerId=" | + | |
| - | providerUrl=" | + | |
| - | nameIdPolicyFormat=" | + | |
| - | sendBinding=" | + | |
| - | userFullnameTemplate=" | + | |
| - | <!-- userFullnameTemplate is used to build the user's full name from multiple IDP attributes | + | JavaScript control flow statements (e.g. " |
| - | as defined below as < | + | |
| - | In the example above the firstname | + | |
| - | | + | <code javascript> <Stages_attribute> |
| - | | + | </code> |
| - | <!-- either " | + | **JavaScript notation of if-clauses: |
| - | <!--< | + | <code javascript> if (condition1) ' |
| - | <identity-provider-attribute name=" | + | </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> | ||
| + | < | ||
| + | </ | ||
| - | <!-- This matches if the SAML assertion contains a SAML attribute " | + | **Names of license types for license assignment** |
| - | < | + | ^License name^License type^ |
| - | < | + | |Modeler|QM| |
| - | | + | |Contributor|FloatingADev| |
| - | | + | |Participant|FloatingDev| |
| - | | + | |Project Manager|FloatingPM| |
| - | | + | |Viewer|AuthPsReader| |
| - | licensePoolIdent="" | + | |
| - | autocreateUser=" | + | |
| - | /> | + | |
| - | --> | + | |
| - | <!-- This is the default matcher, identified by id and pattern attributes set to "*" --> | + | **Example configuration: |
| - | < | + | '' |
| - | id="*" | + | * The pattern matches |
| - | pattern=" | + | * Depending on the users' email address (domain-part), SAML attribute name "email" |
| - | | + | |
| - | defaultLicenseType=" | + | |
| - | licensePoolIdent="" | + | |
| - | autocreateUser=" | + | |
| - | /> | + | |
| - | + | ||
| - | <!-- | + | |
| - | Specifying at least one signing certificate automatically enables | + | |
| - | signature verification of the authentication response. | + | |
| - | The key data can also be copied from the IdP metadata. | + | |
| - | If no signing certificate is specified, no signature | + | |
| - | validation will be performed. | + | |
| - | --> | + | |
| - | < | + | |
| - | + | ||
| - | < | + | |
| - | </ | + | |
| - | + | ||
| - | <!-- | + | |
| - | In case the IDP only provides encrypted assertions specify | + | |
| - | | + | |
| - | IdP metadata. If no encryption certificate is specified, no encrypted | + | |
| - | | + | |
| - | --> | + | |
| - | < | + | |
| - | <!-- MIIDCTCC...Qwgf5bXby+ug== | + | |
| - | </ | + | |
| - | </ | + | |
| - | | + | <code xml> |
| - | This identity provider statement with the "STAGES" | + | < |
| - | magic id enables local Stages logins to be available | + | id="[saml_attribute_id]" |
| - | for selection between multiple identity providers | + | |
| - | | + | |
| - | If the authentication with the IdP fails and the " | + | else if (email.match(/ |
| - | | + | else ' |
| - | the user may log in with a local user id. If it is not | + | |
| - | configured, the server answers with a 403 (Forbidden) | + | else if (email.match(/ |
| - | | + | else ' |
| - | | + | |
| - | | + | else '';" |
| - | </authentication> | + | |
| + | /> | ||
| </ | </ | ||
| - | After you configured | + | Please note that the values of multi value attributes are provided to the scripts as one value as a comma separated string. |
| - | ===== Changing the license pool and license type for existing users ===== | ||
| - | '' | + | ===== Configure |
| - | ===== Configuring Stages attributes in default-matcher section with JavaScript ===== | + | The default |
| - | '' | + | Some IDPs do not work with that type and rather need a "REDIRECT". This can only be found out on the IDP. |
| - | " | + | This can be configured in the authentication method properties section via |
| - | | + | |
| - | + | ||
| - | /> | + | |
| + | <code xml> | ||
| + | <method type=" | ||
| + | < | ||
| + | [...] | ||
| + | < | ||
| + | [...] | ||
| + | </ | ||
| + | [...] | ||
| + | </ | ||
| </ | </ | ||
| - | Please note that the values of multi value attributes are provided to the scripts as one value as a comma separated string. | + | ===== 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**. | ||
| - | ===== Configure | + | //Please use with care as it degrades security.// |
| + | <code xml> | ||
| + | <method type=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | ===== Configure | ||
| - | The default binding type of the SAML Request is '' | + | Stages does now allow to configure multiple IDPs. Just add another authentication method |
| - | Some IDPs do not work with that type and rather need a POST Request. This can only be found out on the IDP. | + | <code xml> |
| - | + | < | |
| - | This can be configured in the '' | + | [...] |
| - | + | < | |
| - | <code> | + | [...] |
| - | sendBinding="urn: | + | </method> |
| + | < | ||
| + | [...] | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | 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 245: | 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. | ||