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

# Secure cluster configuration

Apply these measures after the cluster is installed and after each update. You apply measures 1–3 in the Center web interface, and the fourth in the data center network and in the management VM deployment settings, which vStack support changes. Each step links to detailed instructions for its measure.

## Before you begin

- You need the **Cluster master** role: by default, only this role changes the security policy, sign-in restrictions, roles and security event log settings. You can grant the **Edit Security Settings** and **Assign User Role** privileges to a custom role — grant them only to security administrators.
- An employee who reviews the security event log is designated. This employee needs their own account, separate from the accounts with the **Cluster master** role.
- If the cluster must meet the requirements of the FSTEC of Russia (Federal Service for Technical and Export Control), contact your vStack account manager: the compliance description is available in Russian.

## 1. Tighten sign-in

1. In the left menu, select **Settings**.

2. Check the values in the **Security policy** block; how to change them — [Set the security policy: passwords and sessions](/hcp/3.3/en/users/set-security-policy/index.md). Recommended values:

   - **Min password length** — at least 8;
   - **Max failed login attempts** — at most 4;
   - **Uppercase required**, **Lowercase required**, **Digits required** and **Special chars required** — on.

   This is how the policy is configured after installation. The password length and the number of attempts are the minimum FSTEC of Russia requirements for protection class 4. Do not set values weaker than the recommended ones, and check them after each change.

3. Restrict the addresses users work from — [Restrict sign-in by address (CIDR) and virtual host](/hcp/3.3/en/users/restrict-user-access/index.md). CIDR is a subnet notation like `192.0.2.0/24`; while a user has no subnets, they can work from any address. Start with the accounts that have the **Cluster master** role. For your own account, add the subnet you are working from now as the first one: Center checks the address on every request, and without this subnet you lose access immediately.

## 2. Grant the least privileges

1. Instead of the **Cluster master** role, assign roles that apply only in the selected virtual data centers (VDCs): **VDC admin**, **VDC user**, **VDC viewer** or **Vm Developer** — [Assign roles within a VDC](/hcp/3.3/en/vdcs/assign-vdc-roles/index.md).
2. Assign the **Security Admin** role to the account that reviews the security event log — [Assign a role](/hcp/3.3/en/users/assign-role/index.md). Do not combine it with the **Cluster master** role in one account: otherwise the auditor can change what they audit.
3. If no built-in role fits, create your own with only the privileges you need — [Create a custom role](/hcp/3.3/en/users/create-role/index.md). Do not add **View Security Log** and **Export Security Log** to it unless necessary: the log shows the actions of all cluster users.
4. Check who gets which privileges against the [Roles and privileges](/hcp/3.3/en/reference/roles-privileges/index.md) reference.

## 3. Turn on security event log monitoring

1. In the left menu, select **Security Event Log**.
2. On the **Current events** tab, make sure that the **Autoarchiving** switch is on — [View the security event log and archive](/hcp/3.3/en/observability/security-log/index.md). It is on after installation. Without autoarchiving, the log grows without limit, and no archives are created.
3. Click **Verify integrity**. Center checks the chain of log records and shows whether anyone has changed the records.
4. Select **Actions** → **Notification settings** and turn on emails about important events — [Receive log events by email](/hcp/3.3/en/observability/security-log-email/index.md). Emails are off after installation. Emails are sent only if a mail server with STARTTLS or TLS is set for Center.

## 4. Restrict network access

1. Separate the service segments of the cluster — the cluster network, the storage network and the isolated networks segment — into VLANs that are not routed to user networks.
2. Open port 443 of the management VM only to the networks of administrators and of systems that work through the API: set the `api_fw` (API and image upload from a file) and `wss_fw` (VM console) lists of the web server, and turn on the management VM firewall (`pf_enabled`) with the administrator networks in `pf_admin_nets`. These parameters are set in the management VM deployment settings, and vStack support changes them. In 3.3, port 443 has no other entry points besides the web interface, the API, the VM console and image upload: Grafana is removed.

3) Allow SSH to the nodes and the management VM only from administrator workstations.
4) Time servers, DNS, the update repository mirror and the KMS server for Windows virtual machines (VMs): after installation, the cluster uses default addresses (public NTP pools, the vStack repository); set your own — vStack support does this during installation. You set your own node update mirror with the `--repo-url` option of the update script — [Update nodes to 3.2.6](/hcp/3.3/en/upgrade/update-nodes/index.md).
5) Change the `superadmin` password at the first sign-in.

The full list of ports and connections — [Network ports and connections](/hcp/3.3/en/security/network-ports/index.md).

## Check the result

- **Settings** → **Security policy** shows the values from the "Tighten sign-in" stage.
- On the **Security Event Log** page, next to **Last verify integrity**, you see the check time, a success icon and the number of checked records.

If the chain of records is broken, "ID:" and the record number are shown instead of the number of records. Click it to open the record where the check found the violation, and review it with the security administrator.

## Next

- [Roles and access](/hcp/3.3/en/users/index.md) — how roles and scopes work.
- [Roles and privileges](/hcp/3.3/en/reference/roles-privileges/index.md) — all roles and privileges.
- [Network ports and connections](/hcp/3.3/en/security/network-ports/index.md) — network services and connection directions.

API methods: `auth-security-settings-set`, `user-remote-add`, `user-role-assign`, `role-create`, `security-event-archive-settings-set`, `security-event-log-verify`, `security-event-notify-settings-set` — in the [API reference](/hcp/3.3/en/api/methods/index.md).
