---
title: "How Key Guardian works"
description: "What Key Guardian checks before it releases a secret, and the pieces involved."
source: "Key Guardian"
---
Key Guardian holds your secrets and gives one to a workload only after the workload proves where
it runs and what it runs. The proof is the signed attestation manifest that the EQTY Notary
produces inside a confidential VM. Key Guardian checks it against your policies, and releases the
secret only if they pass.

Use it to give a confidential workload what it needs, such as a registry token, a model decryption
key or a cloud access token, without baking it into the image or trusting the host.

![The Key Guardian dashboard: instance, secret and policy counts, and recent attestations](../media/dashboard.png)

## The exchange

```mermaid
sequenceDiagram
    participant W as Workload (in a TEE)
    participant N as EQTY Notary
    participant G as Key Guardian
    W->>G: request a nonce for a secret
    G-->>W: nonce (valid 5 minutes)
    W->>N: get the attestation manifest, sign the nonce
    N-->>W: manifest + signature
    W->>G: nonce, signature, manifest
    G->>G: check the signature, evaluate the policies
    G-->>W: the secret, only if the policies pass
```

1. The workload asks for a nonce for the secret it wants.
2. The notary signs the nonce with a key bound to the TEE's hardware quote. The workload sends the
   signature and the notary's manifest back.
3. Key Guardian checks that a key in the manifest signed the nonce, then evaluates the instance's
   policies: the TEE quote and its measurements, the signing key, the container images, and
   anything else you configured.
4. If they pass, the response carries the secret. If not, the workload learns only that it was
   refused. The reason goes to the [attestation log](../secrets/attestation-logs.mdx).

Every attempt is logged with the full manifest and a signed integrity proof.

## The pieces

| Piece                | What it is                                                                                      |
| -------------------- | ----------------------------------------------------------------------------------------------- |
| **Instance**         | One workload's secrets, and the policies that guard them. [More](../secrets/instances.mdx)|
| **Secret**           | A static value, an Azure access token, an attestation token (EAT) or a passkey. [More](../secrets/instances.mdx#secret-types) |
| **Policies**         | The conditions a workload's manifest must meet before a secret is released. [More](../secrets/policies.mdx) |
| **Workload API**     | The two calls a workload makes to get a secret. [More](../reference/workload-api.mdx)                 |
| **Reference values** | Expected measurements, computed from the firmware, kernel and initrd you deploy. [More](../secrets/reference-values.mdx) |
| **Guardian CA**      | Key Guardian's root key. It signs attestation tokens, and certifies TPMs and Macs. [More](../hardware/index.mdx) |
| **Key custody**      | Everything stored is encrypted with one data key, wrapped by a software key, Azure Key Vault or a YubiHSM 2. [More](../administration/key-custody.mdx) |

## Next

1. [Install Key Guardian](../install/install.mdx) with Docker Compose or Helm.
2. [Initialize it](../install/initialize.mdx): create the first account, choose key custody, generate the
   root key.
3. [Create an instance and add a secret](../secrets/instances.mdx).
4. Have your workload [request the secret](../reference/workload-api.mdx).

Key Guardian works with the manifests produced by
[Verifiable Confidential Containers](https://vcomp.docs.eqtylab.io/verifiable-confidential-containers/)
and the [Verifiable Container Runtime](https://vcomp.docs.eqtylab.io/verifiable-container-runtime/).