Files
vpd-permission-poc/docs/assets/agent-ords-security-two-scenarios.svg

106 lines
5.6 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="800" viewBox="0 0 1280 800" role="img" aria-labelledby="title desc">
<title id="title">두 가지 사용자 식별 및 권한 매핑 시나리오</title>
<desc id="desc">DB User 기반과 Bearer Key 기반의 사용자 식별 차이와 공통 DB 보안 적용 흐름.</desc>
<rect width="1280" height="800" fill="#f8fafc"/>
<defs>
<marker id="arrow" markerWidth="9" markerHeight="9" refX="7.5" refY="4.5" orient="auto">
<path d="M 0 0 L 9 4.5 L 0 9 z" fill="#475569"/>
</marker>
<style>
.h1 { font-family: Arial, Helvetica, sans-serif; font-size: 36px; font-weight: 700; fill: #0f172a; }
.sub { font-family: Arial, Helvetica, sans-serif; font-size: 20px; fill: #475569; }
.panel { fill: #ffffff; stroke: #cbd5e1; stroke-width: 2; }
.panel-a { fill: #f8fbff; stroke: #2563eb; stroke-width: 2; }
.panel-b { fill: #fffaf5; stroke: #ea580c; stroke-width: 2; }
.shared { fill: #f7f5ff; stroke: #7c3aed; stroke-width: 2; }
.result { fill: #ecfdf5; stroke: #059669; stroke-width: 2; }
.title { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: 700; fill: #0f172a; }
.label { font-family: Arial, Helvetica, sans-serif; font-size: 18px; font-weight: 700; fill: #0f172a; }
.text { font-family: Arial, Helvetica, sans-serif; font-size: 17px; fill: #334155; }
.small { font-family: Arial, Helvetica, sans-serif; font-size: 16px; fill: #475569; }
.mono { font-family: Menlo, Consolas, monospace; font-size: 15px; fill: #1e293b; }
.warn { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 700; fill: #b91c1c; }
.arrow { stroke: #475569; stroke-width: 2.2; marker-end: url(#arrow); fill: none; }
</style>
</defs>
<text x="48" y="58" class="h1">두 가지 사용자 식별 시나리오</text>
<text x="48" y="94" class="sub">사용자 식별 방식은 다르고, 권한 적용은 DB 보안 정책에서 동일하게 수행</text>
<rect x="48" y="128" width="572" height="292" rx="10" class="panel-a"/>
<text x="76" y="176" class="title">시나리오 1 - DB User 기반</text>
<rect x="76" y="204" width="156" height="118" rx="10" class="panel"/>
<text x="96" y="240" class="label">DB 접속 계정</text>
<text x="96" y="276" class="mono">SESSION_USER</text>
<text x="96" y="304" class="mono">AGENT_HR_001</text>
<line x1="232" y1="263" x2="270" y2="263" class="arrow"/>
<rect x="276" y="204" width="164" height="118" rx="10" class="panel"/>
<text x="296" y="240" class="label">사용자 매핑</text>
<text x="296" y="276" class="mono">app_user</text>
<text x="296" y="304" class="mono">user_role</text>
<line x1="440" y1="263" x2="478" y2="263" class="arrow"/>
<rect x="484" y="204" width="88" height="118" rx="10" class="panel"/>
<text x="506" y="240" class="label">식별</text>
<text x="504" y="276" class="mono">사번</text>
<text x="504" y="304" class="mono">부서</text>
<rect x="76" y="346" width="496" height="42" rx="8" fill="#eff6ff" stroke="#bfdbfe" stroke-width="2"/>
<text x="96" y="374" class="small">DB 계정별 권한 등록. DBA가 사용자-역할-권한 테이블 관리</text>
<rect x="660" y="128" width="572" height="292" rx="10" class="panel-b"/>
<text x="688" y="176" class="title">시나리오 2 - Bearer Key 기반</text>
<rect x="688" y="204" width="156" height="118" rx="10" class="panel"/>
<text x="708" y="240" class="label">ORDS Header</text>
<text x="708" y="276" class="mono">Bearer Key</text>
<text x="708" y="304" class="warn">없으면 차단</text>
<line x1="844" y1="263" x2="882" y2="263" class="arrow"/>
<rect x="888" y="204" width="164" height="118" rx="10" class="panel"/>
<text x="908" y="240" class="label">Key 검증</text>
<text x="908" y="276" class="mono">key_hash</text>
<text x="908" y="304" class="mono">agent_key</text>
<line x1="1052" y1="263" x2="1090" y2="263" class="arrow"/>
<rect x="1096" y="204" width="88" height="118" rx="10" class="panel"/>
<text x="1118" y="240" class="label">식별</text>
<text x="1116" y="276" class="mono">사번</text>
<text x="1116" y="304" class="mono">부서</text>
<rect x="688" y="346" width="496" height="42" rx="8" fill="#fff7ed" stroke="#fed7aa" stroke-width="2"/>
<text x="708" y="374" class="small">ORDS 처리 로직이 Header 값을 받아 내부 사용자로 매핑</text>
<path d="M 334 420 C 334 452, 438 468, 520 492" class="arrow"/>
<path d="M 946 420 C 946 452, 842 468, 760 492" class="arrow"/>
<rect x="178" y="494" width="430" height="110" rx="10" class="shared"/>
<text x="214" y="538" class="title">현재 요청 사용자 정보</text>
<text x="214" y="574" class="text">USER_ID / 사번 / 부서 저장</text>
<rect x="672" y="494" width="450" height="110" rx="10" class="shared"/>
<text x="708" y="538" class="title">보호 객체 조회</text>
<text x="708" y="574" class="text">VIEW 또는 TABLE에 연결된 정책 적용</text>
<line x1="640" y1="604" x2="640" y2="636" class="arrow"/>
<rect x="178" y="638" width="450" height="76" rx="14" class="shared"/>
<text x="212" y="684" class="label">VPD: WHERE 조건 자동 추가</text>
<rect x="672" y="638" width="450" height="76" rx="14" class="shared"/>
<text x="706" y="684" class="label">DDS: DATA GRANT WHERE 적용</text>
<line x1="628" y1="676" x2="672" y2="676" class="arrow"/>
<line x1="640" y1="714" x2="640" y2="732" class="arrow"/>
<rect x="420" y="730" width="440" height="48" rx="12" class="result"/>
<text x="512" y="762" class="label">결과: 권한 범위 데이터만 반환</text>
</svg>