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

オープン
#612 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python
領域
authorization

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
0
フォーク
10
平均マージ
5日 12時間
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openedx/openedx-authz のほかの issue

openedx/openedx-authz の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。