Authelia
Services authenticate with the Authelia client they run as.
Services authenticate with the Authelia client they run as.
Identity proof
The token has to come from https://auth.acme.com, 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
| Field | Example | Advanced | What it pins |
|---|---|---|---|
| Authelia URL | https://auth.acme.com | no | The issuer your public /.well-known/openid-configuration shows. Must be reachable from the internet. |
| Client ID | penv-ci | no | Every machine using this client 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:
| What | Value |
|---|---|
| Issuer | https://auth.acme.com |
| Claim compared | sub |
| Subject | penv-ci |
| Identity name | authelia-penv-ci |
We name the identity for you, so the form never asks for one.
Console snippet
# identity_providers.oidc.clients[] entry:
# grant_types: ['client_credentials']
# scopes: ['authelia.bearer.authz']
# audience: ['YOUR_WORKSPACE_ID']
# token_endpoint_auth_method: 'client_secret_basic'
# access_token_signed_response_alg: 'RS256'
# Ask for this audience and no other. A token requested for two audiences fails every exchange.
# Call the public URL: the issuer is taken from the host the request arrives on.
# $AUTHELIA_CLIENT_ID and $AUTHELIA_CLIENT_SECRET are exported, already on the machine. jq reads
# them from the environment and URL-encodes them, as Basic client credentials must be; curl reads
# the result from stdin. Neither reaches a process list.
URL=$(curl -sS <AUTHELIA_URL>/.well-known/openid-configuration | jq -r .token_endpoint)
T=$(jq -rn '"user = \"\(env.AUTHELIA_CLIENT_ID|@uri):\(env.AUTHELIA_CLIENT_SECRET|@uri)\""' \
| curl -sS -K - "$URL" -d grant_type=client_credentials -d scope=authelia.bearer.authz \
-d audience=YOUR_WORKSPACE_ID | 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 pullThe 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.
Related
- Machine identity
- Connect a Platform in the console
- Authelia documentation: the subject is the value most often set wrong