CI/CD Authentication
Pipeline agents (Azure DevOps, GitHub Actions, and similar) have no display and no human available to click through a browser login. Neither of lore login’s flows works there:
- Default /
--orgopens a local browser via a loopback listener — there’s no browser on the agent at all. --devicedoesn’t need a browser on the agent, but it still needs a human to open the printed URL and approve the sign-in somewhere else, and then the CLI blocks polling until that happens. A pipeline run can’t wait on that.
If your Registry has Personal Access Tokens enabled (Settings → Personal Access Tokens shows up in the panel), use that instead — it’s self-renewing, so it doesn’t need the manual daily rotation this page describes. This page is the fallback for registries where that panel feature isn’t available (e.g. LORE_DEX_ADMIN_ADDR isn’t configured on a self-hosted Registry).
The path described below for unattended environments is the static token: set the LORE_AUTH_TOKEN environment variable and skip lore login entirely.
Token resolution order
Every command that needs auth resolves the token in this order (highest priority first):
--token <value>flag (per-invocation override)LORE_AUTH_TOKENenvironment variable~/.config/lore/tokens.json(written bylore login, refreshed automatically when expired)auth_tokenin~/.config/lore/config.yaml
CI pipelines should use #2. Options #3 and #4 assume a lore login was run on that machine, which doesn’t apply to ephemeral agents.
This path has no self-renewal: a human has to run lore login once and hand the resulting token to the pipeline, and that token expires like any other. See Limitations below before relying on this for anything long-running — or use a Personal Access Token instead, which doesn’t have this problem.
Step 1 — Obtain a token
On your own machine, sign in normally:
lore login --registry https://registry.lore.infraestrutura.appThis writes ~/.config/lore/tokens.json, keyed by registry URL. Extract the id_token for the registry you authenticated against:
# macOS/Linux
jq -r '.["https://registry.lore.infraestrutura.app"].id_token' ~/.config/lore/tokens.jsonUse id_token, not access_token. Dex’s access_token can be an opaque string, but id_token is always a signed JWT — and the Registry validates Bearer tokens against the IdP’s JWKS, which requires a JWT.
Prefer a token from an account meant for automation (e.g. a shared “CI” identity in your org’s IdP connector) rather than a personal account, so the pipeline doesn’t break when someone’s individual session is revoked.
Step 2 — Store it as a pipeline secret
Azure DevOps — add it as a secret variable in a Variable Group (Pipelines → Library), or as a secret pipeline variable:
# azure-pipelines.yml
variables:
- group: lore-ci-credentials # contains LORE_AUTH_TOKEN as a secret variable
steps:
- script: |
lore pull m1cloud/azure-architect
env:
LORE_AUTH_TOKEN: $(LORE_AUTH_TOKEN)GitHub Actions — store it as a repository or organization secret:
steps:
- run: lore pull m1cloud/azure-architect
env:
LORE_AUTH_TOKEN: ${{ secrets.LORE_AUTH_TOKEN }}Never commit the token, echo it to logs, or put it in ~/.config/lore/config.yaml inside a shared image — treat it exactly like any other Bearer credential.
Limitations & token expiration
LORE_AUTH_TOKEN is used as-is, with no refresh. The automatic-refresh logic (via the stored refresh_token) only runs on the tokens.json path (option #3 above) — it never triggers for the env var or --token flag. Once the JWT in LORE_AUTH_TOKEN expires, every pipeline run fails with unauthorized until someone repeats Step 1 and rotates the secret.
Token lifetime is controlled by Dex’s expiry.idTokens setting. This deployment doesn’t override it, so it runs on Dex’s default of 24 hours. In practice this means:
- For pipelines that run more than once a day, plan on rotating this secret roughly daily, or scripting the rotation — there’s no built-in renewal on this path.
- If that’s more rotation overhead than you want, that’s exactly what a Personal Access Token solves: create one from the panel instead, and skip the manual rotation entirely.
Read operations against public namespaces don’t require any token at all — only skip this setup if your pipeline only ever pulls public packages.