Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions server/src/main/resources/rbac_policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ audited:
- admin:role:assign
# 상품 등록·추출은 게이트의 분모를 바꾼다 — 누가 언제 했는지가 남아야 한다 (결정 10.36).
- product:manage
# ❗**루브릭은 채점 정답표다** — 명세 §12.1 6번 행이 「COMPL·MGR·ADMIN 읽기 + **감사 대상**」
# 으로 정했다(#494 9/7 확정). 판매 라인에는 애초에 안 열리지만(`rubric:read` 에 SELLER 가
# 없다), 역할이 있는 사람이 **언제 무엇의 기준을 봤는지**는 남아야 한다 — 7-4 가 역할 부재와
# 범위 분리를 두 층으로 쌓은 것과 같은 결이다.
#
# 이 줄은 열람 프록시(#475)와 **한 몸이다.** 프록시 없이 먼저 넣으면
# `everyAuditedActionIsReachable` 이 「audited 인데 아무도 안 쓰는 action」으로 잡는다 —
# 그래서 #610 에서 비워 두고 여기서 붙인다(#609 ② 의 셋째 칸).
- rubric:read
# ❗S-04 를 **띄운 사실**이 남아야 한다 (`#76` · 기획 7-2 — "누가 무엇을 봤는지 남는다").
# 비audited 인 `session:interview` 를 재사용하면 그 요건이 안 채워진다(이슈 #214).
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ void readAndManageAreDistinct() {
class RubricIsClosedToSalesLine {

private static final Target CATALOG = Target.aggregate();
private final RbacPolicyFile file = new RbacPolicyFile();

@Test
@DisplayName("❗SELLER 는 루브릭을 못 읽는다 — 채점 정답표라 7-4 에 걸린다")
Expand All @@ -419,6 +420,26 @@ void supervisionAndAdminCanRead() {
void custIsNotAReaderHere() {
assertThat(policy.permits(new Actor("cust-01", Role.CUST, null), "rubric:read", CATALOG)).isFalse();
}

/**
* ❗<b>감사 대상이다.</b> 명세 §12.1 6번 행이 <i>"COMPL·MGR·ADMIN 읽기 + 감사 대상"</i>
* 으로 정했다({@code #494} 9/7 확정). 판매 라인에는 애초에 안 열리지만, 역할이 있는
* 사람이 <b>언제 무엇의 기준을 봤는지</b>는 남아야 한다 — 7-4 가 역할 부재와 범위
* 분리를 두 층으로 쌓은 것과 같은 결이다.
*
* <p>이 단정이 {@code rbac_policy.yaml} 의 한 줄을 지킨다. 빠지면
* {@code AuditInterceptor} 가 이 호출을 <b>조용히 넘긴다</b>({@code :63}) — 로그
* 0건이 <i>"아무도 안 봤다"</i> 로 읽히고, 그건 이 action 이 감사 대상인 이유를
* 정면으로 깬다.
*/
@Test
@DisplayName("❗감사 대상이다 — 누가 언제 어느 기준을 봤는지가 남는다 (명세 §12.1 6)")
void readingRubricsIsAudited() {
assertThat(file.audited())
.as("여기서 빠지면 AuditInterceptor 가 이 호출을 조용히 넘긴다 — "
+ "채점 정답표를 열어 본 사실이 아무 데도 안 남는다")
.contains("rubric:read");
}
}

@Nested
Expand Down
Loading