PolicyEngine / PolicyEngine/policyengine-uk-chat
Unauthenticated conversation reads
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 returned200for 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
401or403without conversation bodies. - Regression tests cover unauthenticated reads, wrong-user reads, and valid owner reads.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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