Select a documentation version: <button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">15.13.0</button>

- [Current (18.4.0)](https://docs.cloud.google.com/alloydb/omni/containers/current/docs/reference/password-policy-flags.md.txt)
- [18.4.0](https://docs.cloud.google.com/alloydb/omni/containers/18.4.0/docs/reference/password-policy-flags.md.txt)
- [18.3.0](https://docs.cloud.google.com/alloydb/omni/containers/18.3.0/docs/reference/password-policy-flags.md.txt)
- [18.1.0](https://docs.cloud.google.com/alloydb/omni/containers/18.1.0/docs/reference/password-policy-flags.md.txt)
- [17.10.0](https://docs.cloud.google.com/alloydb/omni/containers/17.10.0/docs/reference/password-policy-flags.md.txt)
- [17.9.0](https://docs.cloud.google.com/alloydb/omni/containers/17.9.0/docs/reference/password-policy-flags.md.txt)
- [17.7.0](https://docs.cloud.google.com/alloydb/omni/containers/17.7.0/docs/reference/password-policy-flags.md.txt)
- [17.5.0](https://docs.cloud.google.com/alloydb/omni/containers/17.5.0/docs/reference/password-policy-flags.md.txt)
- [16.14.0](https://docs.cloud.google.com/alloydb/omni/containers/16.14.0/docs/reference/password-policy-flags.md.txt)
- [16.13.0](https://docs.cloud.google.com/alloydb/omni/containers/16.13.0/docs/reference/password-policy-flags.md.txt)
- [16.11.0](https://docs.cloud.google.com/alloydb/omni/containers/16.11.0/docs/reference/password-policy-flags.md.txt)
- [16.9.0](https://docs.cloud.google.com/alloydb/omni/containers/16.9.0/docs/reference/password-policy-flags.md.txt)
- [16.8.0](https://docs.cloud.google.com/alloydb/omni/containers/16.8.0/docs/reference/password-policy-flags.md.txt)
- [16.3.0](https://docs.cloud.google.com/alloydb/omni/containers/16.3.0/docs/reference/password-policy-flags.md.txt)
- [15.18.0](https://docs.cloud.google.com/alloydb/omni/containers/15.18.0/docs/reference/password-policy-flags.md.txt)
- [15.17.0](https://docs.cloud.google.com/alloydb/omni/containers/15.17.0/docs/reference/password-policy-flags.md.txt)
- [15.15.0](https://docs.cloud.google.com/alloydb/omni/containers/15.15.0/docs/reference/password-policy-flags.md.txt)
- [15.13.0](https://docs.cloud.google.com/alloydb/omni/containers/15.13.0/docs/reference/password-policy-flags.md.txt)
- [15.12.0](https://docs.cloud.google.com/alloydb/omni/containers/15.12.0/docs/reference/password-policy-flags.md.txt)
- [15.7.1](https://docs.cloud.google.com/alloydb/omni/containers/15.7.1/docs/reference/password-policy-flags.md.txt)
- [15.7.0](https://docs.cloud.google.com/alloydb/omni/containers/15.7.0/docs/reference/password-policy-flags.md.txt)

<br />

This page describes the database flags that AlloyDB for PostgreSQL uses to enforce a set of restrictions specific to their [password policy](https://docs.cloud.google.com/alloydb/docs/manage-password-policy). For a list of all database flags that AlloyDB supports, see [Supported database flags](https://docs.cloud.google.com/alloydb/docs/reference/database-flags.md.txt).

<br />

## `password.enforce_password_does_not_contain_username`

|---|---|
| Type | `Boolean` |
| Default | `OFF` |
| Instance restarts | No |

If `on`, prohibits using a username as part of a password. This password policy
is case sensitive, so if a username is `Alex`, then a password that contains
`alex` is allowed.

## `password.enforce_expiration`

|---|---|
| Type | `Boolean` |
| Default | `OFF` |
| Instance restarts | No |

Manages a lifetime of a password.

## `password.enforce_complexity`

|---|---|
| Type | `Boolean` |
| Default | `OFF` |
| Instance restarts | No |

Enforces the password complexity policy when new passwords must meet the guidelines specified by other password flags.

## `password.expiration_in_days`

|---|---|
| Type | `Integer` |
| Default | `90` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Requires passwords to be changed within the specified number of days.

## `password.min_uppercase_letters`

|---|---|
| Type | `Integer` |
| Default | `0` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the minimum number of uppercase letters for a password.

## `password.max_uppercase_letters`

|---|---|
| Type | `Integer` |
| Default | `10000` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the maximum number of uppercase letters for a password.

## `password.min_lowercase_letters`

|---|---|
| Type | `Integer` |
| Default | `0` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the minimum number of lowercase letters for a password.

## `password.max_lowercase_letters`

|---|---|
| Type | `Integer` |
| Default | `10000` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the maximum number of lowercase letters for a password.

## `password.min_numerical_chars`

|---|---|
| Type | `Integer` |
| Default | `0` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the minimum number of numerical characters for a password.

## `password.max_numerical_chars`

|---|---|
| Type | `Integer` |
| Default | `10000` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the maximum number of numerical characters for a password.

## `password.min_special_chars`

|---|---|
| Type | `Integer` |
| Default | `0` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the minimum number of special characters for a password.

## `password.max_special_chars`

|---|---|
| Type | `Integer` |
| Default | `10000` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the maximum number of special characters for a password.

## `password.min_pass_length`

|---|---|
| Type | `Integer` |
| Default | `0` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Specifies the minimum number of characters allowed in a password.

## `password.max_pass_length`

|---|---|
| Type | `Integer` |
| Default | `10000` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the maximum number of characters allowed in a password.

## `password.notify_expiration_in_days`

|---|---|
| Type | `Integer` |
| Default | `30` |
| Valid values | `0 ... 10000` |
| Instance restarts | No |

Sets the number of days when a user starts receiving notifications that their password is about to expire.