SAML Authentication Setup Guide between Fracttal and Keycloak

This document describes the procedure to configure authentication using SAML (Security Assertion Markup Language) between the Fracttal platform and Keycloak (version 16.1.1) as the Identity Provider (IdP). The goal is to enable Single Sign-On (SSO) for corporate users through Keycloak.

Prerequisites

  • Administrative access to Keycloak (version 16.1.1 or higher).
  • Administrative access to Fracttal.
  • Fracttal base URL: https://app.fracttal.com
  • SAML configuration key name (for example, in this document I use: fracttalkeykloak). This value must be unique and match the one configured in Keycloak.

Client Creation in Keycloak

  1. Log into the Keycloak administration console.
  2. In the side menu, select: Configure → Clients.
  3. Click the 'Create' button.
  1. In the 'Client ID' field, enter the client identifier: fracttal-app. (this is the value I use for the example, but it's at the discretion of whoever configures it. The important thing is that it matches the issuer configured in Fracttal).
  2. Select 'saml' as Client Protocol.
  3. Press 'Save' to continue.

SAML Client Configuration

Once the client is created, configure the parameters in the 'Settings' tab as follows:

ParameterValueDescription
Client IDfracttal-appUnique client identifier
EnabledONActivates the client
Client ProtocolsamlDefines the SAML protocol
Sign AssertionsONThis parameter indicates whether Keycloak should sign SAML assertions
Signature AlgorithmRSA_SHA256Defines the cryptographic algorithm used to generate the digital signature in SAML messages
SAML Signature Key NameKEYIDSpecifies how Keycloak identifies the key used to sign the SAML message within the XML
Canonicalization MethodEXCLUSIVEDefines the XML canonicalization method, which is how the document is normalized before applying the digital signature
Force POST BindingONForces the POST method for SAML responses
Front Channel LogoutONEnables coordinated session logout
Name ID FormatemailSends the user identifier as email
Valid Redirect URIshttps://app.fracttal.com/rpc/auth/samlcallback?codesaml=fracttalkeykloak&id_server=AMERICANReturn URI to Fracttal
Base URLhttps://app.fracttal.comSP service base URL
Assertion Consumer Service POST Binding URLhttps://app.fracttal.com/rpc/auth/samlcallback?codesaml=fracttalkeykloakEndpoint where Fracttal receives SAML responses

Note

The value 'fracttalkeykloak' must match the key name configured in Fracttal. If another name is used, it should be replaced in all fields where it appears.

It's also not required to perform custom field mappings; just indicating that the NameID Format is email should work.

Configuration in Fracttal

To register the Identity Provider (Keycloak) in Fracttal:

  1. Access Fracttal with an administrator user.
  2. Go to Configuration → Security → SAML 2.0.
  3. Complete the fields according to the following table.
FieldValue
Connection/Nicknamefracttalkeykloak
Issuerfracttal-app
Single Sign-On URLhttp://localhost:8080/auth/realms/master/protocol/saml
Single Logout URLhttp://localhost:8080/auth/realms/master/protocol/saml
Certificate(X.509 certificate exported from Keycloak)

The 'Issuer' field must have the same value as the Client ID of the client configured in Keycloak.

The URL fields (SSO and Logout) are obtained from the Identity Provider metadata in Keycloak, accessible from 'Realm Settings → General → SAML 2.0 Identity Provider Metadata'.

Export IdP Metadata

  1. In the Realm view, open the 'General' tab.
  1. Click on 'SAML 2.0 Identity Provider Metadata'.
  2. Copy or download the XML content.
  3. Extract the certificate and URLs (SingleSignOnService and SingleLogoutService) from the XML.
  4. These values must match those configured in Fracttal.

Testing and Validation

  1. Access Fracttal and try to log in with the configured SAML method.
  2. Verify that it redirects to the Keycloak login.
  3. Log in with the IdP credentials.
  4. If authentication is successful, the user will automatically enter Fracttal.