divviup / divviup/janus

Be consistent about HTTP status in aggregator API on failures

Open
#3,959 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
70
Forks
16
Avg merge
4h 36m
Merged PRs (30d)
30

Description

Glenda Leonard at Mozilla reported that traffic to the aggregator API that didn't appear to originate from Divvi Up's divviup-api. That's to be expected: a listener on the internet will get portscanned and subjected to automated attacks. However these requests apparently yield a variety of HTTP statuses: "they are 302, 400, 401, 404 and 502. with 404 being the highest."

My expectation would be that unauthenticated requests should get uniform responses regardless of the request path or body, to avoid leaking information to attackers. Always 401 Unauthorized is probably fine. I'm also concerned about 502s.

Unfortunately we don't have great information on exactly what routes were being accessed (though apparently they're all GET requests). Still, we should be able to write some tests and do some code audits.

Contributor guide

No contributing guide indexed for this repository

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 by locating the aggregator API's authentication and error-handling entry points, then audit the GET request paths and existing tests relevant to unauthenticated traffic. Done means the relevant request cases are covered by tests and their HTTP failure behavior is consistent, with unexpected 502 responses addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.