Twelve live routes declare no access control
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- graphql, postgresql, typescript
- Ambito
- api, authentication, security
Direzione di ricerca
Start with the guard in tests/openapi.test.ts and its UNDECLARED_LEGACY set, then review the route definitions and the field-level scope handling in #623. Audit existing API keys and their scopes before deciding which routes should be public or require read:prices; for scoped routes, the scope must be granted to existing keys before adding the requirement. Done means each route is resolved and removed from the legacy set, while /graphql remains excluded.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The guard added in 4cd27d5 (tests/openapi.test.ts → "declares access control on every non-internal route") found twelve routes already serving with no API-key scope, no public: true, and no admin config:
| Route | Likely intent |
|---|---|
GET /usage, GET /usage/me |
authenticated — they report the calling key's own usage |
GET /impact/{assetA}/{assetB} |
read:prices |
GET /movers |
read:prices |
GET /rates, GET /rates/{asset} |
read:prices |
GET /correlation |
read:prices |
GET /dispersion, GET /dispersion/{assetA}/{assetB} |
read:prices |
POST /pairs |
the one to look at first — a POST with no declared gate |
GET /graphql, POST /graphql |
deliberate, see below |
They are frozen in a UNDECLARED_LEGACY set in that test so no new route can join them. The list may shrink; it must not grow.
Why they are not simply fixed. Adding a scope to a live route refuses every existing key that lacks it. Keys minted before a scope existed will not carry it, so this is a breaking change for current integrations — the same shape as the offramp auth change that had to ship client-first. It needs a decision and probably a sequence, not a patch.
A workable order:
- Audit which keys exist and what scopes they carry.
- Decide per route: is it genuinely public (then mark
public: trueand the question is closed), or should it requireread:prices? - For the ones that should be scoped, grant the scope to existing keys first, then add the requirement.
- Remove each from
UNDECLARED_LEGACYas it is resolved.
POST /pairs is worth looking at ahead of the rest. The others are reads where the worst case is unmetered access to public market data; a POST that any caller can reach is a different category.
/graphql stays excluded on purpose. #623 enforces scope per field against FIELD_SCOPES, because a single route-level scope cannot describe a document that selects fields with different requirements. Adding one there would be wrong, not missing.
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 71
- Merge medio
- 3g 14h
- PR unite (30g)
- 157
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Divinity-Labs/Lens
-
Webhook retries have no jitter, so failures synchroniseForse già presa @Richard-tobi l’ha presa 11 giorni fa. Apertaarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
Divinity-Labs/Lens#341 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Divinity-Labs/Lens#625 ·
I maintainer di solito rispondono entro 3 giorni
-
area:tests automated live-spec-report
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
Divinity-Labs/Lens#606 · 4 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
The key is accepted only as a bearer token, and nothing says soForse già presa @krsnak l’ha presa 9 giorni fa. Apertaarea:docs difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#512 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
The admin surface has no testsForse già presa @krsnak l’ha presa 9 giorni fa. Apertaarea:testing difficulty:intermediate help wanted points:150 Stellar Wave
Divinity-Labs/Lens#510 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di Divinity-Labs/Lens
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
keptinventory/kept#336 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
hemi-earn
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vetro-protocol/vetro-monorepo#1013 ·
I maintainer di solito rispondono entro 1 giorno