Better reporting of permission errors

Abierto
#764 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
12/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
638
Forks
138
Merge medio
8 h 27 min
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Backblaze/B2_Command_Line_Tool

Todos los issues de Backblaze/B2_Command_Line_Tool

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.