> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/pam/administration/accounts/vault.md).

# The credential vault

What the vault holds, the three ways a secret leaves it, how every retrieval is recorded, and how the vault is backed up under split custody.

## What this is and when to use it

The vault holds the secrets of every managed account: the password, SSH key, token, access key or API key that authenticates to the target. It is the centre of the product, and the reason the other pages exist. Assets say where to connect, authorizations say who may, rotation says how often the secret changes, and the vault is what all three are protecting.

Its working principle is that **a secret is used far more often than it is seen**. The default path opens a session without the secret ever reaching the person using it, and the paths that do reveal it are separately permitted and separately recorded.

## What the vault holds

One secret per managed account, of one of these types:

| Secret type | Typical use                                |
| ----------- | ------------------------------------------ |
| Password    | Windows, Linux, network devices, databases |
| SSH key     | Linux and Unix hosts, network devices      |
| Token       | APIs and services                          |
| Access key  | Cloud provider accounts                    |
| API key     | Application integrations                   |

Each secret carries a **version**. Rotating an account does not overwrite its history: the previous values are retained, which is what lets you answer "which credential was valid on the day of the incident" months later. See [Rotate credentials](https://wiki.datadike.com/pam/administration/accounts/rotation.md).

The account inventory reports which accounts actually hold a secret, alongside whether each one is privileged and whether automatic rotation reaches it. That report is the shortest answer to "is the vault complete", and it exposes the accounts that were registered but never had a credential stored. See [Reports](https://wiki.datadike.com/pam/administration/audit/reports.md).

## The three ways a secret leaves the vault

| Path        | What the user gets                                                                        | When to allow it                                                          |
| ----------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Use it**  | A session opens, authenticated with the secret. The user never sees it and cannot copy it | The default. Should cover almost every case                               |
| **Copy it** | The secret goes to the clipboard without being displayed                                  | A client the console cannot drive                                         |
| **View it** | The secret is displayed on screen                                                         | The exception. An emergency, or a tool that needs the value typed by hand |

Which of the three a user gets is decided on the authorization, not on the account, so the same account can be usable without being viewable by one team and fully visible to another. See [Authorizations](https://wiki.datadike.com/pam/administration/access/authorizations.md).

{% hint style="info" %}
An authorization can also grant an account the user is not meant to know at all. **Manual account** asks the user for credentials at connection time and stores nothing; **Anonymous account** connects with no credential. Neither involves the vault, and both are useful for assets whose credentials must stay outside it.
{% endhint %}

Credentials that belong to no asset, such as supplier portals or licence accounts, live in a different store, personal and shared by hand: see [Vault entries and folders](https://wiki.datadike.com/pam/administration/accounts/vault-entries.md).

## Every retrieval is recorded

Reading a secret is an audited event in its own right, separate from opening a session. The record carries the date, who or what asked for it, which account was read, the source address, and the action.

The same record covers applications: when a script or a scanner fetches a credential through [application-to-application access](https://wiki.datadike.com/pam/administration/integrations/application-to-application.md), the retrieval lands in the same trail as a person clicking *view*. That is what makes "who has read this credential, ever" a question with a complete answer.

**Credential retrieval** is one of the operational reports, and it is cited as evidence by six of the seven compliance packages. See [Compliance mappings](https://wiki.datadike.com/pam/reference/compliance-mappings.md).

## Backing up the vault

![The Backup accounts screen, with a scheduled task and its two custodians](https://1085357737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7xzJyi9JVzRwnV6JzUho%2Fuploads%2Fgit-blob-bdd2616640400ec243cd05f861732e43820c8b67%2Fvault-backup.png?alt=media)

**1** The task, named for what it produces. **2** The schedule, as a crontab expression. **3** Custodian A. **4** Custodian B. With both set, the key is split and neither half opens the backup alone.

The backup task exports the credentials encrypted and delivers them by email, SFTP, or webhook.

| Aspect        | Detail                        |
| ------------- | ----------------------------- |
| Algorithm     | AES-256-CBC                   |
| Key splitting | Shamir Secret Sharing, 2 of 2 |
| Format        | Encrypted ZIP or JSON         |

### Before you start

* An email server configured, if the delivery is by email.
* A master password set for opening the vault.

### Steps

1. Open **Accounts › Automations › Backup account**.
2. Click **Create** and set the **Name** and **Type**.
3. Choose the **Backup type**: **Email**, **SFTP**, or **Webhook**.
4. Under **Password divided**, set **Custodian A** and **Custodian B**.
5. Set the schedule.
6. Save, and follow the runs under the executions history.

{% hint style="warning" %}
**The split only happens with two custodians.** If both recipient A and B are set, the ciphertext is split in two parts and both are needed to decrypt. If only one recipient is set, **the key is not split** — that single recipient can open the whole vault alone.

This is the setting people get wrong, and the failure is silent: the backup works either way.
{% endhint %}

### How to verify it worked

1. Open the task's execution history and confirm the run succeeded.
2. Confirm each custodian received their part — two parts, if you configured two.
3. Restore into a test instance. A backup that has never been restored is a hypothesis, not a backup.

## Emergency access — break-glass

The solution allows an emergency access account for contingency: an authorized custodian, after two-factor authentication, can read any credential in the vault.

**How it works**

* Emergency access requires two-factor authentication, separate from the normal login, before any credential is revealed.
* Once authenticated, the custodian can retrieve any credential in the vault, keeping operations running when approvers are unavailable, during an incident, or in disaster recovery.
* It combines with the dual-custodian model, where the key parts are held by different people, tightening control over emergency use.

**Audit and alerting**

Every use of the emergency account is written to the audit trail — who, when, and which credentials were accessed — and can raise specific alerts, so that any break-glass use is reviewed immediately.

{% hint style="danger" %}
Keep the emergency account outside the reach of automatic credential rotation. An automation that rotates the one credential you rely on during an incident defeats its purpose.
{% endhint %}

## How to verify the vault is doing its job

Four checks, in the order that finds problems fastest:

1. **Open a session on a managed account and confirm nothing was revealed.** The session should authenticate without the secret appearing anywhere in the interface. This is the behaviour everything else depends on.
2. **Run the account inventory report** and look at the *has secret* column. An account registered without a credential looks managed from the asset list and is not.
3. **Read one secret deliberately**, then find that read in the credential retrieval report. If the read is not in the report, the trail is incomplete and no other control can be trusted.
4. **Rotate one account and confirm the previous version is still retained.** Retention of prior versions is what answers an incident question after the fact.

## Common errors

| Symptom                                          | Cause                                                       | Fix                                                                 |
| ------------------------------------------------ | ----------------------------------------------------------- | ------------------------------------------------------------------- |
| A user sees the secret when they should not      | The authorization grants *view*, not only *use*             | Remove the view permission on the authorization, not on the account |
| An account is in the inventory but sessions fail | It holds no secret                                          | Check the *has secret* column and store the credential              |
| The backup arrives as a single openable file     | Only one custodian was configured, so the key was not split | Set both Custodian A and Custodian B                                |
| The backup cannot be decrypted                   | One of the two parts is missing                             | Both parts are required. Recover the missing custodian's part       |
| Email backup never arrives                       | The email server is not configured                          | Configure notifications first                                       |
| A secret cannot be revealed in the console       | MFA is not enabled on the account                           | Enable MFA                                                          |

## Related pages

* [Managed accounts](https://wiki.datadike.com/pam/administration/accounts/managed-accounts.md) — the accounts whose secrets live here
* [Vault entries and folders](https://wiki.datadike.com/pam/administration/accounts/vault-entries.md) — credentials kept and shared by hand, which no automation manages
* [Rotate credentials](https://wiki.datadike.com/pam/administration/accounts/rotation.md) — how a stored secret is changed, and what happens to the previous one
* [Authorizations](https://wiki.datadike.com/pam/administration/access/authorizations.md) — where use, copy and view are decided
* [Application-to-application access](https://wiki.datadike.com/pam/administration/integrations/application-to-application.md) — how a script retrieves a secret without a person
* [Multi-factor authentication](https://wiki.datadike.com/pam/administration/identities/mfa.md) — the second factor that reveal and break-glass require
* [Audit trail](https://wiki.datadike.com/pam/administration/audit/audit-trail.md) — where every retrieval is recorded
