Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat(vault): server-side pinning broker routes

Aperta
#45 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
next.js, typescript
Ambito
api, backend, security

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement helia storage tier-2

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.ts reads NEXT_PUBLIC_PINATA_JWT and services/lighthouse.ts reads NEXT_PUBLIC_LIGHTHOUSE_KEY in 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, /unpin and /quota route 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.

Lingua principale
Python
Stelle
2
Fork
4
Merge medio
6h 54m
PR unite (30g)
7

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QMeshPy/distributed-quantum

Tutte le issue di QMeshPy/distributed-quantum

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.