Governance and security

OAuth apps and scopes

Let other applications act on UserTasks with OAuth 2.0: discovery, PKCE, client credentials, consent, refresh and revocation.

UserTasks is an OAuth 2.0 authorization server for its own API and MCP server.

EndpointPurpose
/.well-known/oauth-authorization-serverAuthorization server metadata
/.well-known/oauth-protected-resourceProtected resource metadata (for MCP clients)
/api/oauth/registerDynamic client registration
/api/oauth/authorize → /oauth/consentAuthorization code flow with PKCE (S256) and user consent
/api/oauth/tokenauthorization_code, refresh_token and client_credentials grants
/api/oauth/revokeToken revocation

Register apps in Settings → OAuth Apps (public or confidential, redirect URIs, grant types, allowed scopes) or let MCP clients register themselves dynamically.

Security properties

  • Authorization codes are single use; replaying one revokes the tokens issued with it (security.oauth.code_replay).
  • Refresh tokens rotate on every use; presenting an old one revokes the family (security.oauth.refresh_reuse).
  • Consent, token issue and revocation are audited security events.
  • A token's permissions are the intersection of its scopes and the user's current permissions, re-checked on every request.

Scopes

Scopes are coarse grants that expand to permissions. Generated from lib/oauth/scopes.ts:

ScopeGrantsExpands to
tasks:readRead tasks and their statustasks.view_own tasks.view_all
tasks:writeCreate, assign, complete, and manage taskstasks.view_own tasks.view_all tasks.create tasks.assign tasks.complete tasks.redirect tasks.escalate tasks.delete tasks.manage_queue
workflows:readRead workflow definitions and run historyworkflows.view workflows.view_runs
workflows:writeCreate, edit, activate, and start workflowsworkflows.view workflows.view_runs workflows.create workflows.edit workflows.activate workflows.delete workflows.manage_runs
data:readRead data tables and rowsdata.view
data:writeCreate and modify data tables and rowsdata.view data.create data.edit_schema data.manage_rows data.delete
reports:readRead reportsreports.view
reports:writeCreate, edit, share, and delete reportsreports.view reports.create reports.edit_own reports.share reports.delete
agents:readRead AI agent definitionsagents.view
agents:writeCreate, edit, test, and delete AI agentsagents.view agents.create agents.edit agents.test agents.delete
integrations:readRead integrations, connectors, and referencesintegrations.view
integrations:writeCreate, edit, test, and delete integrations, connectors, and referencesintegrations.view integrations.create integrations.edit integrations.test integrations.delete integrations.manage_references
extensibility:readRead custom workflow activitiesextensibility.view
extensibility:writeCreate, edit, and delete custom workflow activitiesextensibility.view extensibility.create extensibility.edit extensibility.delete
settings:readRead workspace settingssettings.view
settings:writeEdit workspace settings and webhookssettings.view settings.edit settings.manage_webhooks
team:readRead workspace members and teamsteam.view_members
team:writeInvite and remove members, and change their rolesteam.view_members team.invite team.remove team.change_roles
sync:readRead GitHub sync status and historysync.view
sync:writeManage GitHub sync and run deploymentssync.view sync.manage sync.deploy
packages:readRead packages, their versions and the installed package librarypackages.view
packages:writeAuthor, build, install, upgrade and uninstall packagespackages.view packages.manage packages.install
events:readRead and stream workflow, integration, agent and task events (audit and security events also need settings:read)observability.view
workflows:runStart workflows and read run historyworkflows.view workflows.view_runs workflows.create workflows.edit workflows.activate workflows.delete workflows.manage_runs
config:readExport workspace configuration (workflows, rules, tables, integrations, agents, reports) and read packagesworkflows.view workflows.view_runs data.view integrations.view extensibility.view agents.view reports.view packages.view settings.view
config:writeImport and update workspace configuration (workflows, rules, tables, integrations, agents, reports), and author and install packagesworkflows.view workflows.view_runs workflows.create workflows.edit workflows.activate workflows.delete workflows.manage_runs data.view data.create data.edit_schema data.manage_rows data.delete integrations.view integrations.create integrations.edit integrations.test integrations.delete integrations.manage_references extensibility.view extensibility.create extensibility.edit extensibility.delete agents.view agents.create agents.edit agents.test agents.delete reports.view reports.create reports.edit_own reports.share reports.delete packages.view packages.manage packages.install settings.view settings.edit
keys:write (first-party CLI only)Create and revoke API keys on your behalfsettings.view settings.manage_api_keys
mcpConnect via MCP (Model Context Protocol)access to /api/mcp (tools still need their permissions)
adminFull administrative access to the workspace APIevery permission

The UserTasks CLI is a first-party client: usertasks login requests every scope except keys:write unless you pass --scopes.