CDNetworks ドキュメントセンター IAM User Guide Example of Using Keycloak for SAML SSO

Example of Using Keycloak for SAML SSO

最終更新日:2026-03-25 15:22:18

Keycloak SAML Integration Steps

Keycloak Deployment and Installation

For more details, see: Installation and Deployment Process

Log In to Keycloak to Configure the Application

  1. Log In to the Keycloak Platform as an Administrator or with an Admin Account
    Upcoming Updates to Product Navigation and Document Center
  2. Create a New Realm
    Upcoming Updates to Product Navigation and Document Center
  3. After the Realm Is Created, Go to Realm Settings and Download the Initial Metadata by Clicking on 【SAML 2.0 Identity Provider Metadata】
    Upcoming Updates to Product Navigation and Document Center
  4. Log In to the CDNetworks Console to Configure the Service Provider
    SSO Type Selection: Select User SSO and Upload the IdP Metadata.
    The Uploaded Metadata File Is the Initial File Downloaded in Step 3 (Note: After All Configurations Are Complete, You Will Need to Update the Metadata Document Again)
    Upcoming Updates to Product Navigation and Document Center
  5. Obtain the SP Metadata
    Through the CDNetworks Console, Click ‘View’ to Enter the Service Provider Details Page, Locate the SP Metadata Document, and Download It
    Upcoming Updates to Product Navigation and Document Center
  6. Create a Client. You Can Quickly Create One Using ‘Import Client’ and Upload the SP Metadata

Note: The ‘Import Client’ feature requires a higher version of Chrome. Otherwise, you may encounter the error ‘Object.hasOwn is not a function’.

Upcoming Updates to Product Navigation and Document Center

After a successful import, the Client ID will be automatically detected. Then click Save to save the configuration and proceed to the client configuration page.
Upcoming Updates to Product Navigation and Document Center
You can also locate the corresponding Client ID from the clients list to access the configuration page.
Upcoming Updates to Product Navigation and Document Center

  1. Configure Access Settings
    The Client ID and Valid Redirect URIs are automatically generated after importing the XML file. The main configuration items for this page are as follows:
    Root URL, Home URL, IDP-Initiated SSO URL Name
    Enter the IDP-initiated SSO URL Name: You can directly enter the Realm name, and the complete Target IDP Initiated SSO URL will appear right below.
    Enter the main domain part in the Root URL, and enter the URI part in the Home URL, as shown in the figure:
    Upcoming Updates to Product Navigation and Document Center
  2. Configure SAML Capabilities
    As shown in the figure, set the Name ID Format to ‘username’. Keep the other settings as default and click Save to save the configuration.
    Upcoming Updates to Product Navigation and Document Center
  3. Go to the Client Scopes Tab to Modify the Configuration
    Change the Assigned Type of role_list from Default to Optional.
    Upcoming Updates to Product Navigation and Document Center
    Navigate to the dedicated configuration file for the current client, and set Full Scope Allowed to off, as shown below:
    Upcoming Updates to Product Navigation and Document Center
    Upcoming Updates to Product Navigation and Document Center
  4. Create a user for Keycloak login by adding a user in the Users feature and setting a password. The Username created here must match an existing account in the CDNetworks Console.
    For instructions on creating a user, please refer to the documentation: Create User
    Upcoming Updates to Product Navigation and Document Center
    On the Credentials tab, you can set the password.
    Upcoming Updates to Product Navigation and Document Center
  5. After completing all configurations, re-download the metadata file and update it in the CDNetworks Console, as in Step 3.
    Upcoming Updates to Product Navigation and Document Center

Access Test

Test login: In the Clients list, locate the Home URL corresponding to the newly added Client ID, and click to access it. This will redirect you to the Keycloak login page.
Upcoming Updates to Product Navigation and Document Center
After entering the created user and password, verify whether the redirection to the CDNetworks Console occurs as expected.
Upcoming Updates to Product Navigation and Document Center