Customize Password Complexity Rules
You can customize the password complexity using server scripting (automation scripts) by following two steps:
Step 1. Add a specific secret in Vault:
Add the following secret in Vault in order to provide the name of the automation script name which configures the password complexity.
| Key Path | Key Name | Key Value |
|---|---|---|
| kv/<environment>/<application>/app-settings | ResetPasswordRulesWorkflowName | WorkflowName |
If you do not provide the name of the automation script for password complexity customization, the system will search for an on-demand automation server script named “FTOS_ResetPasswordRules”.
On the server where the FintechOS Platform installation package resides, add in the web.config file:
<app-settings>
<add key="ResetPasswordRulesWorkflowName" value="WorkflowName"/>
...
</app-settings>
Step 2. Create FTOS_ResetPasswordRules on-demand automation script
The server automation script offers customization based on password content and associated user and roles.
For information on how create an on-demand server automation script. For information on how to create an on-demand server automation scripts, see the FintechOS Studio User Guide, section Creating On-demand Server Automation Scripts.
var password = ftos.context.values["password"];
if (password.match(/z/))
throwException("Password contains letter z");Context contains two keys in the Values property:
- password
- user, which contains a JSON similar to:
{
"UserName" : "user1",
"BusinessUnitId" : "guid",
"DisplayName" : "user display name",
"Email" : "user email",
"ExternalId" : "guid",
"OrganizationId" : "guid"
"Roles" :
[
{
"SecurityRoleId" : "guid",
"Name" : "role name 1"
},
{
"SecurityRoleId" : "guid",
"Name" : "role name 2"
},
]
}