Skip to content

Per-user token isolation for result access control #2

@Par-t

Description

@Par-t

Problem

All users in an instance share a single user_token. Any user who knows another user's submission_id can read their result via GET /results/{id}.

Solution

  1. External auth layer issues a unique token per user instead of one shared token per instance
  2. TEE service tracks ownership: token → set(submission_ids) per instance
  3. GET /results/{id} enforces: token must own the submission_id, otherwise returns 403
  4. Users can hold memberships across multiple instances

Open design questions

  • What should admin see? Current architecture gives admin full result access, but the TEE trust model may require restricting this (e.g., only aggregated stats, not per-submission scores)
  • Should admin access be configurable per skill via the SkillCard?

Relevant code

  • api/routes.py_tokens dict, GET /results/{id}
  • tests/test_e2e.py — documented limitation comment

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