feat(vault): server-side pinning broker routes
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 54/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- next.js, typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 2
- Forks
- 4
- Merge médio
- 8h 37min
- PRs com merge (30d)
- 29
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de QMeshPy/distributed-quantum
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
QMeshPy/distributed-quantum#112 ·
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue helia storage tier-1
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
QMeshPy/distributed-quantum#53 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
QMeshPy/distributed-quantum#111 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
QMeshPy/distributed-quantum#110 ·
Mantenedores costumam responder em até 1 dia
-
Integrate persistent collaborative EtherCalc workbooks with experiment results and IPFS versionsTalvez já em andamento @Winter-Soren assumiu há 1 dia. Aberta
QMeshPy/distributed-quantum#103 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de QMeshPy/distributed-quantum
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagationTalvez já em andamento @muskan-creates352 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
mllam/neural-lam#848 ·
Mantenedores costumam responder em até 2 dias
-
infra
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
fab-geocommuns/RNB-coeur#1166 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
deepspeedai/DeepSpeed#8951 ·
Mantenedores costumam responder em até 2 dias