Skip to content
Start free
Documentation menu

Tokens and OIDC

Every request to Quayline carries a credential. Humans sign in to the console with SSO or a password; everything else uses a token or an OIDC exchange.

Token scopes

ScopeGrantsExample
pullRead manifests, blobs, package files and objectspull:tidewater/*
pushPull, plus create and update artifacts. Cannot delete.push:tidewater/api
deleteRemove tags, versions and objectsdelete:tidewater/tmp/*
adminManage repositories, policies and tokens in the pathadmin:tidewater

The default lifetime of a token is 30 days and the maximum is 365. Tokens created without an expiry are refused.

OIDC workload identity

CI systems that issue signed JWTs can sign in without any stored secret. You create a trust policy that says which issuer and which claims are allowed to receive which scopes. The token that comes back lives for 15 minutes.

trust-policy.json
{
  "name": "github-main-build",
  "issuer": "<issuer URL of your CI system>",
  "audience": "quayline",
  "conditions": {
    "sub": "repo:tidewater/api:ref:refs/heads/main",
    "environment": "production"
  },
  "grant": ["push:tidewater/api", "pull:tidewater/*"],
  "max_ttl": "15m"
}

Register it with qln oidc policy create --file trust-policy.json. In a job, qln login --oidc reads the ambient ID token, exchanges it and configures Docker, npm, pip and Maven credential helpers for the duration of the job.

Exchanging a token by hand

terminal
$ curl -s https://fi4.enotcloud.com/api/v1/oidc/exchange \
    -H "Content-Type: application/json" \
    -d '{"org":"tidewater","id_token":"'"$ID_TOKEN"'"}'
{"token":"qlt_live_Zp4c...","expires_in":900,"scopes":["push:tidewater/api","pull:tidewater/*"]}

Rotation

Create the new token, deploy it, then revoke the old one. During the overlap both work. qln token ls --unused 30d lists tokens that have not authenticated in a month and is a good start for a quarterly clean-up.

Leaked tokens

Tokens carry a recognisable prefix and a checksum, so secret scanners in public code hosting can find them. When Quayline receives a report from a scanning partner, or when we spot a token in a public package we host, it is revoked within a minute and organisation owners receive an email with the token name, its last use and the audit log entries for it.

  • Revoke immediately: qln token revoke <id>.
  • Review what it did: qln audit --token <id> --since 7d.
  • Do not wait to rotate; revocation is instant and global.