Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat(vault): server-side pinning broker routes

Đang mở
#45 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
54/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
next.js, typescript
Lĩnh vực
api, backend, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
2
Fork
4
Merge trung bình
6 giờ 54 phút
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QMeshPy/distributed-quantum

Tất cả issue của QMeshPy/distributed-quantum

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.