Project API keys #29

Closed
opened 2026-10-15 01:05:08 -04:00 by vmanne-poc · 1 comment
Owner

Goal: let other systems (a website sign-up flow, a CRM sync, scripts) call the Postak API for one project without using a person's login.

Plan

  • Keys: per project, created by owners. Each key has a name, optional scopes (for example contacts:write and campaigns:send), an optional expiry, and a last-used time.
  • Storage: the key is shown once at creation and stored only as a hash (with a short prefix kept for display). A key can be revoked.
  • Auth: Authorization: Bearer pk_..., accepted on project-scoped routes only. A key can only reach its own project. Account, user and admin routes stay off-limits to keys.
  • API Keys page in the project.
  • Rate limiting per key.
  • Every key use is attributable (key id appears in logs).

Done when

  • e2e tests show:
    • a key can't reach another project or the admin routes
    • revoked and expired keys get 401
    • scopes are enforced
    • the plain key is never returned again after creation
**Goal:** let other systems (a website sign-up flow, a CRM sync, scripts) call the Postak API for one project without using a person's login. **Plan** - **Keys:** per project, created by owners. Each key has a name, optional scopes (for example `contacts:write` and `campaigns:send`), an optional expiry, and a last-used time. - **Storage:** the key is shown once at creation and stored only as a hash (with a short prefix kept for display). A key can be revoked. - **Auth:** `Authorization: Bearer pk_...`, accepted on project-scoped routes only. A key can only reach its own project. Account, user and admin routes stay off-limits to keys. - **API Keys page** in the project. - **Rate limiting** per key. - Every key use is attributable (key id appears in logs). **Done when** - e2e tests show: - a key can't reach another project or the admin routes - revoked and expired keys get 401 - scopes are enforced - the plain key is never returned again after creation
Author
Owner

Requirements not delivered in v0.15.0 are tracked in Phase 13.1 (v0.15.1): #70 scopes, #71 expiry, #72 per-use key logging, #74 flaky rate-limit e2e test, #75 nginx upstream re-resolution.

Requirements not delivered in v0.15.0 are tracked in Phase 13.1 (v0.15.1): #70 scopes, #71 expiry, #72 per-use key logging, #74 flaky rate-limit e2e test, #75 nginx upstream re-resolution.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vmanne-poc/Postak#29
No description provided.