Skip to content

[P0][Security] Implement centralized authorization and prove tenant isolation across every surface #104

Description

@Ankit6149

Parent epic

#64

Problem

Cloud data, extension targeting, MCP, background jobs, exports, and connectors create many paths to the same workspace resources. Route-level owner checks or UI-hidden controls cannot prove isolation.

Scope

  • Central authorization policy/service for workspace, project, campaign, source, asset, generation, draft, approval, export, connection, publication, job, usage, and audit actions.
  • Authenticated principal and membership/role context derived server-side.
  • Resource lookup verifies workspace ownership before returning object existence or metadata.
  • Jobs persist the initiating actor/policy context but revalidate current authorization before sensitive side effects.
  • Signed upload/download and extension pairing are scoped to explicit resource/operation/expiry.
  • MCP tools and compatibility routes call the same application authorization layer.
  • Admin/operator access, if required, is explicit, audited, least-privilege, and excluded from normal product assumptions.

Threat cases

ID guessing, cross-workspace IDs in nested resources, indirect object references, search/filter leaks, shared asset references, export archives, signed URL reuse, queued job after membership removal, extension target switch, MCP bypass, connector/account reference injection, and cache key omissions.

Acceptance criteria

  • Every protected command/query declares a policy action and resource scope.
  • Tenant A cannot infer Tenant B resource existence through status, timing, search, errors, downloads, jobs, or exports.
  • Membership/role changes affect subsequent requests and queued sensitive actions predictably.
  • Authorization decisions are logged with IDs/result, not private content.
  • Tests cover every role and resource across web, API, jobs, extension, MCP, storage, and publishing.
  • Security review documents unavoidable shared-infrastructure metadata and mitigations.

Evidence

Authorization matrix, automated isolation suite, negative API/MCP/extension tests, signed-resource tests, cache review, job revalidation tests, and manual security review.

Dependencies

#67#73, #78#79, #100.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions