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

Đang mở
#612 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
15/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
authorization

Hướng nghiên cứu

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.

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

Mô tả

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

Ngôn ngữ chính
Python
Star
0
Fork
10
Merge trung bình
5 ngày 12 giờ
Pull request đã merge (30 ngày)
23

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

Tất cả issue của openedx/openedx-authz

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.