Penv Cloud
Start free
Docs
Reference

LemonLDAP::NG

Services authenticate with a LemonLDAP::NG relying party whose client id is your workspace id. One identity per portal per workspace.

Services authenticate with a LemonLDAP::NG relying party whose client id is your workspace id. One identity per portal per workspace.

Identity proof

The token has to come from https://auth.acme.com, and its sub claim has to hold YOUR_WORKSPACE_ID, which we build from your workspace id. We compare that claim byte for byte, with no wildcards.

That value is the same for every identity on the issuer, so your workspace connects one per issuer. A second connect on it is refused until you revoke the first.

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
Issuer URLhttps://auth.acme.comnoThe issuer your /.well-known/openid-configuration shows, copied exactly. Must be reachable from the internet. Its client id is your workspace id, so this is your one identity here.

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://auth.acme.com
Claim comparedsub
SubjectYOUR_WORKSPACE_ID
Identity namellng-auth-acme-com

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

Console snippet

# LemonLDAP::NG, once: an OpenID Connect relying party, not public, with
#   Client ID = YOUR_WORKSPACE_ID
#   Allow OAuth2.0 Client Credentials Grant = on, Use JWT format for Access Token = on
#   Additional audiences empty, User attribute left at its default, signature alg RS256.
#   Token exchange authorized RPs: empty.
# We know this client only by its id, which is your workspace id, so:
#   use the client for Penv alone: every token it gets names your workspace, wherever it is sent;
#   allow it client credentials alone, with no redirect URI, so nobody signs in through it;
#   one identity per portal per workspace, since the client id is now taken.
# Ask for this audience and no other. A token requested for two audiences fails every exchange.
# $LLNG_CLIENT_SECRET is this relying party's own secret, already on the machine.
URL=$(curl -fsS "<ISSUER>/.well-known/openid-configuration" | jq -r .token_endpoint)
T=$(jq -jn --arg id "YOUR_WORKSPACE_ID" \
  '"grant_type=client_credentials&client_id=\($id|@uri)&client_secret=\((env.LLNG_CLIENT_SECRET // "" | if . == "" then error("LLNG_CLIENT_SECRET is not set") else . end)|@uri)&scope=openid"' \
  | curl -fsS "$URL" --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.