Better reporting of permission errors

Đang mở
#764 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
12/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli

Hướng nghiên cứu

The issue asks for a permission-error report in the CLI: when a 401 occurs, it should name the API call and the permissions that call requires, then compare them with the key's capabilities in a table. The payload names no files or tests, so first find where the CLI handles 401 responses and where key capabilities are parsed. Agreeing on the report format and which calls map to which permissions is design work, so confirm the scope with maintainers before coding.

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

Mô tả

enhancement

Currently 401 errors leave some clues, but can still be difficult to understand. A better way to describe the situation that we might want to see here one day, would look sort of like this:

┌───────────────────────────┬───────────────────────────────┬────────────────┬───────────────┐
│     b2_copy_part call     │        required value         │    your key    │ condition met │
├───────────────────────────┼───────────────────────────────┼────────────────┼───────────────┤
│ writeFiles permission     │ yes                           │ yes            │ YES           │
│ readFiles permission      │ yes                           │ yes            │ YES           │
│ target bucket restriction │ none or MyBucket              │ MyBucket       │ YES           │
│ target prefix restriction │ matching "mydirectory/myfile" │ "mydirectory/" │ YES           │
│ source bucket restriction │ none or MyOtherBucket         │ MyBucket       │ **NO**        │
│ target prefix restriction │ matching "mydirectory/myfile" │ "mydirectory/" │ YES           │
└───────────────────────────┴───────────────────────────────┴────────────────┴───────────────┘

We'd have to know which call triggered the problem, we already have properties of the key, now an api call and permissions it may require should be added to 401 and then turned into a nice report in the CLI.

Ngôn ngữ chính
Python
Star
638
Fork
138
Merge trung bình
8 giờ 27 phút
Pull request đã merge (30 ngày)
8

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 Backblaze/B2_Command_Line_Tool

Tất cả issue của Backblaze/B2_Command_Line_Tool

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.