Better reporting of permission errors

未关闭
#764 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
cli

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Python
星标
638
派生
138
平均合并
8 小时 27 分钟
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Backblaze/B2_Command_Line_Tool 的其他 Issue

查看 Backblaze/B2_Command_Line_Tool 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。