Docs
Reference

HashiCorp Vault

Workloads authenticate with the Vault identity their role issues a token for.

Workloads authenticate with the Vault identity their role issues a token for.

What proves the identity

The token has to come from https://vault.acme.com/v1/identity/oidc, and its sub claim has to match the workload you named. penv compares that claim byte for byte, with no wildcards.

Every token also has to name your workspace as its audience. Ask for this audience and no other. A token requested for two audiences fails every exchange.

What the console asks for

FieldExampleAdvancedWhat it pins
Issuer URLhttps://vault.acme.com/v1/identity/oidcnoYour Vault address with /v1/identity/oidc appended, reachable from the internet.
Entity ID3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0anoThe sub of a token the role issues. Many machines on one role share it.

The console also asks which project and environment this identity reaches and which role it gets, with the credential lifetime behind Advanced.

What the trust holds

Built from the example answers above:

WhatValue
Issuerhttps://vault.acme.com/v1/identity/oidc
Claim comparedsub
Subject3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a
Identity namevault-5f4e3d2c1b0a

penv names the identity for you, so the form never asks for one.

The snippet the console prints

# vault write identity/oidc/key/penv allowed_client_ids="YOUR_WORKSPACE_ID"
# vault write identity/oidc/role/penv key=penv client_id="YOUR_WORKSPACE_ID"
T=$(vault read -field=token identity/oidc/token/penv)
C=$(curl -sS "https://penv.cloud/api/v1/auth/oidc" \
  -H 'content-type: application/json' \
  -d "{\"token\":\"$T\"}" | jq -r .credential)
PENV_TOKEN="$C" penv pull

The snippet finishes with penv pull, which writes a file. penv run is the path the docs teach for a process, and penv pull is for a host that needs a file on disk. Connect your CI has the wrapped step.