Scoped tokens: supabase link needs API Key Secrets even though db push only needs the DB password
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- authentication, cli
Hướng nghiên cứu
The failing call is GET /v1/projects/<ref>/api-keys, made during supabase link after the project lookup succeeds; start by finding where link requests API keys and whether a 403 there aborts the command. Reproduce with a project-scoped token that lacks API Key Secrets, then run the link command with --debug to confirm the failing request. Done means link completes without the secret keys, or a 403 names the missing permission in missing_permissions as the docs describe.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Affected area
Auth
Supabase CLI version
2.108.0
Operating system
Ubuntu 24.04 (GitHub Actions ubuntu-latest); also reproduced on Windows 11
Installation method
None
Command
SUPABASE_ACCESS_TOKEN=<project-scoped PAT> supabase link --project-ref <ref> --debug
Actual output
Using access token from env var...
Supabase CLI 2.120.0
HTTP GET: https://api.supabase.com/v1/projects/<ref>
HTTP GET: https://api.supabase.com/v1/projects/<ref>/api-keys
Authorization failed for the access token and project ref pair: {"message":"Your account does not have the necessary privileges to access this endpoint. For more details, refer to our documentation https://supabase.com/docs/guides/platform/access-control"}
Expected behavior
supabase link (followed by supabase db push) works with a project-scoped token that has Migrations read-write and project/database read, without needing API Key Secrets. db push uses the database password and never needs the secret service_role key, so link shouldn't fetch secret keys, or should skip them when the token lacks API Key Secrets. If a permission is missing, the 403 should name it in missing_permissions, as the docs say.
Steps to reproduce
- Create a scoped personal access token (resource access: one project) with: Migrations read-write; Project Settings, Database, Database Config, Connection Pooling, API Keys read. Created by the organization Owner.
- Run: SUPABASE_ACCESS_TOKEN= supabase link --project-ref --debug
- It fails on GET /v1/projects//api-keys with "Your account does not have the necessary privileges to access this endpoint".
- Add API Key Secrets: read to a new token → link succeeds.
Workaround: supabase db push --db-url (no link, no token).
Crash report ID
No response
Docker and service versions
Additional context
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 2.4k
- Fork
- 533
- Merge trung bình
- 22 giờ 20 phút
- Pull request đã merge (30 ngày)
- 370
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của supabase/cli
-
🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructiveCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở✨ Feature supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
stack: the HTTP gateway closes idle keep-alive connections after 5 s, so a client whose event loop is blocked gets ECONNRESET (`fetch failed`) on its next requestCó thể đã có người làm @7ttp đã nhận 12 ngày trước. Đang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
supabase/cli#6975 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
📘 Docs supabase/cli
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
supabase/cli#6974 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Migration error caret is missing or misplaced when the statement contains multibyte charactersĐang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
stellar/stellar-dev-skill#151 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Trial & Error: guided Blind offer squeezes on phones and sits under the touch toolbar on iPadĐang mởarea:arcade game ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
fderuiter/deruiter.dev#2281 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scope: data grid type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vicharanashala/ajrasakha#1439 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: TV5Monde AsieĐang mởapproved check:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày