Penv Cloud
Start free
Docs
Reference

authentik

Workloads authenticate with the authentik provider they run as.

Workloads authenticate with the authentik provider they run as.

Identity proof

The token has to come from https://authentik.acme.com/application/o/penv/, and its sub claim has to match the workload you named. We compare 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.

Console fields

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.

Trust

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

We name the identity for you, so the form never asks for one.

Console snippet

# 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=$(T="$T" jq -n '{token:env.T}' | curl -sS "https://penv.cloud/api/v1/auth/oidc" \
  -H 'content-type: application/json' --data-binary @- | jq -r .credential)
PENV_TOKEN="$C" penv pull

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