feat(vault): server-side pinning broker routes
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 54/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- next.js, typescript
Rechercherichtung
Start by locating the existing /api/vault/pin* and /api/vault/quota/* route handlers, the session authentication and user-scoping code, and the Pinata and Lighthouse service adapters. Then read the route handler tests and run them to understand the current conventions. Done means adding authenticated broker routes for pin, unpin, and quota, with mocked-provider tests for success, auth, size limits, and typed errors that do not leak tokens.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Add session-authenticated routes that perform pin, unpin and quota calls to Pinata and Lighthouse on the server, so provider credentials never reach the browser.
Estimated size: M
Motivation
Provider tokens are currently shipped to every browser as NEXT_PUBLIC_* variables.
Current state in this repo
services/pinata.tsreadsNEXT_PUBLIC_PINATA_JWTandservices/lighthouse.tsreadsNEXT_PUBLIC_LIGHTHOUSE_KEYin the browser./api/vault/pin*and/api/vault/quota/*only record audit data; they do not call the providers.
Proposal
- Add
/api/vault/broker/pin,/unpinand/quotaroute handlers, authenticated with the existing session and scoped to the user. - Read credentials from server-only env vars (for example
PINATA_JWT,LIGHTHOUSE_API_KEY); choose the provider by request parameter. - Enforce a request body size limit and basic rate limiting.
- Additive only: leave the browser adapters untouched in this PR (they switch over in the follow-up).
Acceptance criteria
- Unauthenticated requests get 401.
- A pin, unpin and quota call succeeds through the broker against mocked providers.
- No provider secret is read from a
NEXT_PUBLIC_*variable on the broker path. - Errors from the provider are mapped to typed responses without leaking tokens into logs.
Out of scope
- Switching the browser adapters over (separate issue).
- New providers.
Dependencies
- None; can be picked up independently.
Testing plan
- Route handler tests with mocked provider HTTP; auth and size-limit cases.
Part of #43. Ground rules for the content layer: no secrets in the repo, content-layer failures must never block or discard quantum execution, and tests and docs ship with every PR.
- Vorherrschende Sprache
- Python
- Sterne
- 2
- Forks
- 4
- Ø Merge
- 6 Std. 54 Min.
- Gemergte PRs (30 T.)
- 7
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus QMeshPy/distributed-quantum
-
enhancement good first issue helia storage tier-1
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
QMeshPy/distributed-quantum#53 ·
Maintainer antworten meist innerhalb von 1 Tag
-
chain-integration enhancement payments research-spike tier-2
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
QMeshPy/distributed-quantum#78 ·
Maintainer antworten meist innerhalb von 1 Tag
-
chain-integration enhancement payments research-spike tier-2
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
QMeshPy/distributed-quantum#77 ·
Maintainer antworten meist innerhalb von 1 Tag
-
chain-integration enhancement payments tier-2
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
QMeshPy/distributed-quantum#76 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation good first issue kubo storage tier-1
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 42/100
QMeshPy/distributed-quantum#75 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in QMeshPy/distributed-quantum
Ähnliche Issues
-
infrastructure
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
khuisman/mcp-gee-sweet#1152 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
backroom bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
ditto-assistant/ditto-subnet#3069 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
open-webui/open-webui#32901 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
0.3.3 bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag