Customize the Hashing Algorithm
If it is necessary to use a more secure hash algorithm, you can provide your own implementation. You can do this by implementing thePasswordEncryptor interface from the org.camunda.bpm.engine.impl.digest package. The interface ensures that all necessary functions for password hashing are implemented. You can have a look at the classes Base64EncodedHashDigest and ShaHashDigest from the org.camunda.bpm.engine.impl.digest package to see how this is done in ASEE Flow. A template for your own implementation could look as follows:
passwordEncryptor property to your custom implementation, e.g., MyPasswordEncryptor. See Process Engine Bootstrapping on where you have to set the property for your ASEE Flow environment.
Note that, even if you have already users created with passwords hashed by other algorithms, e.g., old custom algorithms or the ASEE Flow default hash algorithm SHA-512, they can still automatically be resolved by the engine although you have added your custom algorithm afterwards. The property customPasswordChecker is a list of hashing algorithms to be used to check (older) passwords. The ASEE Flow default hashing algorithms are automatically added, so please only add your previous custom passwordEncryptor implementation to that list.
Heads Up!Please do not use your own implementation of a hash function, but rather a standard that has been peer reviewed!
Customize the Salt generation
Similar to the hashing algorithm, the salt generation can be adjusted. First, implement theSaltGenerator interface from the org.camunda.bpm.engine.impl.digest. This ensures that all necessary functions are implemented. You can have a look at the classes Base64EncodedSaltGenerator and Default16ByteSaltGenerator from the org.camunda.bpm.engine.impl.digest package to see how this is done in ASEE Flow. A template for your own implementation could look as follows:
saltGenerator property to your custom implementation, e.g., MyCustomSaltGenerator. See Process Engine Bootstrapping on where you have to set the property for your ASEE Flow environment.