---
title: Similarity Based Password Validator
description: The Similarity Based Password Validator determines whether a proposed password is acceptable by measuring how similar it is to the user's current password.
component: pingds
version: 8.1
page_id: pingds:configref:objects-similarity-based-password-validator
canonical_url: https://docs.pingidentity.com/pingds/8.1/configref/objects-similarity-based-password-validator.html
section_ids:
  parent: Parent
  similarity_based_password_validator_properties: Similarity Based Password Validator properties
  basic_properties: Basic properties
  enabled: enabled
  min-password-difference: min-password-difference
  advanced_properties: Advanced properties
  java-class: java-class
---

# Similarity Based Password Validator

The Similarity Based Password Validator determines whether a proposed password is acceptable by measuring how similar it is to the user's current password.

In particular, it uses the Levenshtein Distance algorithm to determine the minimum number of changes (where a change may be inserting, deleting, or replacing a character) to transform one string into the other. It can be used to prevent users from making only minor changes to their current password when setting a new password. Note that for this password validator to be effective, it is necessary to have access to the user's current password. Therefore, if this password validator is to be enabled, the password-change-requires-current-password attribute in the password policy configuration must also be set to true.

## Parent

The Similarity Based Password Validator object inherits from [Password Validator](objects-password-validator.html).

## Similarity Based Password Validator properties

You can use configuration expressions to set property values at startup time. For details, see [Property value substitution](expressions.html).

| Basic Properties                                                        | Advanced Properties       |
| ----------------------------------------------------------------------- | ------------------------- |
| [enabled](#enabled) [min-password-difference](#min-password-difference) | [java-class](#java-class) |

### Basic properties

Use the `--advanced` option to access advanced properties.

### enabled

|                         |                                                              |
| ----------------------- | ------------------------------------------------------------ |
| *Synopsis*              | Indicates whether the password validator is enabled for use. |
| *Default value*         | None                                                         |
| *Allowed values*        | truefalse                                                    |
| *Multi-valued*          | No                                                           |
| *Required*              | Yes                                                          |
| *Admin action required* | None                                                         |
| *Advanced*              | No                                                           |
| *Read-only*             | No                                                           |

### min-password-difference

|                         |                                                                               |
| ----------------------- | ----------------------------------------------------------------------------- |
| *Synopsis*              | Specifies the minimum difference of new and old password.                     |
| *Description*           | A value of zero indicates that no difference between passwords is acceptable. |
| *Default value*         | None                                                                          |
| *Allowed values*        | An integer.Lower limit: 0.Upper limit: 2147483647.                            |
| *Multi-valued*          | No                                                                            |
| *Required*              | Yes                                                                           |
| *Admin action required* | None                                                                          |
| *Advanced*              | No                                                                            |
| *Read-only*             | No                                                                            |

## Advanced properties

Use the `--advanced` option to access advanced properties.

### java-class

|                         |                                                                                                           |
| ----------------------- | --------------------------------------------------------------------------------------------------------- |
| *Synopsis*              | Specifies the fully-qualified name of the Java class that provides the password validator implementation. |
| *Default value*         | org.opends.server.extensions.SimilarityBasedPasswordValidator                                             |
| *Allowed values*        | A Java class that extends or implements:- org.opends.server.api.PasswordValidator                         |
| *Multi-valued*          | No                                                                                                        |
| *Required*              | Yes                                                                                                       |
| *Admin action required* | The object must be disabled and re-enabled for changes to take effect.                                    |
| *Advanced*              | Yes                                                                                                       |
| *Read-only*             | No                                                                                                        |
