PolicyEngine / PolicyEngine/policyengine-uk-chat

Unauthenticated conversation reads

Open
#130 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
1
Avg merge
16h 46m
Merged PRs (30d)
2

Description

Problem

Unauthenticated requests can read conversation records.

Observed behavior:

  • Unauthenticated GET /conversations/{id} requests returned 200 for production conversation IDs.
  • Responses included full conversation JSON, including message bodies.

Risk

Conversation contents may be exposed to unauthenticated callers.

Expected behavior

Conversation reads should require authentication, and the backend should only return a conversation when the authenticated user owns or is explicitly allowed to access it.

Acceptance criteria

  • GET /conversations/{id} rejects unauthenticated requests.
  • Authenticated requests are scoped to conversations owned by the authenticated user or explicitly shared with that user.
  • Failed auth/ownership checks return 401 or 403 without conversation bodies.
  • Regression tests cover unauthenticated reads, wrong-user reads, and valid owner reads.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the GET /conversations/{id} endpoint and trace its authentication and ownership checks before reviewing the existing test structure. Add regression coverage for unauthenticated, wrong-user, and valid-owner reads, ensuring rejected responses contain no conversation body. Done means unauthenticated requests are rejected and authenticated access is limited to owned or explicitly shared conversations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, authorization, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.