Security
Scopes
| Scope | Who Can Read | Who Can Write |
|---|---|---|
personal | Only the creator | Only the creator |
project | Project members | Only the creator |
global | Everyone | Only the creator |
Row Level Security (RLS)
Every database query is filtered by PostgreSQL RLS policies:
- Knowledge: Scope-based visibility enforced at the database level
- Comments: Visible if the parent knowledge is visible
- Resolves: Visible if the parent knowledge is visible
- Project members: Visible to project members only
- Security rules: Modifiable by project admins only
API Authentication
Two methods:
- Bearer Token —
Authorization: Bearer wt_xxx(CLI, MCP, API) - Cookie Auth — Supabase session cookie (Web UI)
API keys are SHA-256 hashed before storage. Original keys are never stored.
Project Roles
| Role | Permissions |
|---|---|
admin | Full access: invite, remove, change roles, manage security rules |
member | Create, read, update, delete own knowledge. Read project knowledge |
viewer | Read-only access to project knowledge |