Use Cases
HomeIntegrityControlManagement CenterSolutions
  • Get Started
  • Integrity | Access
    • Auth. methods
      • LDAP (Username/Password)
      • LDAP (Username/Password) + OTP (SMTP)
      • LDAP (Username/Password) + OTP (SMS)
      • Swedish BankID
      • Microsoft Entra ID (SAMLSPBroker)
      • Foregin eID (SAMLSPBroker)
    • Auth. methods (SAML)
      • One-Time Password (OATH)
      • Inera IdP (SITHS) (SAMLSPBroker)
      • ID-porten (Norway) (SAML IdP with OIDC RP)
      • Multiple SAML IdP's configured
        • Multiple JSON files
    • Auth. methods (OIDC)
      • Static values (OIDC) - Test only
      • Swedish BankID (OIDC)
      • UID/PWD (OIDC)
    • Auth. methods (MISC)
      • Selector filtering
      • AuthZ control
      • External links and Cancel location
    • Add a Federation or SAML SP
  • Integrity | Portal
    • Portal
  • Integrity | Enrollment
    • Software token (OATH)
    • Best practice configuration
  • Integrity | Radius
    • UID/OATH token
    • UID/Password/OATH token
    • UID/Password/SMTP
  • Integrity | API
    • Swedish Siths eID
    • Oath Token
  • Control | Applications
    • Password Reset
    • Password Reset for Entra ID
    • Password Reset for Google Workspace
  • OPERATION
    • Rolling upgrade - cluster
  • TROUBLESHOOTING
    • Wrong relaystate
  • Misc
    • Address configuration externally
    • ADFS
      • Protect Fortified ID apps
      • Install and configure Fortified ID ADFS adapter for Siths eID
      • Install and configure Fortified ID ADFS adapter for Oath
    • AWS
      • Protect AWS Cognito with eID MFA
      • Protect AWS IAM Identity Center with eID MFA
    • Customization
      • Overlay - WEB
      • Overlay - Portal
      • Overlay - Password Reset
      • Overlay - Enrollment
      • Logout page
    • Dependency-Track - protect with eID MFA and SSO
    • Digitala Nationella Prov (DNP) / Skolfederation
      • Active Directory Federation Services (ADFS) with BankID as step-up-method
      • Active Directory / LDAP with BankID as step-up-method
      • Entra ID (Azure AD) with BankID as step-up-method
      • Google with BankID as step-up-method
      • Generate eduPersonPrincipalName (eppn) and store in Google
      • Generate eduPersonPrincipalName (eppn) and store in Entra ID
      • Common configuration
    • Encrypt configuration secrets
    • Microsoft Entra
      • Protect Entra ID (Azure AD) with eID MFA
      • Entra External - Support for eID (SAML)
      • Entra External - Support for eID (OIDC)
    • Expressions
    • Google
      • Common configuration for Google Workspace - Directory API
      • Common configuration for Google Workspace - authentication for Fortified ID products
      • Delegated administration for Google Workspace - teacher updates student guardians
      • Delegated administration for Google Workspace - teacher updates student password
      • Protect Google Workspace with eID MFA
    • HTTPS
    • Protect sensitive data, such as social security numbers, through obfuscation
    • Reverse proxy
      • Install Apache Web Server on Windows
      • Add SSL certificate and enable https
      • Add a Fortified ID virtual host
    • Set AuthnContextClassRef
    • Wiki.js - OpenID Connect (OIDC)
Powered by GitBook
On this page
  • Scenario
  • Prerequisite
  • Overview
  • 1. Add metadata for a Federation or SAML SP
  • 2. Provide metadata of you as SAML IdP
  • 3. Configure assertion
  • Complete config.json file of Fortified ID WEB
  1. Integrity | Access

Add a Federation or SAML SP

PreviousExternal links and Cancel locationNextPortal

Last updated 6 months ago

Scenario

  • Add a Federation to Fortified ID Integrity Web

  • Add an SAML Service Provider (SP) to your Fortified ID SAML IdP

Prerequisite

  • This use case assumes that you have good knowledge of the product in question.

  • Fortified ID Integrity WEB installed

Overview

To add exchange metadata with a Federation or an SAML SP is done in a similar fashion.

1. Add metadata for a Federation or SAML SP

Add metadata for the connecting part, this done in two ways:

  1. You receive the metadata from the administrator in a file that Integrity WEB will read during start up. Note. This is an example where Fortified ID Web act as an SAML IdP to sp_portal that acts a an SAML SP.

    {
        "path": "${globals.file_paths.base_dir}/config/../sp_portal.xml"
    }
  2. You receive the metadata from the administrator using a URL that Integrity WEB will connected to and read during start up. Note. This is an example where Fortified ID Web act as an SAML Broker where in this case it as and SAML SP to the eIDAS SAML IdP/Federation.

    { 
        "url": "https://eid.svelegtest.se/metadata/mdx/role/idp.xml"
    }

Some examples The first two additions are to two of the Fortified ID apps, Fortified ID Portal and Fortified ID Password Reset. Both provides their SAML SP data through a metadata file in this example.

The two last addition are for eIDAS and Microsoft Entra. Both of them present their metadata signing URL to connect to.

{ 
    "path": "${globals.file_paths.base_dir}/config/../sp_portal.xml"
},
{
    "path": "${globals.file_paths.base_dir}/config/../sp_pwdreset.xml"
},
{
    "url": "https://eid.svelegtest.se/metadata/mdx/role/idp.xml"
},
{
    "url": "https://login.microsoftonline.com/../federationmetadata/2007-06/federationmetadata.xml?appid=.."
}

2. Provide metadata of you as SAML IdP

Regardless of whether Fortified ID Web acts as IdP or SP (e.g., SAML broker scenario), Fortified ID WEB needs to provide metadata about itself to the connecting part. Fortified ID WEB can either provide metadata in a file or using an URL.

Provide metadata through an URL

There are two parts that create that the url that the connecting part can read the metadata of the Fortified ID Web.

In the metadata section of the config.json file you can add one or several metadata configuration. If you have several connecting services that need different configuration, the metadata section is where you can add those configuration.

  • Configuration in config.json In config.json you add the entity id and signing data for a specific configuration. You also add the file path to the metadata template of this configuration.

  • Metadata template file This is where the URL to the IdP is configured for example. Below is an example of an metadata file where Fortified ID WEB act as an SAML IdP

    <?xml version="1.0" encoding="UTF-8"?>
    <md:EntityDescriptor
    	xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://fortifiedid.se/test_idp_1">
    	<md:IDPSSODescriptor WantAuthnRequestsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    		<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://dev.fortifiedid.se/saml/authn/chain" />
    	</md:IDPSSODescriptor>
    </md:EntityDescriptor>
         

3. Configure assertion

Under the assertion_config section you add all the assertion configuration. You can configure one per connecting part or use wildcard for all that do not has a specific configuration. In example bleow you have one assertion for Fortified ID Portal and one for any other connecting part. Note: Configure a pre_assertion_pipe is optional.

"assertion_config": [
    {
        "target_sp": [
            "FortifiedID_Portal"
        ],
        "nameid_parameter": "mail",
        "auth_context_parameter": "AuthnContextClassRef",
        "additional_attribute_parameter": [
            "givenName",
            "sn",
            "mail",
            "roles",
            "display_name",
            "distinguishedName"
        ],
        "pre_assertion_pipe": "Retrieve_data_for_SAML_response_for_Portal"
    },
    {
        "target_sp": [
            "*"
        ],
        "nameid_parameter": "mail",
        "auth_context_parameter": "AuthnContextClassRef",
        "additional_attribute_parameter": [
            "email",
            "display_name"
        ],
        "pre_assertion_pipe": "Generic_assertion_pipe"
    }
]

Complete config.json file of Fortified ID WEB

Note. The configuration below is incomplete. It is also an example to explain this use case.

{
    "globals": "@include:globals.json",
    "modules": [
        {
            "name": "HttpClient",
            "config": {
                "name": "default",
                "idle_timeout_ms": 5000,
                "connect_timeout_ms": 5000
            }
        },
        {
            "name": "SAML",
            "config": {
                "metadata_cache": "${globals.saml.idp1.metadata_cache}",
                "http_port": "${globals.http.port}",
                "enable_http": true,
                "metadata_template": [
                    {
                        "id": "${globals.saml.idp1.metadata_id}",
                        "metadata_file_path": "${globals.saml.idp1.metadata_file_path}",
                        "sign_ref": [
                            {
                                "keystore": {
                                    "alias": "${globals.keystore.saml.sign_ref_keystore_alias}",
                                    "key_password": "${globals.keystore.saml.sign_ref_keystore_key_password}",
                                    "password": "${globals.keystore.saml.sign_ref_keystore_password}",
                                    "path": "${globals.keystore.saml.sign_ref_keystore_path}"
                                }
                            }
                ],
                "metadata": [
                    { 
                        "path": "${globals.file_paths.base_dir}/config/../sp_portal.xml"
                    },
                    {
                        "path": "${globals.file_paths.base_dir}/config/../sp_pwdreset.xml"
                    },
                    {
                        "url": "https://eid.svelegtest.se/metadata/mdx/role/idp.xml"
                    },
                    {
                        "url": "https://login.microsoftonline.com/../federationmetadata/2007-06/federationmetadata.xml?appid=.."
                    }
                ]
            }
        },
        {
            "name": "AuthN",
            "enabled": true,
            "config": {
                "context_path": "/authn",
                "webroot_dir": "web",
                "http_csrf": {
                    "enabled": false
                },
                "authenticators": [
                    {
                        "id": "auth00",
                        "type": "SAMLIDP",
                        "config": {
                            "context_path": "/saml/authn/chain",
                            "base_path": "/saml/authn",
                            "expiry": "PT1S",
                            "force_re_auth": false,
                            "verbose": false,
                            "idp": "${globals.saml.idp1.idp_entityid}",
                            "chain": [
                                {
                                    "id": "selector_root",
                                    "required": true
                                }
                            ],
                            "assertion_config": [
                                {
                                    "target_sp": [
                                        "FortifiedID_Portal"
                                    ],
                                    "nameid_parameter": "mail",
                                    "auth_context_parameter": "AuthnContextClassRef",
                                    "additional_attribute_parameter": [
                                        "givenName",
                                        "sn",
                                        "mail",
                                        "roles",
                                        "display_name",
                                        "distinguishedName"
                                    ],
                                    "pre_assertion_pipe": "Retrieve_data_for_SAML_response_for_Portal"
                                },
                                {
                                    "target_sp": [
                                        "FortifiedID_PWD_Reset"
                                    ],
                                    "nameid_parameter": "mail",
                                    "auth_context_parameter": "AuthnContextClassRef",
                                    "additional_attribute_parameter": [
                                        "email",
                                        "display_name",
                                        "on_behalf_of_display_name",
                                        "on_behalf_of_user_name",
                                        "on_behalf_of_email",
                                        "distinguishedName",
                                        "pwd_last_set",
                                        "pwd_last_set_allowed_days"
                                    ],
                                    "pre_assertion_pipe": "Retrieve_data_for_SAML_response_for_PWDReset"
                                }
                            ]
                        }
                    },
                    {
                        "id": "selector_root",
                        "type": "Selector",
                        "config": {
                            "base_path": "/saml/authn",
                            "webroot_dir": "web/authenticator/selector",
                            "verbose": false,
                            "overlay_dirs": [
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/1_selector_root",
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/0_look_and_feel"
                            ],
                            "options": [
                                {
                                    "id": "1",
                                    "target": "customer",
                                    "label": "customer_label"
                                }
                            ]
                        }
                    }
        },
        {
            "name": "Pipes",
            "config": {
                "pipes": [
                    {
                        "id": "Retrieve_data_for_SAML_response_for_Portal",
                        "config": {
                            "valves": [
                                {
                                    "name": "DumpRequest",
                                    "config": {
                                        "label": "*** DumpRequest från DumpData Portal****"
                                    }
                                },
                                {
                                    "name": "DumpExports",
                                    "config": {
                                        "label": "*** DumpExports från DumpData Portal****"
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "exec_if_expr": "exports.used_auth == ('BankID')",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "wbemPath={{{exports.personalNumber}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "exec_if_expr": "exports.used_auth == ('Freja')",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "mail={{{exports.mail}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "exec_if_expr": "(exports.used_auth == ('username_password')|| exports.used_auth == ('UID_OATH'))",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "mail={{{exports.username}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "exec_if_expr": "(exports.used_auth == ('webauthn_passkeys')|| exports.used_auth == ('fortifiedid_mobile'))",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "mail={{{exports.username}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "exec_if_expr": "exports.used_auth == ('eidas')",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "url={{{exports.eidasPersonIdentifier}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "exec_if_expr": "exports.used_auth == ('microsoft_entra')",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "mail={{{exports.username_from_entra}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "LDAPSearch",
                                    "enabled": true,
                                    "config": {
                                        "destination": "${globals.ldap.ldap1.name}",
                                        "base_dn": "${globals.ldap.ldap1.connection.base_dn}",
                                        "scope": "SUB",
                                        "filter": "{{{exports.LDAP_search_filter}}}",
                                        "attributes": [
                                            {
                                                "name": "givenName",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "sn",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "sAMAccountName",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "mail",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "carLicense",
                                                "multivalue": true
                                            },
                                            {
                                                "name": "memberOf",
                                                "multivalue": true
                                            },
                                            {
                                                "name": "displayName",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "distinguishedName",
                                                "multivalue": false
                                            }
                                        ]
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "enabled": true,
                                    "config": {
                                        "name": "username",
                                        "value": "{{{item.mail}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "ItemPropertyAdd",
                                    "enabled": true,
                                    "config": {
                                        "name": "display_name",
                                        "value": "{{{item.displayName}}}"
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "enabled": true,
                                    "config": {
                                        "old_name": "carLicense",
                                        "new_name": "roles"
                                    }
                                },
                                {
                                    "name": "DumpExports",
                                    "config": {
                                        "label": "*** DumpExports från DumpData Portal****"
                                    }
                                },
                                {
                                    "name": "DumpState",
                                    "config": {
                                        "label": "*** DumpState ***"
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "id": "Retrieve_data_for_SAML_response_for_PWDReset",
                        "config": {
                            "valves": [
                                {
                                    "name": "DumpRequest",
                                    "config": {
                                        "label": "*** DumpRequest from PWD RESET ASSERTION****"
                                    }
                                },
                                {
                                    "name": "DumpExports",
                                    "config": {
                                        "label": "*** DumpExports from PWD RESET ASSERTION****"
                                    }
                                },
                                {
                                    "name": "LDAPSearch",
                                    "enabled": true,
                                    "config": {
                                        "destination": "${globals.ldap.ldap1.name}",
                                        "base_dn": "${globals.ldap.ldap1.connection.base_dn}",
                                        "scope": "SUB",
                                        "filter": "mail={{{exports.username}}}",
                                        "attributes": [
                                            {
                                                "name": "sAMAccountName",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "mail",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "displayName",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "pwdLastSet",
                                                "multivalue": false
                                            }
                                        ]
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "enabled": true,
                                    "config": {
                                        "name": "username",
                                        "value": "{{{item.mail}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "config": {
                                        "new_name": "user_name",
                                        "old_name": "sAMAccountName"
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "config": {
                                        "new_name": "email",
                                        "old_name": "mail"
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "config": {
                                        "new_name": "display_name",
                                        "old_name": "displayName"
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "config": {
                                        "new_name": "pwd_last_set",
                                        "old_name": "pwdLastSet"
                                    }
                                },
                                {
                                    "name": "ItemPropertyAdd",
                                    "config": {
                                        "name": "pwd_last_set_allowed_days",
                                        "value": "0"
                                    }
                                },
                                {
                                    "name": "LDAPSearch",
                                    "enabled": true,
                                    "config": {
                                        "destination": "${globals.ldap.ldap1.name}",
                                        "base_dn": "${globals.ldap.ldap1.connection.base_dn}",
                                        "scope": "SUB",
                                        "filter": "mail={{{request.object_id}}}",
                                        "attributes": [
                                            {
                                                "name": "sAMAccountName",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "mail",
                                                "multivalue": false
                                            },
                                            {
                                                "name": "displayName",
                                                "multivalue": false
                                            }
                                        ]
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "config": {
                                        "new_name": "on_behalf_of_user_name",
                                        "old_name": "sAMAccountName"
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "config": {
                                        "new_name": "on_behalf_of_display_name",
                                        "old_name": "displayName"
                                    }
                                },
                                {
                                    "name": "ItemPropertyRename",
                                    "config": {
                                        "new_name": "on_behalf_of_email",
                                        "old_name": "mail"
                                    }
                                },
                                {
                                    "name": "ItemMerge",
                                    "config": {
                                        "id": "ItemMergePWD",
                                        "keep_items": false
                                    }
                                },
                                {
                                    "name": "ItemPropertyAdd",
                                    "config": {
                                        "name": "mail",
                                        "value": "{{{exports.username}}}"
                                    }
                                },
                                {
                                    "name": "DumpState",
                                    "config": {
                                        "label": "*** DumpState ***"
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}