> ## Documentation Index
> Fetch the complete documentation index at: https://inframan.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Secrets

> Where secret values are stored, how they reach your services and builds, and who can see them.

Inframan keeps secret values out of your repository, out of its own database and out of your workloads' specs.

## Where secrets are stored

| Kind | Stored in |
| - | - |
| Infrastructure secrets and secret groups | Your cloud account's secret manager: **Secret Manager** on Google Cloud, **AWS Secrets Manager** under `inframan/<infra8>/` on AWS. Inframan keeps only a reference. |
| Add-on passwords | Your cloud account's secret manager, for as long as the add-on exists |
| Plain variables and plain env groups | Inframan's database, encrypted with AES-256-GCM |

`inframan.yaml` refers to secrets by name only. See [Environment variables and secrets](https://inframan.mintlify.site/deploy/environment-variables.md#secrets).

## How secrets reach a service

1. When you set a secret, its value is held encrypted for at most 10 minutes while Inframan writes it to your secret manager. Only a short-lived claim token passes through Inframan's workflows, so the value never appears in workflow history or logs.
2. At deploy time, Inframan reads the value from your secret manager and writes it into a Kubernetes Secret in the application's namespace.
3. The service reads it as an environment variable that refers to the Kubernetes Secret. The value isn't written into the workload's spec.

Updating an infrastructure secret rolls out every service that uses it.

## Secrets in builds

Secrets marked for builds are handed to Docker BuildKit as a secret mount. They're available to the `RUN` steps that ask for them and are never written into an image layer or the image's history. When builds run in the cluster, the secrets file lives on memory-backed storage. See [Secrets at build time](https://inframan.mintlify.site/deploy/environment-variables.md#secrets-at-build-time).

> [!WARNING]
>
> Plain variables are passed to builds as build arguments, which can be read from an image's history. Never put a secret in `env`.

## Who can see secrets

| Who | Can |
| - | - |
| Viewers | See secret names, never values |
| Developers | Use secrets in their services, and create and change secret groups |
| Admins | Everything Developers can, plus create infrastructure secrets and export an infrastructure's environment |
| AI assistants | List secret names. They can't create secrets or set any value. |

An export, from the infrastructure's **Env groups** or **Secrets** tab, downloads every env group, secret group and secret of the infrastructure as one JSON file, with every value in plain text. Keep it somewhere safe.

> [!NOTE]
>
> Anyone with a [kubectl tunnel](https://inframan.mintlify.site/provision/cluster-access.md) has full rights on the cluster, which includes reading Kubernetes Secrets. That's why only Admins can open one.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.