Consolidate data access control backoffice updates

This commit is contained in:
devmrko
2026-07-13 23:06:23 +09:00
parent 403298d474
commit e18b30feab
181 changed files with 11571 additions and 954 deletions

View File

@@ -0,0 +1,109 @@
<!doctype html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/layout :: head('컬럼 원문 표시 허용 사용자')}"></head>
<body>
<nav th:replace="~{fragments/layout :: nav}"></nav>
<main class="container py-4">
<div class="page-title">
<h1>컬럼 원문 표시 허용 사용자</h1>
<details class="explanation-details">
<summary>도움말</summary>
<p>이 화면은 <a href="/masking-rules">컬럼 마스킹</a>에서 연결한 기본 컬럼 마스킹 규칙에 대해 <strong>원문 표시 허용(UNMASK)</strong> 사용자만 관리합니다. 이 목록에 없는 사용자는 행 접근 정책이 조회를 허용하더라도 해당 컬럼의 마스킹값을 받습니다.</p>
<p>행 접근 여부는 변경하지 않습니다. 행 접근 권한이 없으면 행을 볼 수 없고, 행 접근 권한이 있으며 이 목록에 없으면 마스킹값을 봅니다. 행 접근 권한이 있고 이 목록에 있으면 그 허용 범위 안에서만 원문을 봅니다. 저장한 변경은 DBMS_REDACT가 읽는 세션 context에 반영됩니다.</p>
</details>
</div>
<div class="alert alert-success" th:if="${message}" th:text="${message}"></div>
<div class="alert alert-danger" th:if="${errorMessage}" th:text="${errorMessage}"></div>
<section class="content-band">
<h2>컬럼 원문 표시 허용 사용자 추가</h2>
<p class="section-subtitle">먼저 컬럼 마스킹 화면에서 민감 컬럼에 활성 규칙을 연결하세요. 이 등록은 원문 표시만 허용하며 행 접근 권한은 부여하지 않습니다.</p>
<form method="post" action="/user-masking-rules" class="form-grid">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
<label>
원문 표시를 허용할 사용자
<select class="form-select" name="userId" required>
<option value="">선택하세요</option>
<option th:each="user : ${users}" th:value="${user.userId()}" th:attr="data-user-label=${user.username()}"
th:text="${user.username() + ' (' + user.empNo() + ')'}">KB_VPD_ADMIN</option>
</select>
</label>
<label>
원문 표시 허용 대상 컬럼
<select class="form-select" name="columnId" required>
<option value="">선택하세요</option>
<option th:each="columnRule : ${columnRules}" th:value="${columnRule.columnId()}"
th:attr="data-target=${columnRule.targetLabel()},
data-template=${columnRule.template().label()},
data-result=${columnRule.template().previewResult()},
data-aso-function=${columnRule.template().asoFunction()},
data-context=${'MR_' + columnRule.columnId()}"
th:text="${columnRule.targetLabel() + ' · ' + columnRule.ruleLabel()}">KB_CUSTOMERS.RRN_MASKED</option>
</select>
</label>
<div>
<span class="form-label">적용 결과</span>
<div class="form-control bg-light" aria-label="적용 결과">행 접근 정책이 허용한 행에서만 원문 표시 · UNMASK</div>
</div>
<button class="btn btn-primary" type="submit">컬럼 원문 표시 허용 등록</button>
</form>
<div class="policy-preview mt-3" data-masking-exception-preview>
<h3>선택한 컬럼의 실제 적용 결과</h3>
<p class="section-description" data-masking-preview-empty>원문 표시 허용 대상 컬럼을 선택하면 일반 사용자와 허용 사용자의 반환값을 보여줍니다.</p>
<dl data-masking-preview-details hidden>
<div>
<dt>대상 · DB 마스킹 방식</dt>
<dd data-masking-preview-target>-</dd>
</div>
<div>
<dt>행 접근 권한이 없는 사용자</dt>
<dd>행 자체가 반환되지 않습니다.</dd>
</div>
<div>
<dt>행 접근 허용 · 원문 표시 허용 없음</dt>
<dd data-masking-preview-masked>-</dd>
</div>
<div class="policy-preview-emphasis">
<dt>행 접근 허용 · 원문 표시 허용 사용자</dt>
<dd data-masking-preview-unmasked>-</dd>
</div>
<div>
<dt>DB 판정 기준</dt>
<dd data-masking-preview-context>-</dd>
</div>
</dl>
</div>
</section>
<section class="content-band">
<h2>컬럼 원문 표시 허용 사용자 목록</h2>
<p class="section-subtitle">목록에 없는 사용자는 행 접근 정책이 허용한 행에서 기본 마스킹값을 봅니다.</p>
<div class="table-responsive">
<table class="table table-sm align-middle">
<thead><tr><th>사용자</th><th>대상 컬럼</th><th>기본 규칙</th><th>원문 표시 상태</th><th>상태</th><th></th></tr></thead>
<tbody>
<tr th:each="userRule : ${userRules}">
<td th:text="${userRule.username()}">KB_VPD_ADMIN</td>
<td><code th:text="${userRule.targetLabel()}">POC_2.KB_CUSTOMERS.RRN_MASKED</code></td>
<td th:text="${userRule.ruleLabel()}">주민번호 기본 마스킹 · 주민등록번호 부분 마스킹</td>
<td><span class="badge" th:classappend="${userRule.unmasked()} ? ' text-bg-success' : ' text-bg-secondary'" th:text="${userRule.decisionLabel()}">원문 표시 예외</span></td>
<td th:text="${userRule.activeYn()}">Y</td>
<td>
<form method="post" action="/user-masking-rules/delete" class="inline-form">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
<input type="hidden" name="userId" th:value="${userRule.userId()}">
<input type="hidden" name="columnId" th:value="${userRule.columnId()}">
<button class="btn btn-sm btn-outline-danger" type="submit">원문 표시 허용 해제</button>
</form>
</td>
</tr>
<tr th:if="${#lists.isEmpty(userRules)}"><td colspan="6" class="text-muted">원문 표시 허용 사용자가 없습니다. 행 접근 정책이 허용한 사용자에게 기본 컬럼 마스킹 규칙이 적용됩니다.</td></tr>
</tbody>
</table>
</div>
</section>
</main>
</body>
</html>