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
  • Notes regarding this Use Case
  • Basic configuration of Fortified ID Web, Portal and Password Reset
  • Install and prepare configuration
  • Test the configuration
  • Verify services are started
  • Login to Fortified ID Portal using Fortified ID WEB as IdP
  • Login to Fortified ID Password Reset using Fortified ID WEB as IdP
  • Complete config.json file of Fortified ID WEB
  • Complete config.json file
  1. Integrity | Access
  2. Auth. methods (SAML)

Multiple SAML IdP's configured

PreviousID-porten (Norway) (SAML IdP with OIDC RP)NextMultiple JSON files

Last updated 6 months ago

Scenario

If you have application that have different need regarding the SAML IdP you can with Fortified ID WEB create several logical IdPs.

In this scenario we will us Fortified ID Portal and Fortified ID Password Reset as SAML SP that will use different IdPs.

On Fortified ID WEB we ha two IdP2s created.

Prerequisite

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

  • Fortified ID WEB installed and configured

  • LDAP directory. Location are the users to authenticate. The example code is configured using an Active Directory. We are using mail attribute of the Active Directory user.

  • Fortified ID Portal installed and configured

  • Fortified ID Password Reset installed and configured

  • FakeSMTP. This is used when a user reset its own password. When authenticating to the self service we will use UserID (mail) and a mail delivered one-time password (otp). Download and install FakeSMTP on the same host as the use cases and start the smtp service on port 25. Note. If you have an "real" SMTP server then use that instead.

Note. All configuration and testing is done on the scenario server.

Notes regarding this Use Case

Here are some information about what is core of this use case.

We have one installation of Fortified ID WEB with two logical SAML IdPs configured. The key configuration parts, see config.json at the bottom of this use case, are

  • Line 59-88 Here we reference two different metadata_templates. One for each IdP. Make sure you verify the 2 files referenced for each IdP. See ZIP-file and the files fortifiedid_web_saml_idp_1_template.xml and fortifiedid_web_saml_idp_2_template.xml in fodler \..\FortifiedID\web\customer\config\resources_internal\saml\metadata_templates

  • Line 117-212 and line 213-308 IdP1 - From line 117-212 you have all authenticators for IdP1 IdP2 - From line 213-308 you have all authenticators for IdP2 Note. You do not need to have all the authenticators under one IdP2 but for me it more logical. Note. You can also extract the pipes module to separate files and reference to them using globals.

  • Line 312-475 and line 476-688 Pipes for IdP1 - From line 312-475 you have all pipes for IdP1 including the assertion pipe. Pipes for IdP2 - From line 476-688 you have all pipes for IdP2 including the assertion pipe. I have created two Pipes modules, one for each IdP. You can all the pipes in the same pipe module. Note. You can also extract the pipes module to separate files and reference to them using globals.

Basic configuration of Fortified ID Web, Portal and Password Reset

Install and prepare configuration

  1. Download and install Fortified ID Web Fortified ID Portal, Fortified ID Password Reset

    1. To install Integrity Web Integrity Portal and Password Reset, see documentation and installation.

  2. Add files and folders from ZIP-file to Fortified ID Web, Fortified ID Portal and Fortified ID Password Reset

  3. Replace the customer folders for your installations with the ones from the zip-file. Note. This use case was initially done on a Windows server, if you run Container/Docker or Linux you might have to changes something to work in your environments like file paths e.g..

  4. Open the globals.json in both customer folders and update to match your environment.

  5. Start services

    1. Start Fortified ID WEB

    2. Start Fortified ID Portal

    3. Start Fortified ID Password Reset

Test the configuration

Verify services are started

  • Verify Fortified ID WEB is started

  • Verify Fortified ID Portal is started

  • Verify Fortified ID Password Reset is started

Login to Fortified ID Portal using Fortified ID WEB as IdP

  1. Open a browser

    1. This is the address to Fortified ID Portal acting as a SAML SP

  2. Type the username and password of a user in your Active Directory.

    Note. Remember that we in config is using mail attribut as username. Verify that you user has a value in mail attribute.

  3. You will now be logged in to Fortified ID Portal

Login to Fortified ID Password Reset using Fortified ID WEB as IdP

  1. Open a browser

    1. This time, click the I have forgotten my password link

  2. You should now be redirect to Password Reset and then saml_idp2.

  3. Add the one-time password. Note. I use the FAKESmtp application local in the Fortified ID WEB server.

  4. You should now be logged into Password Reset

Complete config.json file of Fortified ID WEB

Other configuration and reference files will be found in the ZIP-file you downloaded.

Complete config.json file

{
    "globals": "@include:globals.json",
    "modules": [
        {
            "name": "CefEventModule",
            "config": {}
        },
        {
            "name": "HttpClient",
            "config": {
                "name": "default",
                "idle_timeout_ms": 5000,
                "connect_timeout_ms": 5000
            }
        },
        {
            "name": "LdapClient",
            "enabled": true,
            "instances": 1,
            "config": {
                "name": "${globals.ldap.ldap1.name}",
                "connection": {
                    "host": "${globals.ldap.ldap1.connection.host}",
                    "port": "${globals.ldap.ldap1.connection.port}",
                    "bind_dn": "${globals.ldap.ldap1.connection.bind_dn}",
                    "bind_password": "${globals.ldap.ldap1.connection.bind_password}",
                    "use_ssl": "${globals.ldap.ldap1.connection.use_ssl}",
                    "ssl_trust_all": "${globals.ldap.ldap1.connection.ssl_trust_all}"
                }
            }
        },
        {
            "name": "SmtpClient",
            "enabled": true,
            "config": {
                "name": "${globals.smtp.smtp1.name}",
                "host": "${globals.smtp.smtp1.host}",
                "port": "${globals.smtp.smtp1.port}",
                "user_name": "${globals.smtp.smtp1.user_name}",
                "password": "${globals.smtp.smtp1.password}",
                "auth_methods": "DIGEST-MD5, CRAM-SHA256, LOGIN"
            }
        },
        {
            "name": "SAML",
            "config": {
                "metadata_cache": "${globals.saml.generic.metadata_cache}",
                "http_port": "${globals.http.port}",
                "http_use_ssl": true,
                "http_keystore_ref": {
                    "type": "${globals.keystore.https.ref.type}",
                    "path": "${globals.keystore.https.ref.path}",
                    "password": "${globals.keystore.https.ref.password}"
                },
                "http_keystore_type": "${globals.keystore.https.type}",
                "http_key_alias": "${globals.keystore.https.http_key_alias}",
                "http_key_password": "${globals.keystore.https.http_key_password}",
                "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}"
                                }
                            }
                        ]
                    },
                    {
                        "id": "${globals.saml.idp2.metadata_id}",
                        "metadata_file_path": "${globals.saml.idp2.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/resources_internal/saml/sp_metadata_files/sp_portal.xml"
                    },
                    {
                        "path": "${globals.file_paths.base_dir}/config/resources_internal/saml/sp_metadata_files/sp_pwdreset.xml"
                    }
                ]
            }
        },
        {
            "name": "AuthN",
            "enabled": true,
            "config": {
                "context_path": "/authn",
                "webroot_dir": "web",
                "http_port": "${globals.http.port}",
                "http_use_ssl": true,
                "http_keystore_ref": {
                    "type": "${globals.keystore.https.ref.type}",
                    "path": "${globals.keystore.https.ref.path}",
                    "password": "${globals.keystore.https.ref.password}"
                },
                "http_keystore_type": "${globals.keystore.https.type}",
                "http_key_alias": "${globals.keystore.https.http_key_alias}",
                "http_key_password": "${globals.keystore.https.http_key_password}",
                "authenticators": [
                    {
                        "id": "idp_1",
                        "type": "SAMLIDP",
                        "config": {
                            "context_path": "/saml_idp1/authn/chain",
                            "base_path": "/saml_idp1/authn",
                            "expiry": "PT1S",
                            "force_re_auth": 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_Password_Reset"
                                    ],
                                    "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_Password_Reset"
                                }
                            ]
                        }
                    },
                    {
                        "id": "selector_root",
                        "type": "Selector",
                        "config": {
                            "base_path": "/saml_idp1/authn",
                            "webroot_dir": "web/authenticator/selector",
                            "auto_select": false,
                            "overlay_dirs": [
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/idp1/1_selector_root",
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/0_look_and_feel"
                            ],
                            "options": [
                                {
                                    "id": "1",
                                    "target": "uid_pwd_ldap",
                                    "label": "ldap_label",
                                    "logo": "assets/svg/microsoft.svg"
                                }
                            ]
                        }
                    },
                    {
                        "id": "uid_pwd_ldap",
                        "type": "UserNameAndPassword",
                        "config": {
                            "base_path": "/saml_idp1/authn",
                            "webroot_dir": "web/authenticator/username_password",
                            "cancel_location": "https://localhost:8446/pwdreset",
                            "overlay_dirs": [
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/idp1/2_main_username_password",
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/0_look_and_feel"
                            ],
                            "pipe_id": "Validate_Username_Password",
                            "exports": [
                                {
                                    "name": "used_auth",
                                    "value": "username_password_ldap"
                                },
                                {
                                    "name": "AuthnContextClassRef",
                                    "value": "urn:oasis:names:tc:SAML:2.0:ac:classes:Password"
                                }
                            ]
                        }
                    },
                    {
                        "id": "idp_2",
                        "type": "SAMLIDP",
                        "config": {
                            "context_path": "/saml_idp2/authn/chain",
                            "base_path": "/saml_idp2/authn",
                            "expiry": "PT1S",
                            "force_re_auth": false,
                            "idp": "${globals.saml.idp2.idp_entityid}",
                            "chain": [
                                {
                                    "id": "password_reset",
                                    "required": true
                                }
                            ],
                            "assertion_config": [
                                {
                                    "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_Password_Reset"
                                }
                            ]
                        }
                    },
                    {
                        "id": "password_reset",
                        "type": "Chain",
                        "config": {
                            "require_subject": false,
                            "_proceed_on_error": true,
                            "_failure_location": "http://www.sf.se",
                            "base_path": "/saml_idp2/authn",
                            "chain": [
                                {
                                    "id": "username_validator",
                                    "required": true
                                },
                                {
                                    "id": "otp_validator",
                                    "required": true
                                }
                            ]
                        }
                    },
                    {
                        "id": "username_validator",
                        "type": "UserLookup",
                        "config": {
                            "base_path": "/saml_idp2/authn",
                            "webroot_dir": "web/authenticator/user_lookup",
                            "allowed_retries": 0,
                            "pipe_id": "Validate_Username_and_generate_a_OTP",
                            "overlay_dirs": [
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/idp2/1_pwdreset_username_validation",
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/0_look_and_feel"
                            ],
                            "exports": [
                                {
                                    "name": "used_auth",
                                    "value": "username_lookup"
                                }
                            ]
                        }
                    },
                    {
                        "id": "otp_validator",
                        "type": "OTPValidator",
                        "config": {
                            "base_path": "/saml_idp2/authn",
                            "webroot_dir": "web/authenticator/otp_validation",
                            "_allowed_otp_retry": 2,
                            "pipe_id": "Validate_the_OTP",
                            "overlay_dirs": [
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/idp2/2_pwdreset_token_validation",
                                "${globals.file_paths.base_dir}/config/resources_external/overlays/0_look_and_feel"
                            ],
                            "exports": [
                                {
                                    "name": "AuthnContextClassRef",
                                    "value": "urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract"
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "name": "Pipes",
            "_info": "This is Pipes for IdP 1",
            "config": {
                "pipes": [
                    {
                        "id": "Validate_Username_Password",
                        "config": {
                            "valves": [
                                {
                                    "name": "DumpRequest",
                                    "config": {
                                        "label": "*** DumpRequest ***"
                                    }
                                },
                                {
                                    "name": "DumpExports",
                                    "config": {
                                        "label": "*** DumpExports ***"
                                    }
                                },
                                {
                                    "name": "LDAPSearch",
                                    "enabled": true,
                                    "config": {
                                        "destination": "${globals.ldap.ldap1.name}",
                                        "base_dn": "${globals.ldap.ldap1.connection.base_dn}",
                                        "scope": "SUB",
                                        "filter": "mail={{{request.identifier}}}",
                                        "attributes": [
                                            {
                                                "name": "mail",
                                                "multivalue": false
                                            }
                                        ]
                                    }
                                },
                                {
                                    "name": "LDAPBind",
                                    "enabled": true,
                                    "config": {
                                        "destination": "${globals.ldap.ldap1.name}",
                                        "dn": "{{{item.id}}}",
                                        "password": "{{{request.password}}}"
                                    }
                                },
                                {
                                    "name": "DumpState",
                                    "config": {
                                        "label": "*** DumpState ***"
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "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 == ('username_password_ldap')",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "mail={{{request.username}}}",
                                        "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": "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****"
                                    }
                                },
                                {
                                    "name": "DumpState",
                                    "config": {
                                        "label": "*** DumpState ***"
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "name": "Pipes",
            "_info": "This is Pipes for IdP 2",
            "config": {
                "pipes": [
                    {
                        "id": "Validate_Username_and_generate_a_OTP",
                        "config": {
                            "valves": [
                                {
                                    "name": "DumpRequest",
                                    "config": {
                                        "label": "*** DumpRequest ***"
                                    }
                                },
                                {
                                    "name": "DumpExports",
                                    "config": {
                                        "label": "*** DumpExports ***"
                                    }
                                },
                                {
                                    "name": "LDAPSearch",
                                    "enabled": true,
                                    "config": {
                                        "destination": "${globals.ldap.ldap1.name}",
                                        "base_dn": "${globals.ldap.ldap1.connection.base_dn}",
                                        "scope": "SUB",
                                        "filter": "mail={{{request.identifier}}}",
                                        "attributes": [
                                            {
                                                "name": "mail",
                                                "multivalue": false
                                            }
                                        ]
                                    }
                                },
                                {
                                    "name": "GenerateOtp",
                                    "enabled": true,
                                    "config": {
                                        "otp_length": 6,
                                        "alpha_numeric": false,
                                        "valid_time": 60,
                                        "dest_parameter": "generated_otp",
                                        "otp_parameter": "generated_otp_value"
                                    }
                                },
                                {
                                    "name": "ExportsPut",
                                    "enabled": true,
                                    "config": {
                                        "name": "generated_otp",
                                        "value": "{{{item.generated_otp}}}",
                                        "replace": true
                                    }
                                },
                                {
                                    "name": "SmtpSender",
                                    "enabled": true,
                                    "config": {
                                        "smtp_destination": "smtp01",
                                        "username_parameter": "{{{request.identifier}}}",
                                        "subject_parameter": "** Your verification code **",
                                        "message_template": "${globals.file_paths.base_dir}/config/resources_internal/mail_template/mail_template.txt",
                                        "mail_to_parameter": "{{{item.mail}}}",
                                        "mail_from_parameter": "noreply@mycompany.com",
                                        "_mail_cc_parameter": "admin@mycompany.com",
                                        "remove_prefixes": [
                                            "SMTP:",
                                            "sip:"
                                        ]
                                    }
                                },
                                {
                                    "name": "DumpState",
                                    "config": {
                                        "label": "*** DumpState ***"
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "id": "Validate_the_OTP",
                        "config": {
                            "valves": [
                                {
                                    "name": "DumpRequest",
                                    "config": {
                                        "label": "*** DumpRequest ***"
                                    }
                                },
                                {
                                    "name": "DumpExports",
                                    "config": {
                                        "label": "*** DumpExports ***"
                                    }
                                },
                                {
                                    "name": "ValidateOtp",
                                    "enabled": true,
                                    "config": {
                                        "username_parameter": "{{{exports.username}}}",
                                        "otp_parameter": "{{{request.otp}}}",
                                        "src_parameter": "{{{exports.generated_otp}}}"
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "id": "Retrieve_data_for_SAML_response_for_Password_Reset",
                        "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 == ('username_lookup')",
                                    "enabled": true,
                                    "config": {
                                        "name": "LDAP_search_filter",
                                        "value": "mail={{{request.username}}}",
                                        "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": "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": "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": "DumpState",
                                    "config": {
                                        "label": "*** DumpState ***"
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

Download the .

Browse to

You should be redirected to the Fortified ID WEB acting as SAML IdP and see the following Note. The IdP used for Portal is saml_idp1

Click Username & Password (LDAP), you should now see If you login you will be authenticated through saml_idp1. If you click "I have forgotten my password" you will be redirected to Password Reset that will redirect to saml_idp2 for authentication.

Browse to

You should see

After username verification you will be prompted with add a one-time password. Verify user mail client, I used FAKESmtp for an email with the one-time password.

USE_CASE.zip
https://localhost:8445/portal
https://localhost:8446/pwdreset