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
  • Create
  • Edit
  • Read (lookup)
  1. Misc

Protect sensitive data, such as social security numbers, through obfuscation

Sensitive identity data, such as social security numbers, must be managed with respect for personal integrity and in compliance with national regulations. Such data should never be stored in plain text.

This document outlines how to create, edit, and read obfuscated ("hashed") social security number values. The functionality is pipes-based and can be used across all Fortified ID products. The same approach may be applied to other types of sensitive identity data, excluding passwords.

Create

Add these valves to the pipe responsible for creating the identity object.

In the example below, Entra ID serves as the user store, with the scrambled value saved in the user attribute faxNumber. The user has authenticated via BankID, resulting in the export variable personalNumber containing the user’s social security number.

Adjust the final valve to match your user store, attribute name, or other specific properties as needed.

  {
        "name": "CreateItem",
        "config": {
            "id": "temp_for_pnr",
            "properties": {
                "personalNumber": "{{{exports.personalNumber}}}"
            }
        }
    },
    {
        "name": "ItemPropertyHash",
        "config": {
            "name": "hash_personalNumber",
            "value": "${item.personalNumber}",
            "algorithm": "sha-1"
        }
    },
    {
        "name": "EntraIDCreateUser",
        "config": {
            "namespace": "${globals.EntraID.tenant1.namespace}",
            "ignore_error": false,
            "id_property": "id",
            "create_request_template": {
              .

                "faxNumber": "{{{item.hash_personalNumber}}}",
              .

            }
        }
    }

Edit

Add these valves to the pipe responsible for editing the identity object.

In the example below, Entra ID serves as the user store, with the scrambled value saved in the user attribute faxNumber. The user has authenticated via BankID, resulting in the export variable personalNumber containing the user’s social security number.

Adjust the final valve to match your user store, attribute name, or other specific properties as needed.

  {
        "name": "CreateItem",
        "config": {
            "id": "temp_for_pnr",
            "properties": {
                "personalNumber": "{{{exports.personalNumber}}}"
            }
        }
    },
    {
        "name": "ItemPropertyHash",
        "config": {
            "name": "hash_personalNumber",
            "value": "${item.personalNumber}",
            "algorithm": "sha-1"
        }
    },
    {
        "name": "EntraIDUpdateUser",
        "config": {
            "namespace": "${globals.EntraID.tenant1.namespace}",
            "ignore_error": false,
            "user_id": "{{{session.entra_identifier}}}",
            "request_template": {
              .

                "faxNumber": "{{{item.hash_personalNumber}}}",
              .

            }
        }
    }

Read (lookup)

Add these valves to the pipe responsible for reading the identity object.

In the example below, Entra ID serves as the user store, with the scrambled value saved in the user attribute faxNumber. The user has authenticated via BankID, resulting in the export variable personalNumber containing the user’s social security number.

Adjust the final valve to match your user store, attribute name, or other specific properties as needed.

  {
        "name": "CreateItem",
        "config": {
            "id": "temp_for_pnr",
            "properties": {
                "personalNumber": "{{{exports.personalNumber}}}"
            }
        }
    },
    {
        "name": "ItemPropertyHash",
        "config": {
            "name": "hash_personalNumber",
            "value": "${item.personalNumber}",
            "algorithm": "sha-1"
        }
    },
   {
        "name": "ExportsPut",
        "enabled": true,
        "config": {
            "name": "hash_personalNumber",
            "value": "{{{item.hash_personalNumber}}}",
            "replace": true
        }
     },
     {
        "name": "RemoveItems",
        "config": {}
     },
     {
        "name": "EntraIDListUsers",
        "config": {
            "namespace": "${globals.EntraID.tenant1.namespace}",
            "filter": "startsWith(faxNumber,'{{{exports.hash_personalNumber}}}')",
            "select": "displayName,givenName,surname,mail,userPrincipalName",
            "id_property": "id"
        }
     }
PreviousHTTPSNextReverse proxy

Last updated 6 months ago