Genpact Cora Knowledge Center

Support

Configure Cora SeQuence for SAML 2.0 Authentication

Overview

SAML 2.0 is an XML-based protocol that uses security tokens containing assertions to pass information about a principal (usually an end user) between a SAML authority, named an Identity Provider, and a SAML consumer, named a Service Provider. SAML 2.0 enables web-based, cross-domain single sign-on (SSO), which helps reduce the administrative overhead of distributing multiple authentication tokens to the user.

When you use SAML authentication, Cora SeQuence supports single identity provider and service provider initiated sign in and sign out only.

Prerequisites

  • Name of identity provider
  • Name of service provider
  • SingleSignOnServiceUrl
  • SingleSignOutServiceUrl
  • Binding (POST or Redirect)
  • Copy of the idp signing and encryption public certificate
  • Claim type that uniquely identifies users (for claims configuration)
  • Is the identity provider response signed?
  • is the identity provider assertion signed?
  • Does the service provider sign the request?
  • Publicly signed certificate (if necessary)

For Bindings:

  • You can send Authentication Requests using HTTP-REDIRECT or HTTP-POST.
  • Consumer Assertion Service endpoint only supports HTTP-POST binding.
  • HTTP-Artifact is not supported.

Identity provider and Token-related configuration

IIS configuration

  • Enable only Anonymous Authentication for the Administration site and Flowtime site.
  • Enable claims-based authentication in the web.config file.

Add Configuration Sections to the web.config File

Add the following section under the <configuration><configSections> elements.

<configSections>
... 
 <sectionGroup name="sequence.engine" type="PNMsoft.Sequence.Configuration.WorkflowEngineConfigurationSectionGroup, PNMsoft.Sequence, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1">
 ... 
 <sectionGroup name="identity" type="PNMsoft.Sequence.Configuration.IdentityConfiguration,PNMsoft.Sequence.IdentityModel.v8, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1">
   <section name="saml" type="PNMsoft.Sequence.IdentityModel.Configuration.SamlConfigurationSection, PNMsoft.Sequence.IdentityModel.Saml2, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1"/>
 </sectionGroup>
 ... 
 </sectionGroup>
... 
 <section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
 <section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
...
</configSections>

Add HttpModules to the web.config file

Add the following section under the <system.webServer> <modules> elements. Make sure these modules are list in the list.

<system.webServer>
... 
  <modules>
    <!-- Other modules already configured in web.config should be here -->
    <add name="SessionAuthenticationModule" type="System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
    <add name="SamlAuthenticationModule" type="PNMsoft.Sequence.IdentityModel.Services.SamlAuthenticationModule, PNMsoft.Sequence.IdentityModel.Saml2, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1" preCondition="managedHandler" />
  </modules>
...
</system.webServer>

Add SAML 2.0 configurations to the web.config file

Add the following section under the <configuration><sequence.engine> elements.

<identity>
     <saml>
       <serviceProvider name="https://mydomain.com/myapplication"
             description="Sequence Service Provider"
             assertionConsumerServiceUrl="/AuthServices/acs"/>
       <partnerIdentityProviders>
         <add name="https://sts.windows.net/1eb2d3db-45bd-67a8-91a2-3456ab78be9f/"
             description="Azure"
             singleSignOnServiceUrl="https://login.microsoftonline.com/1eb2d3db-45bd-67a8-91a2-3456ab78be9f/saml2"
             singleLogoutServiceUrl="https://login.microsoftonline.com/1eb2d3db-45bd-67a8-91a2-3456ab78be9f/saml2"
             singleSignOnServiceBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
       </partnerIdentityProviders>
     </saml>
</identity>

SAML Configuration Attributes

NameDescriptionRequiredDefault Value
modulePathRelative path of SAML authentication endpoint.Yes/AuthServices
samlCommandFactoryTypeExtension point to enable creation of your own commands to handle sign in and sign out.YesPNMsoft.Sequence.IdentityModel.Commands.CommandFactory, PNMsoft.Sequence.IdentityModel.Saml2, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1
returnUrlAbsolute URL the user is redirected to after sign in.NoCora SeQuence Flowtime URL

serviceProvider Configuration Attributes

NameDescriptionRequiredDefault Value
assertionConsumerServiceUrlAssertion Consumer Service URL.Yes/AuthServices/acs
nameGenerally, the application's URL.Yes-
descriptionService Provider description.No-
localCertificateFileSpecifies the X.509 certificate file for this service provider. The certificate file name can be an absolute path or a path relative to the application folder.No-
localCertificatePasswordSpecifies the password with the X.509 certificate file for this service provider. Certificate files (.pfx) that include the private key should be protected by password. Certificate files (.cer) that do not include a private key are not password protected. The certificate password must be kept secure. In a test environment using a test certificate, specifying the password using the LocalCertificatePassword attribute is acceptable. For a production certificate, the password should be stored encrypted in the web.config file. Refer to the LocalCertificatePasswordKey attribute for more details.No-
localCertificatePasswordKeySpecifies the web.config file's appSettings key for the certificate file password. For example, if the LocalCertificatePasswordKey attribute value is localCertificatePassword, then under the web.config file's appSettings section, an entry with the name localCertificatePassword is expected, and the entry value is used as the password. By encrypting the appSettings section using the aspnet_regiis utility, the certificate file password is secured.No-
localCertificateStoreLocationSpecifies the X.509 certificate store (LocalMachine or CurrentUser).NoLocalMachine
localCertificateSerialNumberSpecifies the X.509 certificate by serial number for this service provider.No-
localCertificateThumbprintSpecifies the X.509 certificate by thumbprint for this service provider. The certificate is retrieved from the local computer's X.509 certificate store.No-
localCertificateSubjectSpecifies the X.509 certificate by subject name for this service provider. The certificate is retrieved from the local computer's X.509 certificate store.No-

partnerIdentityProviders Configuration Attributes

NameDescriptionRequiredDefault Value
nameGenerally, the identity provider's URL or STS.Yes-
descriptionDescription of the identity provider.No-
disableInResponseToCheckControls  whether to validate that the SAML response token is a response to a request originated by Cora SeQuence.
Add this attribute and set it to "true" when IdP-Initiated SSO is required.
Nofalse
singleSignOnServiceUrlSpecifies the application's single sign-on service URL. SAML authentication requests will be received at this URL.Yes-
singleSignOnServiceBindingSpecifies the transport binding to use when sending authentication requests to the partner identity provider's SSO service.Nourn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
signAuthnRequestSpecifies whether authentication requests sent to the partner identity provider should be signed.Nofalse
wantSAMLResponseSignedSpecifies whether the SAML response from the partner identity provider should be signed.Nofalse
wantAssertionSignedSpecifies whether the SAML assertion from the partner identity provider should be signed.Nofalse
wantAssertionEncryptedSpecifies whether the SAML assertion from the partner identity provider should be encrypted.Nofalse
partnerCertificateFileSpecifies the X.509 certificate file for this identity provider. The certificate file name can be an absolute path or a path relative to the application folder.No-
partnerCertificateStoreLocationSpecifies the X.509 certificate store (LocalMachine or CurrentUser).NoLocalMachine
partnerCertificateSerialNumberSpecifies the X.509 serial number for this provider. The certificate is retrieved from the local computer's X.509 certificate store.No-
partnerCertificateThumbprintSpecifies the X.509 certificate by thumbprint for this identity provider. The certificate is retrieved from the local computer's X.509 certificate store.No-
partnerCertificateSubjectSpecifies the X.509 certificate by subject name for this identity provider. The certificate is retrieved from the local computer's X.509 certificate store.No-
secondaryPartnerCertificateFileSpecifies the X.509 certificate file for this provider. The certificate file name may be an absolute path or a path relative to the application folder.No-
secondaryPartnerCertificateStoreLocationSpecifies the X.509 certificate store (LocalMachine or CurrentUser).NoLocalMachine
secondaryPartnerCertificateSerialNumberSpecifies the X.509 certificate by serial number for this provider. The certificate is retrieved from the local computer’s X.509 certificate store.No-
secondaryPartnerCertificateThumbprintSpecifies the X.509 certificate by thumbprint for this provider. The certificate is retrieved from the local computer’s X.509 certificate store.No-
secondaryPartnerCertificateSubjectSpecifies the X.509 certificate by subject name for this provider. The certificate is retrieved from the local computer’s X.509 certificate store.No-
tertiaryPartnerCertificateFileSpecifies the X.509 certificate file for this provider. The certificate file name may be an absolute path or a path relative to the application folder.No
tertiaryPartnerCertificateStoreLocationSpecifies the X.509 certificate store (LocalMachine or CurrentUser).NoLocalMachine
tertiaryPartnerCertificateSerialNumberSpecifies the X.509 certificate by serial number for this provider. The certificate is retrieved from the local computer’s X.509 certificate store.No-
tertiaryPartnerCertificateThumbprintSpecifies the X.509 certificate by thumbprint for this provider. The certificate is retrieved from the local computer’s X.509 certificate store.No-
tertiaryPartnerCertificateSubjectSpecifies the X.509 certificate by subject name for this provider. The certificate is retrieved from the local computer’s X.509 certificate store.No-
singleLogoutServiceUrlSpecifies the partner provider's single logout (SLO) service URL. Logout requests will be sent to the SLO service.Yes-
singleLogoutServiceBindingSpecifies the transport binding to use when sending logout messages to the partner provider's SLO service.Nourn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
logoutRequestLifeTimeSpecifies the NotOnOrAfter time interval for the logout request. The format is hh:mm:ss.No3 minutes
disableOutboundLogoutSpecifies whether logout requests sent to the partner provider are not supported.Nofalse
disableInResponseToCheckSpecifies whether the SAML message’s InResponseTo should be checked. This attribute should only be set to true in test environments or to work around limitations in the partner provider.Nofalse
signLogoutRequestSpecifies whether logout requests sent to the partner provider should be signed.Nofalse
useEmbeddedCertificateSpecifies whether the certificate embedded in the XML signature should be used when verifying the signature. If false then a configured certificate retrieved from the certificate manager is used.Nofalse
issuerFormatSpecifies the issuer format to include in SAML messages and assertions sent to the partner provider.NoFormat attribute is not included
digestMethodSpecifies the XML signature digest method.No
signatureMethodSpecifies the XML signature method.No
keyEncryptionMethodSpecifies the XML encryption key encryption method.No
dataEncryptionMethodSpecifies the XML encryption data encryption method.No
forceAuthnAvailable with Cora SeQuence V9.3
Forces the user to sign in again via the SAML SSO sign-in page even if the user has a valid session (user has already signed in to the same browser with the IDP).
If set to "true," the attribute “forceAuthn=true” is added to the SAML request.
Nofalse

Supported Bindings

  • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
  • urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST

Secondary and Tertiary Certificates

For Partner Identity Providers, you can use secondary and tertiary certificates.

For example:

  • SecondaryLocalCertificateFile
  • TertiaryLocalCertificateFile

Configure IdentityModel Audience

In the web.config file, add the following section under <configuration>.

<system.identityModel>
  <identityConfiguration>
    <audienceUris>
      <add value="https://mydomain.com/application" />
    </audienceUris>
  </identityConfiguration>
</system.identityModel>

Configure the Cora SeQuence Authentication Provider

Add claims authentication under the <configuration> <sequence.engine> <authentication> sections.

<claims enabled="true" signoutFromSts="false" loginUrl="~/AuthServices/signin" logoutUrl="~/AuthServices/logout" accessDeniedUrl="~/AccessDenied.aspx">
  <IdentityClaims>
    <add claimType="<claim type>" originalIssuer="<token issuer>" authenticationType="<sequence authentication type" />
  </IdentityClaims>
</claims>