taskq.xyz / docs / authentication

No customer auth. No execution.

TaskQ authenticates and attributes the customer before policy, credential resolution, placement, spend, settlement, or proof. The bearer is not just access. It is the root of request accountability.

01 · bearer

TaskQ bearer keys identify the customer.

The public Gateway is the only customer-facing surface. Every public request starts with a TaskQ bearer key. If the bearer is missing, expired, revoked, malformed, or outside scope, the request stops before credential lookup, placement, or worker lease.

request auth — Authorization
Authorization: Bearer tq_live_...
Content-Type: application/json
X-TaskQ-Credential: byok://anthropic-prod
X-TaskQ-Policy: must_run_in=CA;trust_floor=audited
02 · tenancy

Use tenant keys and sub-keys for real organizations.

Production customers should not run everything through one undifferentiated key. Use tenant and sub-key boundaries for teams, apps, environments, budgets, default policies, and audit separation.

Tenant — organization root

Owns plan, billing relationship, default policies, and credential inventory.

Sub-key — app / team key

Limits access by environment, product, rate, budget, provider, and policy scope.

Request — execution unit

Every call inherits customer defaults and may only tighten hard constraints.

03 · attribution

Attribution is written into the proof trail.

After authentication succeeds, TaskQ resolves the customer, tenant, sub-key, plan, entitlement, default policy, credential scope, and rate/spend gates. Those decisions become part of the proof surface without exposing raw secrets.

AUTH ATTRIBUTION RECEIPTVERIFIED
customer_idcus_...
tenant_idten_...
sub_keysk_blind:...
credentialcred_fpr:...
policy_defaultsha256:...
auth_resultpassed
✓ request attributed before execution
04 · failures

Auth failures fail closed.

Authentication failures do not trigger placement, worker lease, credential unwrap, provider execution, or billable settlement. Sustained abuse can still create security/audit events.

401
AUTH_INVALID

Missing, malformed, expired, unknown, or revoked bearer.

403
AUTH_SCOPE_DENIED

The bearer is valid but lacks access to the requested endpoint, credential, tenant, or policy.

429
RATE_LIMITED

The key exceeded customer, tenant, endpoint, or plan limits.

402
BALANCE_INSUFFICIENT

The customer or sub-key does not have entitlement or spend capacity for this request.

05 · ordering

Auth gates sit before spend and placement.

TaskQ does not resolve BYOK material or ask the placement engine for capacity until the customer is authenticated and allowed to spend. This keeps upstream credentials and workers out of unauthenticated paths.

gateway order — fail closed
receive
 → authenticate bearer
 → resolve tenant / sub-key
 → check entitlement / balance
 → rate gate
 → merge policy
 → resolve credential handle
 → solve placement
 → open HashIQ entry
 → execute
Next doc
Credentials — register, rotate, revoke, inspect
→