Skip to content

[ROSETTA] Authorizer team policy checks any owner team, not the dataset's owner #295

Description

@isolomatov-gd

`Authorizer.check_team_membership` in `src/rosetta-mcp-server/rosetta_mcp/services/authorizer.py` (lines 68-94) receives `dataset_name` but discards it (` = dataset_name`, line 76). Under `ROSETTA_READ_POLICY=team`, the docstring says access requires membership in the dataset's owner team, but the implementation grants read access if the user is in ANY team visible to the API token with role "owner" — with no correlation to which team actually owns the requested `project-*` dataset.

`tests/test_authorizer.py` only ever exercises a single dataset against a single team, so this per-dataset scoping gap is untested. Effect: under team policy, any team member could read any other team's project dataset. Where: `src/rosetta-mcp-server/rosetta_mcp/services/authorizer.py`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecurity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions