Docs
Reference

authentik

Workloads authenticate with the authentik provider they run as.

Workloads authenticate with the authentik provider they run as.

What proves the identity

The token has to come from https://authentik.acme.com/application/o/penv/, 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
Provider issuer URLhttps://authentik.acme.com/application/o/penv/noProvider → Overview → OpenID Configuration Issuer, copied whole. Issuer mode must be per-provider. Must be reachable from the internet.
Service account UUIDa1b2c3d4-0000-0000-0000-000000000000noDirectory → Users → the ak-…-client_credentials account, which appears after the snippet's first token request. Every machine holding this client secret matches.

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://authentik.acme.com/application/o/penv/
Claim comparedsub
Subjecta1b2c3d4-0000-0000-0000-000000000000
Identity nameauthentik-a1b2c3d4-0000-0000-0000-000000000000

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

The snippet the console prints

# Provider → set Client ID to YOUR_WORKSPACE_ID.
# Subject mode → "Based on user UUID". The default hashes the user id, which no console shows.
# Pick an RSA or a P-256/P-384 EC signing key. A provider with none signs HS256, and a
# P-521 key signs ES512; neither is an algorithm we verify.
# $AUTHENTIK_CLIENT_SECRET is this provider's own secret, already on the machine.
T=$(printf 'grant_type=client_credentials&client_id=%s&client_secret=%s&scope=profile' \
  "$AUTHENTIK_CLIENT_ID" "$AUTHENTIK_CLIENT_SECRET" \
  | curl -sS https://<AUTHENTIK_HOST>/application/o/token/ --data-binary @- \
  | jq -r .access_token)
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.