Decide: keep or remove g2 row rendering from schema-defined roles

Abierto
#612 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
15/100
Tipo de issue
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start with ADR 0034 at docs/decisions/0034-permission-dependencies-schema.rst and the discussion in PR #601, then read the earlier issue #523 for context. The payload does not name the renderer code that emits g2 rows from depends_on, so locate it before judging maintenance cost. Done means a recorded keep-or-remove decision, with rationale added to ADR 0034 or a deprecation timeline.

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

Descripción

discovery documentation

Background

ADR 0034 (Permission Dependencies in Authorization Schema) defines how permission dependencies are declared in the authorization schema via an optional depends_on field on permissions. The ADR includes rendering Casbin g2 (action grouping) rows from these dependencies, even though schema-defined roles must list every dependency explicitly.

Current state: The renderer generates g2 rows from the schema's depends_on declarations, maintaining them alongside role definitions in the Casbin policy. This duplicates information already present in role declarations.

Rationale in ADR: g2 rows serve a dual purpose:

  • Visibility in the Casbin policy when consumed directly or for debugging
  • Safety net for database-only roles not validated against the schema

Scope of work

Decide whether the value of g2 rendering justifies its ongoing maintenance cost:

  1. Retention case: Keep g2 rendering for clarity when debugging/auditing Casbin policy directly, and as a safety net for unvalidated database-only roles.
  2. Removal case: Rely entirely on explicit permission listing in role definitions; schema roles are authoritative; no need for g2 duplication.

Trade-offs to evaluate:

  • Debuggability: Direct visibility of g2 rows in the policy (retention helps here)
  • Schema authority: Schema-defined roles list all dependencies; g2 becomes redundant
  • Maintenance: Cost of keeping renderer logic to manage g2 rows
  • Consistency: Risk of drift if g2 rows diverge from schema declarations

Acceptance criteria

  • A decision is made: keep g2 rendering or remove it entirely
  • Decision includes rationale on debuggability vs redundancy trade-off
  • If kept: document in ADR 0034 why g2 rows are rendered despite schema roles being authoritative
  • If removed: outline deprecation timeline for existing installations

References

Lenguaje dominante
Python
Estrellas
0
Forks
10
Merge medio
5 d 12 h
PR fusionados (30 d)
23

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 openedx/openedx-authz

Todos los issues de openedx/openedx-authz

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.