Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed typo



Password hashes stored directly in Smart ID Identity Manager for CoreObject users and internal users are affected by the changed default algorithm.


Configure user password hashing

titleCustomize Argon2id password hashing

Smart ID Identity Manger Manager uses Argon2id to hash user passwords, which provides higher resistance against GPU-based attacks by being memory-hard.


Memory-hardness refers to the property that hashing a password will consistently demand a specific pre-defined quantity of memory. This memory requirement significantly limits the extent to which hash calculations can be concurrently processed on GPUs, devices that typically excel in such computational tasks.

You can customize several algorithm parameters to balance security with resource consumption (CPU/memory). The default values are chosen based on the defaults of Spring-Security 5.8+ and recommendations by the Open Worldwide Application Security Project (OWASP), as of end of August 2023, with some differences:

ParameterIdentity Manager defaultNotes
salt length16 bytesSpring default, according to the Argon2 spec sufficient for all applications.
hash length / tag length32 bytesSpring default, twice of what the Argon2 spec considers sufficient for most applications.

Threads/lanes used during a single hashing operation.

Servers should stick to a value of 1. For more information, see this post by Steve Thomas from OWASP. Furthermore, Spring-Security's underlying implementation in BouncyCastle is single-threaded, so higher values would only favor an attacker.


Keep the default value.

memory7.168 KiBMemory required per password hashing/verification (here: ~146 concurrent operations per 1 GiB of memory). Higher values can slow down the operation slightly, a side-effect of managing more memory.

Higher values slow down the hashing/verification and increases the CPU usage.

Doubled OWASP recommendation, as the Argon2 values given correspond to a BCrypt work factor of only ~9. For more information, see this post by Steve Thomas from OWASP. The login speed is still faster than BCrypt, at least using the Spring-Security implementations.


If you adjust the parameters, only newly created password hashes are affected. Existing password hashes use the parameters that they were created with.

To avoid having the system run out of memory or the CPU being overloaded, tune the settings for your hardware environment before going productive. For example, if the system has a lot of RAM but few CPU cores, you can increase the memory requirement while reducing iterations. OWASP provides several examples of settings that offer equivalent security while having different CPU- and memory-requirements.

Even if most of the users in your Identity Manager service log in via other methods than username and password (for example, SAML or certificates), there can be internal users with username and password that may be used by external services to log into Identity Manager, for example, for callbacks.

titleConfigure Docker-based deployments
  1. Open the following files:
    • docker\compose\identitymanager\admin\docker-compose.yml
    • docker\compose\identitymanager\operator\docker-compose.yml
    • docker\compose\identitymanager\tenant\docker-compose.yml
  2. Define SYSTEM_PROPERTIES with the desired values in theenvironment section of the files, for example:
Code Block
          "argon2PwEncoderFactory.saltLength ": "16",
          "argon2PwEncoderFactory.hashLength": "32",
          "argon2PwEncoderFactory.parallelism": "1",
          "argon2PwEncoderFactory.memory": "19456",
          "argon2PwEncoderFactory.iterations": "4",
...other properties...
...other env vars...

titleConfigure WAR file deployment
  • Edit WEB-INF\classes\ in your Identity Manager Admin, Operator, or Tenant web applications and set the desired values, for example:

Code Block
argon2PwEncoderFactory.saltLength = 16
argon2PwEncoderFactory.hashLength = 32
argon2PwEncoderFactory.parallelism = 1
argon2PwEncoderFactory.memory = 19456
argon2PwEncoderFactory.iterations = 4