relax portal gate to grant-holding admins; student audit access on development only (2026-11-17 ruling)

Đang mở
#72 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python

Hướng nghiên cứu

Read docs/environment-access-policy.md and docs/audit-tracing.md first, then trace the portal gate and the can_manage_keys check to identify their entry points. The issue describes a grants existence check and environment-specific AUDIT_ADMINS configuration; verify both environments and the acceptance cases, including that key management stays superadmin-only.

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

Mô tả

Ruling being implemented (2026-11-17)

Recorded on campus#1129 (closed) and encoded in docs/environment-access-policy.md on campus#1120:

  1. Relax the portal gate: any account holding one or more access grants may use campus-admin — instead of the current campus-admin-circle/superadmin-only membership. The campus#883 grants store (GET /auth/v1/grants, the "who can administer what" matrix) is the gate source: signed-in user has ≥ 1 grant row → portal access. Fail-closed like the current gate.
  2. Student audit access is development-only: students may use the audit views/queries on the development environment; the production audit trail stays superadmin/admin-only (AUDIT_ADMINS on prod unchanged).

Implementation sketch

  • Portal gate: replace the circle-membership check with a grants-existence check (a cheap "any grant row where grantee matches the signed-in user" query against the auth service).
  • Audit views keep gating on AUDIT_ADMINS per environment (that var lives on the portal deployment and must be present at portal start — see campus docs/audit-tracing.md "Browser access"): seed the dev portal's AUDIT_ADMINS with the students who should get dev audit access; leave prod as the superadmin list. No code change needed for this half.
  • can_manage_keys stays superadmin-only in both environments regardless of the gate relaxation — key management never opens to students.
  • Verify the two environments actually diverge: dev portal redeploy with the student-inclusive list, prod untouched; smoke on both.

Acceptance

  • A grant-holder who is not in the campus-admin circle can sign into the portal.
  • A student on the dev portal can open audit views; the same account cannot open them on prod (403/redirect).
  • Key management (can_manage_keys) remains superadmin-only on dev and prod.
Ngôn ngữ chính
Python
Star
0
Fork
0
Merge trung bình
13 phút
Pull request đã merge (30 ngày)
62

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 nyjc-computing/campus-admin

Tất cả issue của nyjc-computing/campus-admin

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.