Authentication & API keys
Interactive sessions
The console authenticates with GitHub OAuth. On success the API issues a signed session in an HttpOnly cookie scoped to the platform domain, so cloud.tngat.com and api.tngat.com share one session without the browser exposing a token to JavaScript.## API keys
Automation and machines use API keys instead of a session. Create one under Organization → API keys (cloud.<domain>/keys), which lists every key in the active organization with its prefix, what it acts as and when it was last used.
curl https://api.tngat.com/api/projects \
-H "Authorization: Bearer $TNGAT_API_KEY"Every key acts as one of two things:
- Your account (the default). It inherits your role at the moment of the
request, and stops working the moment you leave the organization.
- A service account — a machine identity with a name and a team role that
can never sign in interactively. Create these under Organization → Service accounts; their keys are minted from that page or bound to them when you create a key. This is the right choice for CI and long-lived integrations: disabling the identity rejects all of its keys at once without touching a single member.
Key behaviour worth knowing:
- The secret is shown once, at creation. Only a hash is stored, so store it
immediately — a lost key is rotated, not recovered: create the replacement, point the consumer at it, then revoke the old one. Revoking takes effect on the next request.
- A key inherits the identity's role, so a
billingkey cannot deploy
anything — the API returns 403 naming the missing permission rather than an empty list.
- An identity holds at most 10 keys; minting an eleventh is rejected with
400 and the reason, so rotate rather than accumulate.
- Managing keys requires the API-keys permission (
keys:manage), held by
owners, admins and the security role.
- Bind a key to specific source IPs with the organization IP allowlist if
you want a second factor.
Any request with an invalid or revoked key returns401 Unauthorized. A valid key without the required permission returns403 Forbiddenand names the missing permission.