`void platform install --app-access public` fails when Cloudflare reports Access is disabled

Đang mở Phù hợp với người mới
#835 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/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

Bắt đầu trong packages/void/src/cli/platform-app-access.ts tại các dòng 175-241, nơi trình cài đặt kiểm tra Default-Deny thông qua GET /accounts/{account_id}/access/organizations và gửi các 403s vào luồng token của App Access. Theo dõi cách --app-access public và --no-access-protection đi đến kiểm tra đó, sau đó coi phản hồi access.api.error.not_enabled của Cloudflare là thiết lập công khai trong khi các 403s khác giữ nguyên đường dẫn hiện có. Cập nhật các bài kiểm thử CLI bao phủ Access disabled. Hoàn tất khi bản tái hiện kết thúc mà không có lời nhắc token và các lỗi xác thực khác vẫn hiện lời nhắc.

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

Mô tả

Affected version
Void CLI 1.9.1

Steps to reproduce
  1. Start a fresh install in a Cloudflare account where Access is disabled. Set CLOUDFLARE_API_TOKEN to an installer token with the usual install permissions and account-level Access: Organizations, Identity Providers, and Groups Read. Leave VOID_PLATFORM_APP_ACCESS_TOKEN and appAccess.tokenEnv unset.

  2. Use a platform login method that does not rely on Cloudflare Access. Run the following in a non-interactive shell with the rest of your installation settings. --no-access-protection disables Access protection for the platform itself, so the reproduction reaches the separate check for deployed apps.

    void platform install --app-access public --no-access-protection --yes
    
Actual behavior

The install stops while checking whether the account enforces Access Default-Deny.

platform: App access requires VOID_PLATFORM_APP_ACCESS_TOKEN or appAccess.tokenEnv in --auth-config, scoped to the hosting account.

A separate request to GET /accounts/{account_id}/access/organizations with the account-level read permission returned HTTP 403 with access.api.error.not_enabled: Access is not enabled. The 1.9.1 installer sends that response through the same credential flow as other 403 responses. In an interactive install, that flow prompts for an App Access API token. Void CLI 1.9.1 source

Expected behavior

When --app-access public is selected and Cloudflare explicitly reports that Access is disabled, the installer should continue with public app setup without requesting a separate App Access token or creating Access policies. Other authorization failures and accounts with Default-Deny enabled should continue through the existing checks.

Ngôn ngữ chính
TypeScript
Star
684
Fork
83
Merge trung bình
15 giờ 22 phút
Pull request đã merge (30 ngày)
219

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 voidzero-dev/void

Tất cả issue của voidzero-dev/void

Issue tương tự

Thêm issue về TypeScript

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.