> Source: https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/PasswordVault/

# Password vault

A vault **alias** ties a short name to the credentials of an account: the platform's applications refer to it to open a session without the user knowing the password, and the vault can rotate that password on their behalf. This page covers the modules that manage those aliases: **Password vault**, and the screen of the external vaults, **Password Vault (Keeper Security)**, **Vault (LockSelf)** and **Vault (Bitwarden)**.

What the **Password vault** module offers depends on the **password vault mode** set in the [general options](https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/GeneralOptions/). Only one mode is active at a time:

| Mode | Who holds the secret, and who rotates it |
|---|---|
| **Embedded** | The platform itself. Rotation is driven by the [password policies](https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/PasswordPolicies/) declared in the console. |
| **Systancia Access** | An external **Systancia Access server**. Rotation is delegated to the **Systancia Access agents** deployed on the workstations. |
| **Keeper Security**, **LockSelf**, **Bitwarden** | An external vault, read by the platform and browsed by its own screen (section [External vaults](#external-vaults)). No rotation is carried by the platform. |

> **An alias stays tied to the mode that created it**
>
> After a mode change, the aliases created in the previous mode remain **visible** and can be **deleted**, but no longer **edited**: editing them is only possible in the mode they were created in.

---

## Password vault in "Embedded" mode

### Vault access configuration

The **Configuration** toolbar button opens the **Safe access configuration** window. In Embedded mode it serves to move the storage of secrets onto a remote database, in the **Remote database** box.

| Field | Description |
|---|---|
| **Database type** | Target engine. `postgresql` by default. |
| **Server** | Host name or address of the database server. |
| **Port** | Listening port, between 0 and 65535. |
| **Username** / **Password** | Credentials to connect to the database. |
| **SSL usage** | SSL mode of the connection. `verify-full` by default. |
| **Certificate authority (base64)** | File of the authority that signed the server certificate, to be uploaded. |
| **Site** | Site used to reach the database server. |

On failure, a **Connection test** box appears in the window and details the outcome.

> **Switching database: two decisions to make**
>
> Pointing at another database opens the **Database switch settings** window, which offers **Create the new database** and **Transfer existing data in the new database**. Without the transfer, the aliases already declared do not follow.

### Add an alias

The **+** button opens the **Add alias** window. The **Type** field drives the rest of the form.

| Common field | Description |
|---|---|
| **Alias** | Mandatory. Forced to lower case. The `@ , < & > "` characters are rejected. |
| **Type** | **LDAP password** (selected by default), **SSH key** or **SSH password**. |
| **Domain** | Domain of the account. Disabled for both SSH types. Special characters are rejected. |
| **Username** | Mandatory. Name of the target account. The `\` character is rejected. |
| **Password** / **Confirmation** | Mandatory, except for the **SSH key** type. Both values must match. |
| **Policy** | In the **Password rotation** box: rotation policy applied to that alias. Mandatory, `DefaultPolicy` by default. See [Password policies](https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/PasswordPolicies/). |

**LDAP password**

> Type selected by default. No extra field.

**SSH key**

> | Field | Description |
> |---|---|
> | **SSH key** | File of the private key to store. Its content must start with `-----BEGIN ... PRIVATE KEY-----`, or be in PuTTY format (`PuTTY-User-Key-File-`). |
> | **Password** | Passphrase of the key. Optional if the key is not encrypted. |
> | *(SSH applications)* | Two drag-and-drop lists, available and selected, fed by the SSH applications already declared. When there is none, the list displays **No SSH application**. |
>
> > **Two conditions to know about**
> >
> > The SSH applications must have been **declared beforehand** to appear here. And an SSH key is not compatible with a **standard** SSH application: selecting one causes validation to be refused.

**SSH password**

> | Field | Description |
> |---|---|
> | *(SSH applications)* | Same drag-and-drop lists as for the SSH key. |

### Edit an alias

Select the alias and click the **Properties** icon, or double-click the row: the **Edit alias** window opens. The **Alias** field becomes plain displayed text. Only aliases created in Embedded mode are edited here.

#### Display the current password

The **Display current password** button retrieves the password held by the vault.

| Situation | Behaviour |
|---|---|
| Displaying passwords is refused in the general options | The button does not appear. |
| The alias is not associated with an enabled policy | The button is inactive. |
| No rotation has taken place yet | A message states the password is unknown. |
| A password is available | After confirmation it appears next to the button; clicking again hides it. |

> **Displaying the password triggers its rotation**
>
> Displaying it causes the service to renew it once the delay set in the general options expires (30 minutes by default). A confirmation is therefore always requested.

### Delete an alias

Select one or more aliases and click **×**. A confirmation is requested. The applications that relied on the alias see their SSO setting move from **Fixed** to **Enabled**.

### Force password renewal

Select one or more aliases associated with an **enabled** policy, then click **Force password renewal**. A confirmation is requested. The button stays inactive if one of the selected aliases has no enabled policy.

---

## Password vault in "Systancia Access" mode

### Vault access configuration

The **Configuration** button opens the same **Safe access configuration** window, which here presents two boxes.

**Systancia Access server settings**

| Field | Description |
|---|---|
| **Server** | Host name or address of the Systancia Access server. |
| **Use SSL** | HTTPS communication. Ticked by default. |
| **Port** | Service port. `99` by default. |
| **Path** | Path of the web service. `/service.asmx` by default. |
| **Site** | Site used to reach the server. A site with no online Edge Gateway is refused at validation. |

**Default credentials**

| Field | Description |
|---|---|
| **Username** / **Password** | Default access credentials for the Systancia Access server. |

> **Changing the server address purges the aliases**
>
> Changing the server address after a first configuration asks for confirmation: accepting **purges the existing aliases** that referred to the former server.

### Add an alias

The **+** button opens the **Add alias** window. Two radio buttons drive the rest: **User vault** or **Shared vault**, the latter selected by default.

| Common field | Description |
|---|---|
| **Alias** | Mandatory. Forced to lower case. The `@ , < & > "` characters are rejected. |
| **Password** / **Confirmation** | Password to store in the vault. Both values must match. |

**User vault**

> | Field | Description |
> |---|---|
> | **Access Container** | Systancia Access container to store the secret in. |
> | **Application name** | Name of the service to create in the container. |
> | **Username** | Name of the target account. The `@` and `\` characters are rejected. |
> | **Domain** | Domain of the account. |

**Shared vault**

> | Field | Description |
> |---|---|
> | **Mode** | Only one value is offered: **Password rotation**. |
> | **Access Container** | The **full DN** of the container is expected, for instance `CN=admaccess@T4.local,OU=Access,DC=access`. A warning in orange recalls it in the form. |
> | **Application name** | Name of the service to create in the container. |
> | **Username** / **Domain** | **Read-only.** The account is picked through the **Properties** icon, among the [managed accounts](https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/ManagedAccounts/); the domain and the DN then fill in by themselves. |
> | **Password** / **Confirmation** | **Disabled** as soon as the selected managed account has already been rotated: its current password is held by the mechanism, there is nothing left to type. |

### Edit an alias

Select the alias and click the **Properties** icon, or double-click the row. The **Edit alias** window offers the same fields; **Alias**, the choice of vault, the **Mode**, the **Access Container** and the **Username** can no longer be changed. Only aliases created in Systancia Access mode are edited here.

### Delete an alias

Select one or more aliases and click **×**. A confirmation is requested. The applications that relied on the alias see their SSO setting move from **Fixed** to **Enabled**.

### Force password renewal

Select one or more aliases and click **Force password renewal**. A confirmation is requested. The button is only active if the selected aliases are associated with an **enabled** rotation policy.

---

## External vaults

In **Keeper Security**, **LockSelf** and **Bitwarden** modes, the secrets stay in the external vault: the platform **reads** them and creates, edits and deletes nothing there. The three vaults share the same screen, opened from the synoptic under the name of the active vault: **Password Vault (Keeper Security)**, **Vault (LockSelf)** or **Vault (Bitwarden)**. That screen always talks to the vault selected in the [general options](https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/GeneralOptions/).

### Configure the access

The **Configuration** toolbar button opens the **Safe access configuration** window. Its fields depend on the vault; all of them are mandatory unless stated otherwise. On saving, the console tests the connection to the vault: the configuration is saved only if the test succeeds, otherwise a message gives the reason for the refusal.

> **The window opens by itself while nothing is configured**
>
> When the module is opened and no configuration exists, the window appears straight away.

**Keeper Security**

> | Field | Description |
> |---|---|
> | **Keeper Security access token** | Keeper Secrets Manager access token. It is exchanged, on saving, for a lasting configuration kept encrypted by the platform; the token itself is not kept, and the field comes back empty when the window is reopened. |

**LockSelf**

> | Field | Description |
> |---|---|
> | **Server URL** | Address of the LockSelf instance, in `https://`, without credentials, parameters or fragment. |
> | **X-Auth-Token** | Authentication token of the LockSelf API user. Masked entry. |
> | **X-Ls-Token** | Second token of the LockSelf API user. Masked entry. |
> | **Security key** | Private key of the API user, used to open the encrypted values: **64 hexadecimal characters**. Masked entry. |
> | **Certificate authority** | Optional. PEM certificate of the authority that signed the instance certificate. Empty, the certificates trusted by the system are used; filled in, it becomes the only authority accepted. |
>
> On reopening, only **Server URL** and **Certificate authority** are displayed again: the two tokens and the security key have to be entered again.

**Bitwarden**

> | Field | Description |
> |---|---|
> | **Server** | **bitwarden.com (United States)**, **bitwarden.eu (European Union)** or **Self-hosted**. |
> | **Server URL** | Active only with **Self-hosted**: base address of the server, in `https://`, without `/identity` nor `/api`. Choosing another server empties it. |
> | **Service account email** | Email address of the Bitwarden account the platform connects with. |
> | **Client ID (client_id)** | Identifier of the account's personal API key, in the form `user.<identifier>`. |
> | **Client secret (client_secret)** | Secret of the personal API key. Masked entry. |
> | **Master password** | Master password of the account. Masked entry. Only requested during configuration: it serves to open the account's keys and is not stored. |
> | **Organization ID** | Optional if the account belongs to a single organisation. Otherwise, the identifier shown in the address of the Bitwarden admin console, after `organizations/`. |
> | **Certificate authority** | Optional. PEM certificate of the authority that signed the server certificate, as for LockSelf. |
>
> On reopening, the client secret and the master password are not displayed again: they have to be entered again.

### Review the aliases

Once the configuration is accepted, the screen splits into two panels: on the left the **folder tree** read from the vault, with a refresh button in the footer; on the right the **alias list** of the selected folder. A greyed folder is not readable by the account the platform connects with: selecting it displays a warning and no alias.

| Column | Description |
|---|---|
| **Name** | Name of the record in the vault. |
| **Login** | Account login carried by the record. |
| **Type** | Type of the record, as the vault names it. |
| **Description** | Note or description of the record. |

The search field becomes active once a folder is selected, and filters that folder only.

> **What a folder is, depending on the vault**
>
> A Keeper **folder**, a LockSelf shared **category**, a Bitwarden shared **collection** of the organisation. Only records holding a password or an SSH key are listed.
