Skip to content

Commit

Permalink
docs: alignments and format
Browse files Browse the repository at this point in the history
Signed-off-by: ossdhaval <343411+ossdhaval@users.noreply.github.com>
  • Loading branch information
ossdhaval committed Apr 29, 2024
1 parent 4e83da1 commit 29b441d
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions docs/admin/config-guide/user-password-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,25 @@ By default, the password attribute validation is not enabled.
```

3. Update `/tmp/patch.json` with user password validation details
- Enter a valid regex expression to check the strength of the password.
- Enter **Minimum length**, the minimum length of a value associated with this attribute.
- Enter **Maximum length**, the maximum length of a value associated with this attribute.
Following is the example of having `userPassword` with minimum 8 characters, maximum 20 characters and should be alphanumeric with special characters.
Example

```shell
[{
"op": "add",
"path": "/attributeValidation",
"value": {
"minLength": 5,
"maxLength":15,
"regexp": "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#&()–[{}]:;',?/*~$^+=<>]).{8,20}$"
}
}]
```
- Enter a valid regex expression to check the strength of the password.
- Enter **Minimum length**, the minimum length of a value associated with
this attribute.
- Enter **Maximum length**, the maximum length of a value associated with
this attribute.
Following is the example of having `userPassword` with minimum 8 characters,
maximum 20 characters and should be alphanumeric with special characters.
```shell
[{
"op": "add",
"path": "/attributeValidation",
"value": {
"minLength": 5,
"maxLength":15,
"regexp": "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#&()–[{}]:;',?/*~$^+=<>]).{8,20}$"
}
}]
```

4. Execute patch operation for `userPassword` attribute.
```shell
Expand All @@ -50,11 +52,13 @@ By default, the password attribute validation is not enabled.

5. Create a new user using `post-user` operation.

6. An error notification will be displayed if the password does not match the validation criteria.
6. An error notification will be displayed if the password does not match the
validation criteria.


## Enable user password validation through Jans Text UI (TUI)
1.When using [Janssen Text-based UI(TUI)](../../config-guide/config-tools/jans-tui/README.md) to configure `userPassword` attribute validation , navigate via

1. When using [Janssen Text-based UI(TUI)](../../config-guide/config-tools/jans-tui/README.md) to configure `userPassword` attribute validation , navigate via
`Auth Server`->`Attributes`->search for `userPassword` attribute->open the attribute details->enable `Enable Custom Validation` field-> Enter a value for `Regular expression`, `Minimum Length` & `Maximum Length` fields->Save
![update default authentication method](../../assets/image-pwd-enable-custom-validation.png)

Expand All @@ -64,6 +68,7 @@ By default, the password attribute validation is not enabled.


## Enable user password validation through Jans Config API

1. Obtain the access token
```shell
curl -k -u "<put_client_id_here>:<put_config_api_client_secret_here>" https://<your.jans.server>/jans-auth/restv1/token \
Expand Down

0 comments on commit 29b441d

Please sign in to comment.