-
Notifications
You must be signed in to change notification settings - Fork 0
Use Cases codeQ Worker Token Exchange
Osvaldo Andrade edited this page Feb 12, 2026
·
3 revisions
Issue an RS256 access token for codeQ worker operations.
- Authenticated user or service principal
- Tikti API
- codeQ worker/resource server
- Caller has a valid identity token.
- Caller has membership and required permissions in target tenant.
- Target audience and scopes are allowed for requested client/resource.
- Caller requests
POST /v1/accounts/token/exchange?key=API_KEY. - Request includes target
aud, requested scopes, tenant context, and optionaleventTypes. - Tikti validates identity token, tenant membership, and scope policy.
- Tikti issues RS256 access token with claims:
iss,aud,scope,tid,exp,iat, and optionaleventTypes. - Worker presents token to codeQ endpoints.
- codeQ validates token signature and claims against JWKS and policy.
sequenceDiagram
participant C as Caller
participant T as Tikti API
participant J as Tikti JWKS
participant Q as codeQ API
C->>T: POST /v1/accounts/token/exchange?key=API_KEY
T->>T: Validate idToken, membership, scopes, audience
T-->>C: RS256 access token (aud/scope/tid/eventTypes)
C->>Q: Request with Bearer access token
Q->>J: GET /.well-known/jwks.json (cache/fetch)
J-->>Q: Public keys (kid)
Q->>Q: Validate signature + claims
Q-->>C: Authorized response
- Token is accepted only for matching audience and permitted scopes.
- Worker actions are constrained by declared scopes and event types.
- Cross-tenant escalation is blocked.
- Missing membership for tenant -> exchange denied.
- Requested scope outside policy -> exchange denied.
- Audience mismatch at resource server -> request denied by codeQ.