> Documentation index for agents: /hcp/3.3/en/llms.txt

# Set the security policy: passwords and sessions

There is one security policy per cluster: the password requirements and the lockout after failed sign-ins apply to all users. Set it before you issue passwords to users.

## Before you begin

- You need the **Cluster master** role.
- You have decided which values you need. Parameters and default values:

| Parameter | Default | What it sets |
| - | - | - |
| **Max failed login attempts** | 4 | after this many failed attempts within the window, the account is locked |
| **Failed attempts window (min)** | 30 | for how many minutes from the first failed attempt Center counts the next ones |
| **Lockout duration (min)** | 30 | how many minutes the lockout lasts; `0` — until manual unlock |
| **Min password length** | 8 | the minimum password length |
| **Uppercase required** | on | the password contains a Latin letter A–Z |
| **Lowercase required** | on | the password contains a Latin letter a–z |
| **Digits required** | on | the password contains a digit |
| **Special chars required** | on | the password contains a character other than Latin letters and digits |

Always, regardless of the policy: the password contains no spaces and does not repeat the user name, in any letter case.

## Set the parameters

1. In the left menu, select **Settings**. The **Settings** page opens with the **Security policy** section.

   When **Lockout duration (min)** is `0`, only a **Cluster master** can unlock a locked account. Create a second user with the **Cluster master** role so that the lockout of one user does not leave the cluster without access.

2. Click the parameter row in the table. The parameter panel opens on the right.

3. Enter the new value in the **Values** field. A password requirement has a switch instead of a field: turn it on or off.

4. Click **Save** at the bottom of the panel. The web interface shows **Security settings saved**.

5. Repeat steps 2–4 for each parameter you need to change.

## Check the result

The **Values** column shows the new values. For password requirements, it shows **Yes** or **No**.

Center checks the password requirements when a password is set or changed: existing passwords keep working. New lockout rules apply to the next failed sign-in attempts.

## More

- **Sessions.** The session lifetime is not configurable: Center ends a session after 10 hours without requests.
- **New password from an administrator.** When a **Cluster master** sets a password for another user, all sessions of that user end, and at the next sign-in the web interface asks the user to change the password — [Create a user and set a password](/hcp/3.3/en/users/create-user/index.md).
- **Locked user.** The **Status** column on the **Users** tab shows **Blocked** for this user. The **Unlock** button in the heading of the user page removes the lockout and resets the counter. The **Failed attempts** field in the **Security policy** section of the user page shows the number of failed attempts.

## Next

- [Restrict sign-in by address (CIDR) and virtual host](/hcp/3.3/en/users/restrict-user-access/index.md)
- [View the security event log and archive](/hcp/3.3/en/observability/security-log/index.md)
- [Secure cluster configuration](/hcp/3.3/en/security/hardening/index.md)
- [Roles and access](/hcp/3.3/en/users/index.md)

API methods: `auth-security-settings-get`, `auth-security-settings-set`, `user-unlock` — in the [API reference](/hcp/3.3/en/api/methods/index.md).
