Integration pattern

Authorize sessions and files in your product.

HarnessRouter returns opaque session and file IDs. Your server decides which product user or tenant may continue, cancel, preview, or download them.

Product responsibility

Before run, continue, cancel, preview, or download, derive the current user and tenant from your product's trusted session. Do not trust browser-submitted org, tenant, member, Workspace, harness, session, response, or file identifiers.

Records to keep

  • user_id or tenant principal.
  • feature_key and allowlisted harness_id.
  • session_id and response_id returned by HarnessRouter.
  • Returned file_id, path, media type, and product-visible artifact state.

Checks

  • List only sessions belonging to the current product user or tenant.
  • Continue only sessions mapped to the current user or tenant.
  • Cancel only sessions mapped to the current user or tenant.
  • Preview and download only files mapped to an authorized session.
  • Return a product-level denial when ownership cannot be proven.
Product authorization gate

Make the ownership check before every server-side HarnessRouter call that touches an existing session, response, or file. Return a product-level denial when the mapping is missing.