> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/administration-guide/security/vault-client-identities.md).

# Vault client identities

Which certificate each OpenIAM component presents to Vault and what its role may do, how each distribution issues and renews the certificates, how to rotate them or use your own CA, and when the legac

**Applies to:** OpenIAM 2026.11.2

## What this is, and when you need it

OpenIAM keeps its own secrets in HashiCorp Vault: the database, broker and cache passwords, the key-store passwords, and the secrets the services write themselves. From 2026.11.2 every OpenIAM component signs in to Vault with a client certificate of its own **role**, and checks Vault's certificate against one certificate authority ([CA](https://docs.openiam.com/glossary.md)) before it sends anything. Each role reaches only the secrets its job needs. Until 2026.11.2 every component signed in with Vault's own key pair, under one entry, `web`, that could read and write every secret.

This page is for whoever runs the deployment. Use it to find out which component signs in as which role and what that role may do, how your distribution issues and renews the certificates, how to rotate one of them or the whole CA, how to use certificates from your organization's CA, and when the legacy entry `web` goes away.

It is not about the secrets themselves: changing a password held in Vault is [Rotate service credentials](https://docs.openiam.com/administration-guide/security/rotate-service-credentials.md). The Vault and Consul upgrade that brings this change is in the release-specific steps for [RPM](https://docs.openiam.com/installation/rpm/rpm-upgrade/release-specific-steps.md#vault-and-consul-move-to-new-major-versions) and [Kubernetes](https://docs.openiam.com/installation/kubernetes/kubernetes-upgrade/release-specific-steps.md#vault-and-consul-move-to-new-major-versions). Signing *people* in with a certificate is [Certificate authentication](https://docs.openiam.com/administration-guide/security/certificate-authentication.md).

## At a glance

|                         |                                                                                                                                                                             |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Roles**               | `services`, `bootstrap`, `connector` and `ops`. Each is a certificate-authentication entry in Vault, `auth/cert/certs/<role>`, with a policy of its own, `openiam-<role>`   |
| **Trust anchor**        | `vault.ca.crt`, the CA that issued Vault's certificate and every role certificate. Clients verify Vault against it, and each role entry trusts it                           |
| **A role certificate**  | `CN=openiam-<role>`, extended key usage client authentication. An entry accepts only its own common name                                                                    |
| **Lifetimes**           | The CA 10 years. Vault's certificate and the role certificates 2 years, renewed within 30 days of expiry when the generator runs                                            |
| **Tokens**              | 1 hour, renewable up to 24 hours                                                                                                                                            |
| **Legacy entry**        | `web`, still registered in 2026.11.2 (`VAULT_KEEP_LEGACY_CERT_ROLE=true`). The next release removes it by default                                                           |
| **Where the files are** | RPM: `/usr/local/openiam/vault/certs/`. docker-compose: `vault/` in the deployment folder. Kubernetes: the claims `openiam-pvc-vault-server` and `openiam-pvc-vault-client` |

## How a component signs in

Vault's certificate authentication method holds one entry per role. Each entry:

* trusts `vault.ca.crt`, so it accepts any certificate that CA issued rather than one pinned certificate;
* accepts only the common name `openiam-<role>`, so a `connector` certificate cannot sign in as `services`;
* hands out a token that carries the policy `openiam-<role>` alone, valid for 1 hour and renewable up to 24 hours.

Vault registers the four entries, and writes their policies, every time it starts. A policy you change by hand in Vault is put back at its next start.

**Every client verifies Vault.** Each one holds `vault.ca.crt` and checks Vault's certificate against it, host name included. A host name that is not on Vault's certificate fails the connection; it is not a warning. See [Vault's certificate](#vaults-certificate).

**Vault asks for no certificate during the Transport Layer Security (TLS) handshake.** Health checks, initialization and unsealing carry none. The role entries are the gate: without a token from one of them, a request reads no secret.

**A Java service signs in once per process.** It renews its token before the hour is up and signs in again once 24 hours have passed. Its log shows the sign-in and the role:

{% code overflow="wrap" %}

```
Logged in to Vault at https://vault:8200 with the client certificate as role 'services'
```

{% endcode %}

**A replaced certificate is not revoked.** Vault trusts the CA, and no revocation list is configured, so a certificate keeps working until it expires, even after its role has been issued a new one. If a role's key has leaked, [rotate the CA](#rotate-the-ca).

## The four roles

| Role        | Who signs in with it                                                                                                                                                                         | Files                                        | What its policy allows                                                                                                                                                                                                                                                                                                    |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `services`  | Every OpenIAM service and user interface                                                                                                                                                     | `vault-services.jks`                         | Read and list every secret under `secret/openiam`. Create, update and delete only the secrets the services keep themselves: `propertyvalue/*`, `jks/*`, and the managed-system, non-human identity (NHI), mailbox, one-time password (OTP), report-delivery and Apple ID secrets. Read and delete the legacy mail secrets |
| `bootstrap` | The step that seeds the secrets: `bootstrap.sh` and `put_data_in_vault.sh` on RPM, the `vault-bootstrap` stack or job elsewhere                                                              | `vault-bootstrap.crt`, `vault-bootstrap.key` | Create, read and update under `secret/openiam`, and read `secret/config`. No delete and no list                                                                                                                                                                                                                           |
| `connector` | The Java connectors                                                                                                                                                                          | `vault-connector.jks`                        | Read the RabbitMQ credentials, and nothing else                                                                                                                                                                                                                                                                           |
| `ops`       | Backups and exports with medusa, the infrastructure images on docker-compose and Kubernetes (databases, Redis, RabbitMQ, the OpenSearch curator), every other RPM script, and support shells | `vault-ops.crt`, `vault-ops.key`             | Create, read, update, delete and list everything under `secret/`. Nothing under `sys/`                                                                                                                                                                                                                                    |

* **The `.jks` files are PKCS #12 key stores**, whatever the extension says, protected by the deployment's Vault key-store password. The Java clients need a key store. The `.crt` and `.key` pairs are PEM files, for scripts and the infrastructure images.
* **Every grant covers both versions of the key-value (KV) secrets engine**: the version 1 path, and the data and metadata paths of version 2. The roles work on either side of the switch to KV version 2.
* **No role reaches `sys/`.** Converting the mount to KV version 2, and anything else under `sys/`, still takes the root token.
* **A request outside a role's policy is refused** with HTTP 403. A Java service names the key, in a message that starts `Vault denied the write of '<key>'`. The policies ship with the product, so a refusal means a component signed in with the wrong role, or something reads a key of your own that no role covers. Raise it rather than widening a policy, which Vault rewrites at its next start anyway.

## The CA and Vault's certificate

### The CA

`vault.ca.crt` and its key, `vault.ca.key`, are the CA. It issues Vault's certificate and the four role certificates, and it is the one certificate every client trusts. The installation creates it once, valid for 10 years, unless you [bring your own](#bring-your-own-ca).

**Whoever holds `vault.ca.key` can issue a certificate for any role, `ops` included.** It never goes to a client:

| Distribution   | Where the CA key is                                                                                            |
| -------------- | -------------------------------------------------------------------------------------------------------------- |
| RPM            | `/usr/local/openiam/vault/certs/vault.ca.key`, readable by `root` only                                         |
| docker-compose | `vault/server/vault.ca.key` in the deployment folder on the host. No volume carries it                         |
| Kubernetes     | The claim `openiam-pvc-vault-server`. Only the Vault pod mounts it, and only its init container issues from it |

Back it up with the rest of the secret store. Without it nothing can be issued, and the way out is a [new CA](#rotate-the-ca).

### Vault's certificate

`vault.crt` and `vault.key` are Vault's own certificate and key. The certificate is valid for 2 years and carries, as subject alternative names (SANs), every host name and address a client may use to reach Vault:

| Distribution   | Names on Vault's certificate                                                                                                                                                                                                             | Add a name with                                                                                        |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| RPM            | `localhost`, `127.0.0.1`, `VAULT_URL`, the host's fully qualified name, and every entry of `VAULT_CLUSTER_HOSTS_LIST`                                                                                                                    | `CERT_SANS` in `/usr/local/openiam/env.conf`, then `client-identities.sh`                              |
| docker-compose | `vault`, `localhost` and `127.0.0.1`                                                                                                                                                                                                     | `CERT_SANS` in `env.sh`, then `./startup.sh`                                                           |
| Kubernetes     | The Vault release's `openiam.vault.url` (`vault` on the Terraform route, `<APP_NAME>-vault` on the Helm route), `vault`, `localhost`, `127.0.0.1`, and both names as `<name>.<namespace>.svc` and `<name>.<namespace>.svc.cluster.local` | `openiam.vault.cert.sans` in `values/infra/vault.values.yaml`, then `./setup.sh` and the Vault release |

Each setting takes a comma-separated list, and an address in it becomes an address SAN. **Add every name a client outside the deployment uses**, such as the name a connector on another host reaches Vault by: a name that is missing fails every connection from that client.

The certificate allows server and client authentication. Client authentication is there for `web`, which is pinned to Vault's certificate, and Vault refuses to pin a certificate that lacks it.

**An upgraded installation gets a new certificate.** The one earlier releases issued names no host, so no client can verify it. The upgrade issues Vault a new certificate, with a new key, from the CA it already has, and keeps the previous one as `vault-web.crt`, which `web` stays pinned to. On docker-compose and Kubernetes, a CA certificate without the `CA:TRUE` basic constraint, as older docker-compose releases made on macOS, cannot issue certificates Vault accepts: the upgrade then creates a new CA, and every client receives it with its role's files.

### When certificates are renewed

The generator is the script that issues what is missing and keeps what is valid. It issues a certificate again when the certificate is missing, was not issued by the CA, lacks a name it needs, or expires within 30 days. It does that only when it runs:

| Distribution   | The generator runs                                                                                              |
| -------------- | --------------------------------------------------------------------------------------------------------------- |
| RPM            | At installation, during the upgrade, and whenever you run `/usr/local/openiam/utils/vault/client-identities.sh` |
| docker-compose | On every `./startup.sh`                                                                                         |
| Kubernetes     | Each time the Vault pod starts, in its init container `volumeinit`                                              |

**Plan one run inside the last 30 days of a certificate's two years.** A host, a swarm or a Vault pod that runs through that window without one keeps its certificates until they expire.

## How each distribution issues the certificates

{% tabs %}
{% tab title="RPM" %}
Everything is under `/usr/local/openiam/vault/certs/`:

| File                                                      | Owner and mode               | What it is                                                                                                  |
| --------------------------------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `vault.ca.crt`                                            | `vault:openiam`, `644`       | The CA certificate                                                                                          |
| `vault.ca.key`                                            | `root:root`, `600`           | The CA key. Issuing is root's job                                                                           |
| `vault.crt`                                               | `vault:openiam`, `644`       | Vault's certificate                                                                                         |
| `vault.key`                                               | `vault:vault`, `600`         | Vault's key. Only the `vault` user reads it                                                                 |
| `vault-web.crt`, `vault-web.key`                          | `root:root`, `644` and `600` | Upgraded hosts only: the previous release's server pair, which `web` is pinned to                           |
| `vault.jks`                                               | Unchanged                    | Upgraded hosts only: what clients not moved yet sign in to `web` with. A new installation has none          |
| `client/vault.ca.crt`                                     | `root:openiam`, `644`        | The copy of the CA certificate the clients verify Vault with. Once it is there, every script verifies Vault |
| `client/vault-services.jks`, `client/vault-connector.jks` | `root:openiam`, `640`        | The two Java roles, protected by `VAULT_JKS_PASSWORD` in `env.conf`                                         |
| `client/vault-bootstrap.crt`, `client/vault-ops.crt`      | `root:openiam`, `644`        | The two script roles' certificates                                                                          |
| `client/vault-bootstrap.key`, `client/vault-ops.key`      | `root:root`, `600`           | Their keys. Every script that uses them runs as root                                                        |

**Who reads what:**

* The services read `/usr/local/openiam/conf/properties/vault.properties`. It names `client/vault.ca.crt` as the trust store, `client/vault-services.jks` as the key store, and `vault.ssl.cert-auth-role=services`.
* The connectors read `vault-connector.properties` in the same folder, which names the `connector` role. The drop-in `/etc/systemd/system/openiam-connector@.service.d/vault-identity.conf` mounts it over `vault.properties` for the `openiam-connector@` units alone. The source adapters, `openiam-adapter@`, read the services' file.
* The scripts sign in as `ops`, and the seeding scripts as `bootstrap`. `VAULT_CERT_ROLE` in a script's environment picks another role, which is a way to reproduce a refusal.

**A new installation** issues the CA and every certificate, registers the roles and writes both properties files. **The upgrade** to 2026.11.2 issues the certificates from the host's existing CA while Vault is stopped, registers the roles next to `web`, and rewrites both files. See [Release-specific steps](https://docs.openiam.com/installation/rpm/rpm-upgrade/release-specific-steps.md#vault-and-consul-move-to-new-major-versions).

Two cases are left to you:

* **A secure deployment** (`VAULT_SECURE_DEPLOYMENT=true`) keeps no root token on the host, so the roles cannot be registered for you. Until you register them, everything keeps signing in as `web`, over a verified connection.
* **A host without `vault.ca.key`**, because its certificates come from your organization's CA, has nothing issued for it and keeps working as before. See [Bring your own CA](#bring-your-own-ca).

`client-identities.sh` finishes either case, and is safe to run at any time. It issues what is missing, registers the roles, rewrites the two properties files, and ends with one `PASS`, `FAIL` or `NOTE` line per check. Run it as root. Without `VAULT_TOKEN` it takes the root token from `unseal.keys`, which only a host with `VAULT_SECURE_DEPLOYMENT=false` keeps. In a secure deployment, type the root token instead of putting it on the command line:

{% code overflow="wrap" %}

```bash
read -rs VAULT_TOKEN && export VAULT_TOKEN
/usr/local/openiam/utils/vault/client-identities.sh
unset VAULT_TOKEN
```

{% endcode %}

The services and connectors read their properties file when they start, so restart them afterwards: `openiam-cli stop`, then `openiam-cli start`, and `systemctl restart openiam-connector@<name>` for each running connector.

{% hint style="warning" %}
**A three-node cluster stays on `web` in 2026.11.2.** A cluster built with the [cluster tooling](https://docs.openiam.com/installation/rpm/rpm-ha/install.md) runs Vault on its own three-server Consul cluster and shares one certificate folder across the three nodes. Its upgrade leaves the secret store as it is, so every node keeps signing in as `web` with `vault.jks`. Upgrade it with its cluster tooling only. Do not run `openiam-cli upgrade`, `upgrade_vault_consul.sh` or `client-identities.sh` on a node: all three are written for a single host, and would issue the shared certificates for that node alone. Keep `web` registered, and plan the move on your support case.
{% endhint %}
{% endtab %}

{% tab title="docker-compose" %}
`generate.cert.sh`, which `startup.sh` runs on every start, keeps the certificates under `vault/` in the deployment folder, next to `env.sh`. `startup.sh` then copies each role's folder to a volume of its own:

| Folder                    | Files                                                                                                | Volume                                     | Mounted by                                                                |
| ------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------- |
| `vault/server/`           | `vault.ca.crt`, `vault.ca.key`, `vault.crt`, `vault.key`, and `vault-web.crt` on an upgraded install | `vault_server_storage`, without the CA key | The `vault` stack only                                                    |
| `vault/client/services/`  | `vault-services.jks`, `vault.ca.crt`                                                                 | `vault_client_storage`                     | The service and user interface stacks, `services-sas`, the source adapter |
| `vault/client/connector/` | `vault-connector.jks`, `vault.ca.crt`                                                                | `vault_connector_storage`                  | Every connector, with `VAULT_CERT_ROLE=connector`                         |
| `vault/client/bootstrap/` | `vault-bootstrap.crt`, `vault-bootstrap.key`, `vault.ca.crt`                                         | `vault_bootstrap_storage`                  | `vault-bootstrap`                                                         |
| `vault/client/ops/`       | `vault-ops.crt`, `vault-ops.key`, `vault.ca.crt`                                                     | `vault_ops_storage`                        | mariadb, postgres, redis, rabbitmq, curator, and medusa backups           |

Each client volume is mounted at `/data/openiam/conf/vault/client`, and emptied and refilled on every start, so it holds exactly its role's files. `vault/server/` and `vault/client/` are in `.gitignore`: never commit them.

The settings are in `env.sh`:

| Setting                       | Default    | What it does                                                                                                                                     |
| ----------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `VAULT_JKS_PASSWORD`          | `passwd00` | The password of the two `.jks` key stores. It ships as a published value, so change it; the next `./startup.sh` issues both key stores again     |
| `CERT_SANS`                   | Empty      | Extra names on Vault's certificate                                                                                                               |
| `VAULT_SERVER_CERT_EXTERNAL`  | `false`    | `true` when you supply Vault's certificate together with your CA's key, so that it is kept as it is. See [Bring your own CA](#bring-your-own-ca) |
| `VAULT_KEEP_LEGACY_CERT_ROLE` | `true`     | Keeps the legacy entry `web`                                                                                                                     |

**An install of the previous release needs nothing by hand.** The first `./startup.sh` of 2026.11.2 copies the previous layout to `vault/server/`, keeps the CA, issues Vault a new certificate and the four role certificates, and removes the old `vault.jks` and server key from every client volume. The previous files stay in the deployment folder, so the previous release can still start from it.

**A connector on another host** needs `vault/client/connector/` copied to it and mounted at `/data/openiam/conf/vault/client`, `VAULT_CERT_ROLE=connector` and `VAULT_KEYPASS` (the key-store password) in its environment, port 8200 published in `3.2/infrastructure/vault/docker-compose.yaml`, and the name it reaches Vault by in `CERT_SANS`. Never copy `vault/server/`, or an old `vault.jks`, to it.

The section **Vault** of the `openiam-docker-compose` repository's README is the full reference for this distribution.
{% endtab %}

{% tab title="Kubernetes" %}
The Vault pod's init container, `volumeinit`, lays the certificates out on two claims each time the pod starts:

| Claim                      | Folder       | Files                                                                                          | Mounted by                                            |
| -------------------------- | ------------ | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| `openiam-pvc-vault-server` | The root     | `vault.crt`, `vault.key`, `vault.ca.crt`, `vault.ca.key`, and `vault-web.crt` after an upgrade | The Vault pod only                                    |
| `openiam-pvc-vault-client` | `services/`  | `vault-services.jks`, `vault.ca.crt`                                                           | Every service and user interface                      |
| `openiam-pvc-vault-client` | `connector/` | `vault-connector.jks`, `vault.ca.crt`                                                          | The connectors                                        |
| `openiam-pvc-vault-client` | `bootstrap/` | `vault-bootstrap.crt`, `vault-bootstrap.key`, `vault.ca.crt`                                   | The `vault-bootstrap` job                             |
| `openiam-pvc-vault-client` | `ops/`       | `vault-ops.crt`, `vault-ops.key`, `vault.ca.crt`                                               | RabbitMQ, the OpenSearch curator job, the medusa jobs |

Each pod mounts only its role's folder, read-only, with `subPath: <role>` at `/data/openiam/conf/vault/client`, and receives the role in `VAULT_CERT_ROLE`. The chart value `openiam.vault.certRole` picks the role: it defaults to `services`, the connector charts set `connector`, and any other value fails the render. No pod but Vault's mounts `openiam-pvc-vault-server`.

**Apply the configmap release, then the Vault release, then the rest.** A pod of 2026.11.2 finds its folder empty, and exits naming the missing key store, until Vault's init container has issued the identities.

The key-store password is `vault.vaultKeyPassword` in `terraform.tfvars` on the Terraform route. On the Helm route it is `VAULT_KEY_PASS`, exported before `setup-no-tf.sh`, which otherwise generates one. The pods read it from the `secrets` Secret, key `vaultKeyPassword`.

An upgraded install keeps the previous release's `vault.jks` at the root of `openiam-pvc-vault-client`, for clients not moved to a role yet. No pod of 2026.11.2 reads it.

The `.vault/README.md` file and the section "Vault client identities" of `deploy.terraform.md` and `deploy.no.terraform.md`, in the deployment materials, are the full reference for this distribution.
{% endtab %}
{% endtabs %}

## Rotate a certificate

### A role certificate

Vault needs no change: the role's entry trusts the CA, not the certificate. Whatever presents the certificate picks up the new one when it next starts.

{% tabs %}
{% tab title="RPM" %}
{% code overflow="wrap" %}

```bash
/usr/local/openiam/utils/vault/issue-client-cert.sh <services|bootstrap|connector|ops>
```

{% endcode %}

Then restart what presents it: `openiam-cli stop` and `openiam-cli start` for `services`, and `systemctl restart openiam-connector@<name>` for each connector. The scripts read `bootstrap` and `ops` afresh on every run.
{% endtab %}

{% tab title="docker-compose" %}
Every role at once:

{% code overflow="wrap" %}

```bash
VAULT_CERTS_FORCE_CLIENTS=true ./generate.cert.sh && ./startup.sh
```

{% endcode %}

One role, here `connector`:

{% code overflow="wrap" %}

```bash
. ./env.sh
VAULT_KEYPASS="$VAULT_JKS_PASSWORD" vault/issue-client-cert.sh connector \
  --ca-cert vault/server/vault.ca.crt --ca-key vault/server/vault.ca.key --out-dir vault/client/connector
./startup.sh
```

{% endcode %}

`startup.sh` copies the new file to the role's volume and redeploys. Copy the new `vault/client/connector/` to connector hosts outside the swarm.
{% endtab %}

{% tab title="Kubernetes" %}
A generated role certificate is issued again at the first start of the Vault pod within 30 days of its expiry. There is no switch to issue it sooner.

A role certificate you supplied: replace its file in `.vault/` and run `./setup.sh`. Apply the configmap release, with `terraform apply -target=module.deployment.module.helm.helm_release.configmap` on the Terraform route, or by hand on the Helm route, because `setup-no-tf.sh` does not upgrade a configmap release that is already installed:

{% code overflow="wrap" %}

```bash
BUILD_ENVIRONMENT=<environment> OPENIAM_VERSION_NUMBER=<version> ./stage-vault-certs.sh
helm upgrade "${APP_NAME}-configmap" .deploy/charts/openiam-configmap --reset-then-reuse-values
```

{% endcode %}

The `helm upgrade` keeps the release's generated passwords, and needs Helm 3.14 or later. Then restart the Vault pod, whose init container copies the new file, and the pods of that role. `NS` is the namespace you deployed into:

{% code overflow="wrap" %}

```bash
kubectl delete pod -n "$NS" vault-0
kubectl rollout restart -n "$NS" <deployment|statefulset>/<name>
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Vault's certificate

It is renewed with the others. To add a name, set it as in [Vault's certificate](#vaults-certificate) and run the generator. On RPM, Vault re-reads its certificate without a restart, so it is not sealed again. On docker-compose `./startup.sh` redeploys Vault, and on Kubernetes applying the Vault release restarts its pod.

### The key-store password

On RPM, change `VAULT_JKS_PASSWORD` in `/usr/local/openiam/env.conf`, run `client-identities.sh`, and restart the services and connectors: the two key stores no longer open with the new password, so they are issued again with it, and both properties files are rewritten. On docker-compose, change `VAULT_JKS_PASSWORD` in `env.sh` and run `./startup.sh`.

### Rotate the CA

Rotate it when it nears its ten years, when its key or a role's key has leaked, or when `vault.ca.key` is lost. Vault's certificate and every role certificate are issued again, and every client has to restart to trust the new CA. Clients outside the deployment, such as connectors on other hosts, need their new role files before they can sign in again.

{% tabs %}
{% tab title="RPM" %}
With the services stopped and Vault running, move the CA aside and run `client-identities.sh`, which creates a new CA, issues everything from it, and registers the role entries with it:

{% code overflow="wrap" %}

```bash
openiam-cli stop
cd /usr/local/openiam/vault/certs
mkdir -p "retired-ca-$(date +%Y%m%d)"
mv vault.ca.crt vault.ca.key "retired-ca-$(date +%Y%m%d)/"
/usr/local/openiam/utils/vault/client-identities.sh
openiam-cli start
```

{% endcode %}

In a secure deployment, type the root token first, as in [How each distribution issues the certificates](#how-each-distribution-issues-the-certificates). Then restart each running connector.
{% endtab %}

{% tab title="docker-compose" %}
{% code overflow="wrap" %}

```bash
./shutdown.sh
mkdir -p vault/retired-ca-$(date +%Y%m%d) && mv vault/server/vault.ca.crt vault/server/vault.ca.key vault/retired-ca-$(date +%Y%m%d)/
./startup.sh
```

{% endcode %}

`startup.sh` creates a new CA, issues Vault's certificate and every role certificate from it, and Vault registers the role entries with the new CA when it starts.
{% endtab %}

{% tab title="Kubernetes" %}
Supply the new CA through `.vault/`: its certificate and its key, as in [Bring your own CA](#bring-your-own-ca). With a configmap chart that predates conf PR 385, add a Vault certificate it issued as well. The init container keeps a CA it is given and issues every role certificate from it again, because the old ones no longer verify. Apply the configmap release and restart the Vault pod as for [a role certificate](#a-role-certificate), then restart every OpenIAM pod.
{% endtab %}
{% endtabs %}

## Bring your own CA

To use certificates from your organization's CA, you put the CA certificate in place, with either its key or Vault's certificate. A CA certificate you supply is never replaced by one the generator creates. What happens depends on what you supply:

| You supply                                                                     | What happens                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `vault.ca.crt` and `vault.ca.key`                                              | Vault's certificate and the four role certificates are issued from your CA, and renewed before they expire                                                                                                                |
| `vault.ca.crt`, `vault.ca.key`, `vault.crt` and `vault.key`                    | Your Vault certificate is kept as it is, and the role certificates are issued from your CA and renewed. On docker-compose this needs `VAULT_SERVER_CERT_EXTERNAL=true`                                                    |
| `vault.ca.crt`, `vault.crt` and `vault.key`, without the CA key                | Your Vault certificate is kept, if `vault.ca.crt` issued it. Supply all four role certificates too, because nothing can be issued without the key. Use this when the CA's key cannot leave your public key infrastructure |
| `vault.ca.crt` alone, or with a key that is encrypted or does not belong to it | Refused, and nothing is changed                                                                                                                                                                                           |

{% hint style="info" %}
**This table describes the release that contains conf PR 385.** Before it, a CA certificate and its key without Vault's certificate are refused on Kubernetes: `stage-vault-certs.sh` asks for the server certificate too.
{% endhint %}

What each file has to be:

* **`vault.ca.crt`**: a CA certificate, with the basic constraint `CA:TRUE`. It may be an intermediate, such as your issuing CA, on its own or followed by the rest of its chain up to the root. Where the generator runs with macOS LibreSSL, as docker-compose on a Mac does, the file has to hold the whole chain up to the root. Vault registers the role entries with it, and every client verifies Vault with it.
* **`vault.ca.key`**: the CA's key, as an unencrypted PEM file. It never goes to a client: see [The CA](#the-ca).
* **`vault.crt` and `vault.key`**: Vault's certificate, with every name from [Vault's certificate](#vaults-certificate), and the extended key usage server authentication. While `web` is kept it needs client authentication as well, because Vault pins `web` to it. A certificate the generator issues always has both.
* **The four role certificates**, when there is no CA key: issued by that CA, each with the subject `CN=openiam-<role>` and the extended key usage client authentication. `vault-services.jks` and `vault-connector.jks` are PKCS #12 key stores, protected by the deployment's key-store password and encrypted with AES, the OpenSSL 3 default. A key store written with RC2, as macOS LibreSSL and OpenSSL 1.x do, does not open in every client. `vault-bootstrap` and `vault-ops` are PEM pairs.

{% tabs %}
{% tab title="RPM" %}
Put the files under `/usr/local/openiam/vault/certs/`: `vault.ca.crt`, the same file as `client/vault.ca.crt`, then either `vault.ca.key`, or `vault.crt` and `vault.key` with the four role files in `client/`, the key stores protected by `VAULT_JKS_PASSWORD`. Given the CA key, the host issues whatever is missing from your CA. A Vault certificate you supply also needs the host's fully qualified name and every `VAULT_CLUSTER_HOSTS_LIST` entry: with the CA key present, one without them is issued again. Then run `client-identities.sh` as root, typing the root token first in a secure deployment.

A host with `vault.ca.crt` and nothing it can use keeps signing in as `web` without verifying Vault, and `client-identities.sh` prints the list of what is still missing.
{% endtab %}

{% tab title="docker-compose" %}
Put the CA's files, and Vault's if you supply them, in `vault/server/`. When you supply Vault's certificate together with the CA key, set `VAULT_SERVER_CERT_EXTERNAL=true` in `env.sh`; without it, a certificate that lacks client authentication or one of the required names is issued again from your CA. Without the CA key, your Vault certificate is kept anyway, and each role's file goes in `vault/client/<role>/`. `generate.cert.sh` adds `vault.ca.crt` to each role's folder.

When the set cannot work, `startup.sh` stops before anything changes: `generate.cert.sh` logs `vault-certs: REFUSED:` with the reason and `Nothing was changed.`, or `generate.cert.sh: missing under …` with a list of the role files still to supply.

Keep `VAULT_KEEP_LEGACY_CERT_ROLE=false` unless Vault's certificate allows client authentication.
{% endtab %}

{% tab title="Kubernetes" %}
Put the files in `.vault/` in the deployment materials, then run `./setup.sh` or `./setup-no-tf.sh`. Both run `stage-vault-certs.sh`, which copies them into a local copy of the `openiam-configmap` chart, `.deploy/charts/openiam-configmap`. The configmap release is installed from that copy, its Secrets carry the files, and the Vault init container copies them onto the claims. A Vault certificate supplied with the CA key is kept without any setting. On an existing Helm-route install, stage and upgrade the configmap release by hand, as in [a role certificate](#a-role-certificate).

`stage-vault-certs.sh` checks the set before it pulls a chart, and stops with an `ERROR:` line when `vault.ca.crt` is missing, when it has neither its key nor Vault's certificate, when only one of `vault.crt` and `vault.key` is there, or when there is no CA key and a role file is missing. The Vault init container also refuses a CA without `CA:TRUE`, and a Vault certificate the supplied CA did not issue.

If you hold the CA's key but keep it out of the deployment, the `certificate-generator` image issues a role certificate in the required form. Run it once for each role:

{% code overflow="wrap" %}

```bash
docker run --rm -u "$(id -u)" -v "$PWD/.vault:/certs" -e CERT_KEYPASS='<vault key password>' \
  --entrypoint issue-client-cert.sh \
  registry.openiam.com/openiam_infra/certificate-generator:<version>-prod \
  services --ca-cert /certs/vault.ca.crt --ca-key /certs/vault.ca.key --out-dir /certs
```

{% endcode %}

Then remove `vault.ca.key` from `.vault/` before you run `./setup.sh`, or the CA key goes into the deployment after all.
{% endtab %}
{% endtabs %}

## The legacy entry `web`

Until 2026.11.2, every client presented Vault's own certificate and signed in to one entry, `web`, whose policy, `openiam`, reaches every secret. 2026.11.2 keeps `web` registered next to the four roles, so that a client this deployment does not start itself, such as a connector on another host that still holds the old `vault.jks`, keeps working through the upgrade. On an upgraded installation `web` stays pinned to the previous server certificate, kept as `vault-web.crt`.

Nothing a 2026.11.2 deployment starts itself signs in as `web` any more, except on an RPM host whose roles are not registered yet and on a [three-node cluster](#how-each-distribution-issues-the-certificates). A component of this release that finds no role certificate, but still finds the previous release's server pair, logs a `WARNING` and signs in as `web`. That fallback goes with `web`.

`VAULT_KEEP_LEGACY_CERT_ROLE` decides whether `web` stays:

| Distribution   | The setting                                                            | Applied by                                                                                                 |
| -------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| RPM            | `VAULT_KEEP_LEGACY_CERT_ROLE` in `/usr/local/openiam/env.conf`         | `client-identities.sh` with the root token, or the next start of Vault on a host that keeps the root token |
| docker-compose | `VAULT_KEEP_LEGACY_CERT_ROLE` in `env.sh`                              | `./startup.sh`                                                                                             |
| Kubernetes     | `openiam.vault.keepLegacyCertRole` in `values/infra/vault.values.yaml` | `./setup.sh`, then the Vault release                                                                       |

**`true` is the default of 2026.11.2 only.** The next release defaults to `false`: setting it to `true` there keeps `web` for one more release. `false` deletes `web` and its policy `openiam`, and on docker-compose and Kubernetes the token role `openiam` as well.

**Move every client to its role before then**, and confirm that nothing still signs in as `web` before you set `false` yourself. A Vault audit device shows each sign-in with the entry it used. Once `web` is gone and nothing needs the previous release any more, `vault-web.crt` and the previous release's files (`vault.jks` among them) can be deleted.

## Verification

{% tabs %}
{% tab title="RPM" %}
{% code overflow="wrap" %}

```bash
/usr/local/openiam/utils/vault/client-identities.sh
```

{% endcode %}

**What you should see:** `PASS` lines for Vault's certificate verifying against the CA and being the one Vault serves, for each of the four roles signing in with its own policy, and for `vault.properties` using the role `services`. `NOTE` lines name what is still left to you. Any `FAIL` line makes the exit code non-zero.
{% endtab %}

{% tab title="docker-compose" %}
{% code overflow="wrap" %}

```bash
docker service logs vault_vault 2>&1 | grep -E 'cert-auth entries registered|legacy cert-auth entry'
docker service logs openiam_esb 2>&1 | grep 'Logged in to Vault'
docker service logs redis_service 2>&1 | grep 'cert-auth role'
```

{% endcode %}

**What you should see:** `cert-auth entries registered: services bootstrap connector ops`, and whether `web` was kept. The ESB signed in `as role 'services'`, and Redis with `cert-auth role ops logged in`.
{% endtab %}

{% tab title="Kubernetes" %}
With `NS` set to the namespace you deployed into:

{% code overflow="wrap" %}

```bash
kubectl logs -n "$NS" vault-0 -c volumeinit
kubectl logs -n "$NS" vault-0 | grep -E 'cert-auth entries registered|legacy cert-auth entry'
kubectl get pods -n "$NS" -o json | jq -r '.items[] | select(.spec.volumes[]?.persistentVolumeClaim.claimName == "openiam-pvc-vault-server") | .metadata.name'
```

{% endcode %}

**What you should see:** the init container's log lists what it kept and what it issued. Vault's log shows `cert-auth entries registered: services bootstrap connector ops`, and whether `web` was kept. The last command prints `vault-0` and nothing else. A service's log shows `Logged in to Vault` `as role 'services'`, and a connector's `as role 'connector'`.
{% endtab %}
{% endtabs %}

## When it goes wrong

| Symptom                                                                                                              | Likely cause                                                                                                                                                                                              | Resolution                                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A service stops at startup with `The TLS handshake with Vault at <url> failed`, naming `vault.ssl.trust-store`       | The host name in its `vault.uri` is not on Vault's certificate, or the service trusts a CA that did not issue Vault's certificate                                                                         | Add the name to Vault's certificate as in [Vault's certificate](#vaults-certificate). After a CA rotation, restart the service so that it reads the new `vault.ca.crt` |
| `Vault at <url> refused the certificate login as role '<role>'`, naming `vault.ssl.key-store`                        | The key store holds a certificate the CA did not issue, or one for another role, or its password is wrong                                                                                                 | Issue the role's certificate again from the CA, and check the key-store password the client is given                                                                   |
| `Vault denied the write of '<key>'`, or `the read of`                                                                | The key is outside the policy of the role the client signed in with                                                                                                                                       | Check that the client uses its own role. A key of your own that no role covers is a question for support, not a policy to widen                                        |
| A Kubernetes pod exits at startup naming a missing key store                                                         | Its role's folder is still empty: Vault's init container has not run since the upgrade                                                                                                                    | Apply the configmap release and the Vault release, then check `kubectl logs vault-0 -c volumeinit`                                                                     |
| `stage-vault-certs.sh` stops with an `ERROR:` line naming what `.vault/` holds                                       | A set that cannot work: a CA certificate with neither its key nor Vault's certificate, one of `vault.crt` and `vault.key` without the other, no `vault.ca.crt`, or a missing role file without the CA key | Complete the set as in [Bring your own CA](#bring-your-own-ca)                                                                                                         |
| `startup.sh` stops after `vault-certs: REFUSED:` and `Nothing was changed.`                                          | `vault/server/vault.ca.crt` without a key the generator can use, and no Vault certificate it issued; or a CA key that is encrypted or does not belong to it                                               | Supply the CA's unencrypted key, or Vault's certificate issued by that CA with the four role certificates. If the CA key is lost, [rotate the CA](#rotate-the-ca)      |
| An RPM host prints `This host cannot issue the Vault certificates`                                                   | No `vault.ca.key`: the certificates come from your organization's CA                                                                                                                                      | Supply the files it lists, then run `client-identities.sh`                                                                                                             |
| An RPM host prints `The Vault client roles (services, bootstrap, connector, ops) are registered with the root token` | A secure deployment, so the roles wait for the root token                                                                                                                                                 | Run `client-identities.sh` with the root token, then restart the services and connectors                                                                               |
| A script or image logs `WARNING: no client certificate of the cert-auth role` and signs in as `web`                  | Its role's files are not mounted where it looks, and the previous release's server pair is                                                                                                                | Give it its role's folder. The fallback stops working when `web` is removed                                                                                            |
| A connector on another host can no longer reach Vault after `web` was removed                                        | It still presents the previous release's `vault.jks`                                                                                                                                                      | Give it the `connector` role's files and `VAULT_CERT_ROLE=connector`                                                                                                   |

## Roll it back

Going back to the release before 2026.11.2 works while `web` is registered. The previous release's clients present the previous server certificate, which `web` stays pinned to, and their files are where they left them: `vault.jks` on RPM, the previous files in the deployment folder on docker-compose, and `vault.jks` with the server pair on the Kubernetes claims. Keep `web` until you no longer need the way back.

## Related

* [Rotate service credentials](https://docs.openiam.com/administration-guide/security/rotate-service-credentials.md): the secrets Vault holds, as opposed to the certificates that open it
* Release-specific steps for [RPM](https://docs.openiam.com/installation/rpm/rpm-upgrade/release-specific-steps.md#vault-and-consul-move-to-new-major-versions) and [Kubernetes](https://docs.openiam.com/installation/kubernetes/kubernetes-upgrade/release-specific-steps.md#vault-and-consul-move-to-new-major-versions): the upgrade that issues these certificates
* [Back up and restore on Kubernetes](https://docs.openiam.com/installation/kubernetes/back-up-and-restore.md): the secret store's data, and the export that still signs in as `web`
* [Change configuration safely](https://docs.openiam.com/administration-guide/start/change-safely.md): the reversibility categories a CA rotation falls under


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/administration-guide/security/vault-client-identities.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
