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
  • Using the bundled tool
  • Enabling local decryption
  • Requirement
  1. Misc

Encrypt configuration secrets

PreviousCommon configurationNextMicrosoft Entra

Last updated 1 month ago

Data stored in the configuration file (config.json) can be protected by replacing the clear text value with an encrypted value. Decryption is made by the system at startup using the configured decryption key.

Encryption can be done either by using the tool provided on this page or by using another tool that are supporting AES encryption, open ssl for instance. This will describe using tool from Fortified ID.

Using the bundled tool

Download and unzip.

Encrypt by executing:

java -jar encryptor-2.0.1.jar -key the_enc_key -operation encrypt -data secret -type local/localgcm -keysize 256

Output will yield an encrypted value.

Decrypt by executing:

java -jar encryptor-2.0.1.jar -key the_enc_key -operation decrypt -data lILFU5AHjVlq0G3coczRY10f1SaAt4q/Ln+rE6i00l/rYHP+dUA= -type local/localgcm -keysize 256

Output will yield a decrypted value.

Replace the plaintext value in the config.json file with the encrypted value using the format for an encrypted value. Format of encrypted value "${secrets.replace_with_encrypted_value}", replace "replace_with_encrypted_value" with the encrypted value you got using the tool. Example of an encrypted value ${secrets.lILFU5AHjVlq0G3coczRY10f1SaAt4q/Ln+rE6i00l/rYHP+dUA=}"

The value "secret" is replaced by the encrypted value in the example.

{
  "my_protected_data":"secret"
}

{
  "my_protected_data":"${secrets.lILFU5AHjVlq0G3coczRY10f1SaAt4q/Ln+rE6i00l/rYHP+dUA=}"
}

Enabling local decryption

Add environment variables:

# Enable built in 'local' impl 
FORTIFIED_SECRETS_IMPL=local

# Enable built in 'localgcm' impl this will only work on versions 3.1.0 and later
FORTIFIED_SECRETS_IMPL=localgcm

# AES secret
FORTIFIED_SECRETS_SECRET=the_enc_key

If using localgcm, the secret key must be of hex-format and correct key size. A 256-bit AES GCM key must consist of 64 hex characters.

For Windows: System Properties > Advanced tab > Environment Variables > System variables

Ensure the system used supports local or localgcm decryption. Product versions earlier than 3.1.0 will not be able to handle localgcm encryption.

Requirement

JAVA 17 is installed and in the path when executing the command.

204KB
encryptor-2.0.1.zip
archive