livepeer / livepeer/studio

Implement IP Blocklist

Open
#993 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
88
Forks
37
PR merge metrics
No merged PRs in 30d

Description

New, fairly simple REST endpoint to allow blocking IPs.

~~Can be stored as Postgres's `cidr` type to make things easy to query. https://www.postgresql.org/docs/current/datatype-net-types.html~~ Probably overkill to implement a custom database model for this because we don't anticipate using this to query very frequently.

```
{
"id",
"cidr",
"expiresAt" # millisecond
"createdAt" # millisecond
}
```

API endpoints:
* `GET /api/api-block`
* `POST /api/ip-block`
* `PUT /api/ip-block/:id`
* `DELETE /api/ip-block/:id`

All of this requires `{anyAdmin: true}` but down the road we'll want to think about a "moderator" user type.

Also we want an admin dashboard for this.

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 by locating existing REST endpoints, admin authorization checks, and dashboard patterns in the repository. Review the proposed GET, POST, PUT, and DELETE /api/ip-block routes and the id, cidr, expiresAt, and createdAt fields. Done means the endpoint behavior and admin dashboard scope are defined and implemented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, authorization, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.