Configuring SAML

Objective

After completing this lesson, you will be able to configure SAML to enable exchange authentication and authorization data between separate systems.

Introduction to SAML

Security Assertion Markup Language (SAML) is an XML-based, open-standard data format for exchanging authentication and authorization data between different systems known as entities. The primary purpose of SAML is to enable a user to log in once to an enterprise system and then access multiple other services without re-entering credentials. This process is commonly known as Single Sign-On (SSO).

  • It can exchange user data.

  • SAML is a standard for federating login/logout to a 3rd party.

There are three roles: the Principal (usually a user), the Identity Provider (IdP), and the Service Provider (SP). The general process is the following:

  1. The Principal requests a service from the Service Provider.

  2. The Service Provider requests and obtains an authentication assertion from the Identity Provider.

  3. Based on the assertion, the Service Provider can make an access control decision.

Understanding SAML Assertions

A SAML assertion is a package of XML information containing one or more statements made by a SAML authority. There are three types of assertions, each serving a distinct purpose:

  1. Authentication Assertions
    • Purpose: Prove a user's identity.
    • Example: Confirming that a user successfully logged in with valid credentials.
  2. Attribute Assertions
    • Purpose: Supply user-specific information.
    • Example: Sharing a user's email address or phone number with the service provider.
  3. Authorization Decision Assertions
    • Purpose: Define what the user is permitted to do.
    • Example: Granting or denying access to a specific resource or feature.
SAML federation sequence diagram depicting four-step authentication flow between three components: Identity Provider (IdP), Service Provider (SP), and Principal (Browser/Agent): 1) Principal requests service from SP, 2) Principal sends authentication request to IdP, 3) IdP returns authentication assertion to SP, 4) SP makes access control decision and grants or denies requested service.

SAML Flows

SAP Customer Data Cloud supports multiple flows for both login and logout scenarios.

Users can try to access an application from one of the following Login flows:

  1. IdP-initiated SSO
  2. SP-initiated SSO

Users can try to log out from an application using one of these Logout flows:

  1. IdP-initiated SLO
  2. SP-initiated SLO

SAP Customer Data Cloud can play either the identity provider (IdP) or service provider (SP) in the SAML process.

Watch these videos for more information regarding SAML flows (and debugging a SAML connection) in Introducing SAML in SAP Customer Data Cloud.

SAP Customer Data Cloud Acting as IDP

When SAP Customer Data Cloud acts as an IdP, it provides SSO login and logout services to third-party service providers. This means SAP Customer Data Cloud is responsible for verifying user identities and issuing assertions.

SAP Customer Data Cloud SAML federation authentication flowchart depicting complete SSO user journey: User browser arrives at Service Provider (SP), redirects to Customer Data Cloud, branches into two paths: 1) Logged-in user redirected directly to resource, 2) Logged-out user redirected to Proxy Page, then LoginURL Page, resulting in either successful login and resource redirect or failed login and error page display.

SAP Customer Data Cloud's SAML IdP service enables identity federation on top of SAP Customer Data Cloud's Customer Identity Management via the SAML2.0 protocol. The SAML IdP allows any service providers supporting SAML 2.0 to authenticate SAP Customer Data Cloud's Customer Identity management.

In this flow, SAP Customer Data Cloud functions as an IdP, which means that SAP Customer Data Cloud provides an SSO login (or logout) to a third-party service provider. The SAML protocol supports different profiles and binding options, and SAP Customer Data Cloud supports the web browser SSO profile with HTTP POST and HTTP Redirect binding.

Setup SAP Customer Data Cloud as IdP

To set up SAP Customer Data Cloud as an IdP, follow these steps:

Step 1: Activate the IdP

  • Navigate to Customer Data Cloud Console → Identity → Connect → Inbound Federation → SAML

  • Alternatively, use the API: fidm.saml.idp.setConfig

Step 2: Configure IdP Settings

Your proxy page must include references to:

  • Customer Data Cloud 's SAML SDKs.

  • Login URL and Logout URL URIs.

  • An error page for handling failures.

Step 3: Register Each Service Provider

For each SP you want to connect, collect its SAML SP Metadata and configure the following values.

SettingDescription
NameIdentifier for the SP.
IssuerUnique identifier for the SP.
Session LifetimeDuration of the SSO session
ACS URLAssertion Consumer Service URL — where SAML responses are sent.
SLO URLSingle Logout URL.
BindingHTTP POST or HTTP Redirect.
Name IDFormat used to identify the user
Attribute MapMaps Customer Data Cloud user attributes to SP attributes.
x509 CertificateUsed for signing and encryption.

Note

Every Customer Data Cloud site is pre-configured to function as an IdP. No additional setup is required for the Issuer, SSO URL, SLO URL, or x509 certificate. Check the SAML IdP Metadata page for your site's default values.

Registering SAP Customer Data Cloud as a Service Provider (SP)

When SAP Customer Data Cloud acts as an SP, it receives SSO login and logout services from a third-party identity provider, such as Active Directory Federation Services (ADFS).

The SAML protocol supports different profiles and binding options, and the SAP Customer Data Cloud supports the web browser SSO profile with HTTP POST and HTTP Redirect binding.

To register an external IdP within SAP Customer Data Cloud:

Step 1: Access SP Configuration

  • Navigate to Customer Data Cloud Console → Identity → Connect → Outbound Federation → SAML

  • Alternatively, use the API: fidm.saml.setConfig

Step 2: Collect IdP Information and Configure Settings

Collect and add the following IdP details.

SettingDescription
NameWill be prefixed with saml- automatically.
IssuerUnique identifier for the IdP.
SSO URLThe IdP's endpoint for handling login requests.
BindingHTTP POST or HTTP Redirect.
SLO URLThe IdP's endpoint for handling logout requests.
Name ID FormatFormat used to identify the user.
Attribute MapMaps IdP attributes to Customer Data Cloud user attributes.
x509 CertificateThe IdP's certificate for validating assertions.

Note

Just like with the IdP configuration, every Customer Data Cloud site comes pre-configured as an SP. Your Issuer, ACS URL, SLO URL, and x509 certificate are already set.

Security Best Practices

SAML is a powerful protocol, but it must be implemented securely. Here are the key security practices to follow:

  • Always Use HTTPS: SAML tokens contain sensitive identity information and must never be transmitted over unencrypted channels.

  • Signature Verification: Always require signed assertions and, where possible, signed responses to ensure data integrity.

  • Limit Assertion Lifetime: Keep the SAML session lifetime as short as practical for your use case. Longer-lived sessions increase the attack window if an assertion is intercepted.

  • Restrict Allowed IdPs: In Customer Data Cloud, only register known and trusted IdPs. Regularly audit your registered IdP list and remove any that is no longer in use.

  • Always Sign Assertions:Unsigned assertions can be forged. Ensure the IdP signs all SAML assertions using its private key and the SP validates the signature using the IdP's public x509 certificate.

  • Encrypt Sensitive Assertions: For applications handling sensitive data, encrypt SAML assertions in addition to signing them to prevent interception.

Understanding SAML Federation in SAP Customer Data Cloud

In this video, we explore the SAML federation functionality within SAP Customer Data Cloud. You will learn how to use these features to manage customer identities effectively.

Summary

  • SAML is an XML-based standard for exchanging authentication and authorization data.

  • The three roles in SAML are the Principal, Identity Provider, and Service Provider.

  • SAML uses three types of assertions: Authentication, Attribute, and Authorization Decision.

  • SAP Customer Data Cloud supports SSO and SLO flows in both IdP-initiated and SP-initiated modes.

  • SAP Customer Data Cloud can function as either an IdP or an SP, and every Customer Data Cloud site comes with default configurations for both roles.