Authentication
Every organization is its own OAuth 2.0 issuer, at its own host. Programs get short-lived access tokens there, limited to the scopes they were given. There are no API keys that last forever.
The organization's issuer
On Passway's cloud, an organization's host is https:// followed by its name and .ext.passway.com. It publishes what clients need to find their way:
/.well-known/oauth-authorization-server: the issuer's metadata (RFC 8414), with its token and revocation endpoints./.well-known/jwks.json: its public signing keys. The same keys sign the event log's checkpoints./oauth/token: the token endpoint./oauth/revoke: revokes a token before it runs out (RFC 7009).
Access tokens are opaque strings starting pwat_. They last an hour.
API clients
Terraform, CI jobs, scripts and back-office systems are API clients. Each has an ID starting apc_, a secret starting pwcs_, and the scopes it may use. It gets tokens with the client credentials grant, sending its ID and secret with HTTP Basic or as form fields:
cURL
curl -X POST https://acme.ext.passway.com/oauth/token \
-u "apc_01jd8k3m2v9x4q7r5t6w8y0z1a:$CLIENT_SECRET" \
-d grant_type=client_credentials
Without scope, the token carries every scope the client has. Asking for a scope it doesn't have fails with invalid_scope rather than quietly giving less.
Send the token on each request:
curl https://acme.ext.passway.com/v1/sites \
-H "Authorization: Bearer pwat_…"
Tokens from your CI or cloud
An API client can trust tokens another platform gives your workload, instead of holding a secret at all. Add a federated credential naming the platform's issuer, the audience, and the subject it must be about:
{
"name": "github-main",
"issuer": "https://token.actions.githubusercontent.com",
"audience": "https://acme.ext.passway.com",
"subject": "repo:acme/infra:ref:refs/heads/main"
}
The workload then presents its platform token to /oauth/token as a client assertion (RFC 7523) and gets the same token a secret would. GitHub Actions, Kubernetes service accounts and other OpenID Connect issuers work this way. subject_pattern matches many subjects, such as every environment of one repository, and claims can pin others, such as GitHub's repository_owner.
Agents
Agents are software agents and robots that act for the organization. They're held to a higher bar than API clients:
- Keys, not secrets. An agent signs a client assertion with one of its own keys (
private_key_jwt, RFC 7523). - Bound tokens. It must send a DPoP proof (RFC 9449), and its tokens are bound to that key. They have
token_typeDPoP, go inAuthorization: DPoP <token>with a fresh proof on every request, and are refused as bearer tokens, so a stolen token is useless. - A person answers for it. Every agent has a human sponsor and an operator. Deactivating or deleting the sponsor suspends their agents, and
/v1/agents:suspendstops a sponsor's, an operator's or every agent at once. - It expires. An agent lasts 90 days unless you say otherwise, and at most 365.
- It can't change who gets in. Scopes such as
people:writeandaccess-assignments:writeare never given to agents.
Scopes
Scopes name a collection and what you may do with it: <collection>:read for reads, and <collection>:write for everything else, such as doors:read or groups:write. Revoking a credential needs credentials:revoke: credentials:write only suspends and resumes them. Each operation in the reference says which scope it needs.
A missing, expired or revoked token gets 401. A token without the scope gets 403 with WWW-Authenticate: Bearer error="insufficient_scope" (RFC 6750).
People in the dashboard
Administrators sign in to the dashboard through the organization's own identity provider. Its tokens are bound with DPoP and last 10 minutes, and they act as the person: what someone may do is the union of their groups' roles, worked out again on every request. Take someone out of a group, and their next request has less.
To see what a given person may do and why, use GET /v1/people/{person_id}/permissions.