Misleading auth errors: CLOUDFLARE_PROFILE ignored, a missing --profile reported as "No authentication token found", a wrong account id as "Authentication error"

Đang mở
#101 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
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
api, authentication, cli

Hướng nghiên cứu

Start by reproducing the three cf workers list cases and compare them with cf auth whoami; inspect the profile and environment-variable handling referenced by related issue #37. Use FINDINGS.md and the findings/ directory for context. Done means the profile behavior is supported or documented, missing profiles are named, and account-id 403s point users toward checking the account id.

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

Mô tả

not-in-wrangler

cf version: 1.0.0-beta.5, macOS

Three auth and config mistakes produce errors that point the wrong way:

  1. CLOUDFLARE_PROFILE is ignored. CLOUDFLARE_PROFILE=nosuchprofile cf workers list --per-page 1 succeeds with the default credentials. It neither uses nor rejects the profile.
  2. A missing profile reads like a missing login. cf workers list --profile nosuchprofile gives No authentication token found. instead of "profile nosuchprofile not found (available: ...)".
  3. A wrong account id reads like a bad token. CLOUDFLARE_ACCOUNT_ID=00000000000000000000000000000000 cf workers list gives [10000] Authentication error (403). The token is fine; the account id isn't one the token can access.

Expected:

  • honour CLOUDFLARE_PROFILE, or document that it isn't supported;
  • name the missing profile;
  • for a 403 on an /accounts/{id} path, suggest checking the account id (e.g. against cf auth whoami).

Related: #37 (document supported environment variables).

Found while evaluating cf for a dev workflow: https://github.com/joeblew999/cf-cli-test (FINDINGS.md, findings/).

Ngôn ngữ chính
TypeScript
Star
993
Fork
65
Merge trung bình
21 giờ 40 phút
Pull request đã merge (30 ngày)
211

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

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 cloudflare/cf

Tất cả issue của cloudflare/cf

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.