Authentication
rbtk supports three auth flows. Use the one that fits your environment.
| Flow | Where it shines | What it stores |
|---|---|---|
| OAuth + system keyring | Local development | Refresh token in the OS keyring |
ROBOTICKS_API_KEY env var | Any CI, scheduled jobs, scripts | Nothing — env-var only |
| GitHub OIDC exchange | GitHub Actions | Ephemeral access token per workflow run |
rbtk auth login on your laptop and ROBOTICKS_API_KEY on your home server. The CLI picks the highest-priority configured source per invocation.
OAuth + keyring (local development)
The browser-based flow is the default for human use. It stores a refresh token in the OS keyring (macOS Keychain, GNOME Keyring, Windows Credential Manager) — never on disk.Logout
API key (CI generic)
For any CI system that isn’t GitHub Actions, mint a project-scoped API key in the dashboard and inject it as an environment variable.Mint a key
- Settings → API keys → New key
- Name it for the consumer (e.g.,
gitlab-ci-warehouse) - Pick a scope:
- Project — most common; key is bound to one project, cannot escape
- Org admin — for org-wide automation; use sparingly
- Optionally set an expiry. Default is 90 days.
- Copy the displayed
rbtk_sk_...value once — it is never shown again.
Use it
- GitLab CI
- Jenkins
- CircleCI
Rotate and revoke
GitHub OIDC (GitHub Actions)
GitHub Actions can mint short-lived OIDC tokens that the platform accepts in exchange for an ephemeral CLI access token. No long-lived secrets in your repo.One-time setup
In the dashboard at Settings → GitHub OIDC, register your GitHub repo (or org) and set the subject claim policy:sub claim matches a policy line.
In your workflow
rbtk auth oidc-from-github reads ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN (auto-injected by GitHub Actions), trades them for a CLI token via /auth/oidc/exchange, and caches the result in memory for the workflow’s lifetime.
You get no secret rotation work and least-privilege out of the box.
Auth precedence
Per invocation, the CLI checks in order:--api-keyflag (rare; mostly for one-off scripts)ROBOTICKS_API_KEYenv var- In-memory OIDC token from a prior
rbtk auth oidc-from-githubin the same process - OS keyring entry from a prior
rbtk auth login
rbtk auth status shows which source the current invocation would use.
Project-scoped vs org-admin
| Project key | Org admin key | |
|---|---|---|
| Sees test results | One project | All projects |
| Creates test runs | One project | All projects |
| Manages billing | No | Yes |
| Manages members | No | Yes |
| Rotates other keys | No | Yes |
Troubleshooting
`401 Unauthorized` from every command
`401 Unauthorized` from every command
OIDC exchange returns `subject does not match policy`
OIDC exchange returns `subject does not match policy`
Your workflow ran on a ref that isn’t allowed by the subject claim policy. Either tighten the workflow’s run conditions or add the ref to the policy at Settings → GitHub OIDC.
Keyring backend not available (headless Linux)
Keyring backend not available (headless Linux)
Install
python3-secretstorage and gnome-keyring, or set ROBOTICKS_API_KEY in the environment as an alternative.Next
Context switching
Pick org and project per invocation.
CI/CD recipes
GitHub Actions, GitLab, Jenkins, CircleCI, BuildKite.