참고 자료 · 58
RAG: 문서 접근 권한 및 격리 검증
문서 도우미가 각 사용자의 권한을 준수하도록 검색, 인용, 캐시 및 취소를 테스트합니다.
업데이트됨 · 14 min
이 가이드가 달성하는 목표
- 경계 정의
- 노출 전 필터링
- 캐시 분리
- 권한 취소 실행
빠른 확인
- 별도의 벡터 네임스페이스로 충분합니까?
- 프롬프트에 권한을 표시해야 하는가?
- 테스트에서 기밀 문서를 어떻게 방지할 수 있는가?
단계별 방법
- 1
경계 정의
각 문서에 소유자, 범위 및 접근 규칙을 할당합니다. OWASP는 벡터 저장소 권한 불일치로 인한 컨텍스트 간 정보 유출을 설명합니다. 제안된 방법은 청크와 메타데이터도 보호 대상 객체로 처리합니다.
결과물: 문서, 그룹 및 범위 목록.
- 2
노출 전 필터링
청크가 모델에 도달하기 전에 검색 서비스에서 권한 부여를 시행합니다. 벡터 검색, 어휘 검색, 그래프 및 직접 다운로드를 포함합니다. 프롬프트 지침은 서버 측 권한 부여를 대체할 수 없습니다.
결과물: 의사 결정 지점 및 ID 누락 동작.
- 3
캐시 분리
보존된 검색 결과, 대화, 인용 및 답변 목록을 작성합니다. 재사용이 관련 접근 컨텍스트에 따라 달라지는지 확인합니다. 고객 이름이 포함된 인덱스 필드만으로는 격리가 입증되지 않습니다.
결과물: 캐시 키 및 분리 시나리오.
- 4
권한 취소 실행
민감하지 않은 테스트 문서를 사용하여 접근 권한을 제거하고, 문서를 삭제하고, 그룹을 변경합니다. 변경 전에 열었던 대화를 재생합니다. 데이터 조각, 링크 및 저장된 답변을 사용할 수 없게 되는 시점을 측정합니다.
결과물: 타임스탬프가 찍힌 권한 취소 증거 및 누락 사항.
- 5
음성 테스트 유지
승인된 사용자, 다른 그룹 및 알 수 없는 신원으로 동일한 질문을 합니다. 파일 이름, 발췌문, 인용 및 로그를 검사합니다. 인덱스 또는 커넥터 변경 후 다시 실행합니다. 몇몇 통과 사례만으로는 제한적인 적용 범위만 확보할 수 있습니다.
결과물: 테스트 매트릭스 및 수정 담당자.
재사용 가능한 워크시트
승인된 의견을 기입하십시오. 이 항목들은 작업 템플릿이며, 관찰된 결과가 아닙니다.
| 필드 | 기록할 정보 |
|---|---|
| 문서/청크 | 소유자 및 범위 |
| 테스트 ID | 허용된 그룹, 기타 그룹, ID 누락 |
| 액세스 경로 | 검색, 인용, 파일 또는 캐시 |
| 결과 | 예상, 관찰, 날짜 및 수정 |
가상 예시
예시 상황
가상 예시입니다. 고객이나 실제 관측 결과를 나타내지 않습니다. 권한이 다른 두 부서가 같은 문서 모음을 검색하지만, 도우미는 일관된 권한 필터를 적용하지 않습니다.
결정 및 예상 증거
서로 다른 권한의 테스트 계정과 가상 문서를 만듭니다. 검색 결과, 모델에 전달되는 구절, 출처 인용, 거부 응답을 확인합니다. 생성 전에 권한 밖의 내용이 노출되지 않도록 막습니다. 모델에게 권한을 지키라고 지시하는 것은 접근 제어를 대신하지 못합니다.
메커니즘 구분
| 메커니즘 | 목적 | 검증 또는 제한 |
|---|---|---|
| 검색 필터 | 검색된 청크 제한 | 어휘 경로 및 직접 링크도 포함 |
| 거부 프롬프트 | 응답 동작 안내 | 권한 위임 금지 |
| 응답 캐시 | 결과 재사용 | 재사용 전 권한 컨텍스트 확인 |
관리 지표
| 지표 | 측정 대상 | 첫 번째 조치 |
|---|---|---|
| 관찰된 누출 | 범위 외부에 노출된 테스트 데이터 | 영향을 받는 사용 차단 및 원인 검사 |
| 권한 취소 지연 | 테스트된 모든 경로가 거부될 때까지의 시간 | 이름 캐시에 여전히 접근 가능 |
| 경로 적용 범위 | 커넥터 및 검색 모드 실행 | 테스트되지 않은 경로 식별 |
일반적인 실수
- 어휘 경로 및 직접 링크도 포함
- 권한 위임 금지
- 재사용 전 권한 컨텍스트 확인
자주 묻는 질문
별도의 벡터 네임스페이스로 충분합니까?
데이터 분할에 도움이 되지만, 캐시, 파일 링크 및 도구는 동일한 경계를 준수해야 합니다.
프롬프트에 권한을 표시해야 하는가?
유용한 컨텍스트가 모델에 도달할 수 있습니다. 데이터를 노출하는 서비스는 접근 결정 사항을 강제해야 합니다.
테스트에서 기밀 문서를 어떻게 방지할 수 있는가?
각 그룹별로 고유한 표시가 있는 가상의 센티널 문서를 생성한 다음 답변과 인용문을 검사합니다.
RAG: 접근 권한, 인용 및 캐시
이 언어판의 상세 참고 설명은 영어로 제공됩니다.
An accurate answer can disclose a forbidden document. Retrieval relevance, citation validity and access authorisation are separate checks. The service providing passages must enforce the current identity’s rights before exposing them to the model.
Fictional CIE teaching set: four technical identities, six documents and three states. It illustrates a proposed policy without querying your system, authenticating real users or measuring product security. OWASP references describe risk families; the scenarios, rules and numbers below are our examples.
References consulted on .
Explore the fictional document policy
Choose identity, document, state and access path. The result is the decision expected under this policy, not an observed test of your application. All four paths should enforce the same access decision.
Local browser calculation with no connection to an AI model, vector database or account. No free-text field, secret or document to send.
Matrix of 24 expected decisions
Ops has group ops; Alpha has alpha; Beta has beta. The unauthenticated identity has no access. Documents without an explicit rule are denied.
10 allowed accesses across 24 fictional combinations
| Identity / document | Cross-team procedure | Alpha note | Beta note | Ops file | Old Alpha note | Unclassified document |
|---|---|---|---|---|---|---|
| Ops service | Allowed | Allowed | Allowed | Allowed | Allowed | Denied |
| Alpha service | Allowed | Allowed | Denied | Denied | Allowed | Denied |
| Beta service | Allowed | Denied | Allowed | Denied | Denied | Denied |
| Unauthenticated | Denied | Denied | Denied | Denied | Denied | Denied |
Three states with reproducible outcomes
| Fictional state | Policy change | Allowed accesses / 24 |
|---|---|---|
| 1 · Initial rights | Ops has group ops; Alpha has alpha; Beta has beta. The unauthenticated identity has no access. Documents without an explicit rule are denied. | 10 / 24 |
| 2 · Alpha group removed | Alpha remains authenticated but no longer has any required group. The cross-team procedure also requires one of ops, alpha or beta, so Alpha loses access to it as well. Ops and Beta groups are unchanged. | 7 / 24 |
| 3 · Group removed and old note deleted | Alpha’s group removal persists. The old Alpha note is deleted and denied to every identity, including Ops. Other document rules stay unchanged. | 6 / 24 |
These counts describe a small closed set, not a security rate. State changes are instant in this demonstration. In production, measure the actual delay on every path; revoking a right cannot retroactively erase a copy already read or exported.
Twelve replay cases with positive controls and expected evidence
Fictional scenarios. Buttons populate the demonstration and run no penetration test. To assess an application, compare each expectation with an actual trace from an authorised environment using sentinel data.
| Situation and reference | Demonstration input | Decision and evidence to retain |
|---|---|---|
| The group’s own document | Alpha service Alpha note 1 · Initial rights Vector retrieval | Allowed in this example Positive control: retain the permitted fictional passage and service decision. A system denying everything does not pass the functional test. |
| Another group’s document | Beta service Alpha note 1 · Initial rights Vector retrieval | Denied in this example Check that the passage, sensitive title and metadata are absent from data supplied to the model. |
| The secondary lexical branch | Beta service Alpha note 1 · Initial rights Lexical / hybrid retrieval | Denied in this example Retain each branch’s decisions before fusion and the final result. No vector leak does not establish lexical coverage. |
| A known citation identifier | Beta service Alpha note 1 · Initial rights Citation / file resolution | Denied in this example Call citation resolution using the Beta test identity; retain the object denial, not just the absence of a link in the answer. |
| An old cached answer | Alpha service Alpha note 2 · Alpha group removed Cached answer or passage | Denied in this example Create the answer before group removal and replay afterwards. Check that old passages are not returned under current rights. |
| The cross-team procedure after removal | Alpha service Cross-team procedure 2 · Alpha group removed Vector retrieval | Denied in this example This document requires an explicit group; remaining authenticated is insufficient. Retain the rule and membership change explaining the denial. |
| The unchanged group | Beta service Beta note 2 · Alpha group removed Lexical / hybrid retrieval | Allowed in this example Beta positive control: confirm that revocation handling does not block another authorised group. |
| The deleted but remembered document | Ops service Old Alpha note 3 · Group removed and old note deleted Cached answer or passage | Denied in this example Try an old citation and cache after deletion. Record object state and refusal to return it; separately verify removal of copies under your policy. |
| A document without a rule | Ops service Unclassified document 1 · Initial rights Vector retrieval | Denied in this example Even Ops has no implicit privilege. Retain the handling of an unclassified document and the process for correcting its access rule. |
| Access without an authenticated identity | Unauthenticated Cross-team procedure 1 · Initial rights Citation / file resolution | Denied in this example Check citation paths and their errors: reserved content must not be exposed during a denied attempt. |
| A source claims higher authority | Beta service Ops file 1 · Initial rights Cached answer or passage | Denied in this example A sentence inside the document changes neither groups nor service rules. Retain the technical denial even if model wording is persuasive. |
| The Ops file remains allowed | Ops service Ops file 3 · Group removed and old note deleted Citation / file resolution | Allowed in this example Positive control after both changes: establish this specific access without granting Ops the unclassified or deleted document. |
Document six technical boundaries
- Collection
- Retain document origin, version and status. Internal content can also carry hostile instructions. OWASP · LLM01:2025 Prompt Injection →
- Authorisation
- Check identity, object and groups in the service. Prompt text is not the permissions engine. OWASP · API1:2023 Broken Object Level Authorization →
- Generation and rendering
- Validate outputs for their destination: text, HTML, query or tool argument. A plausible answer is not directly executable input. OWASP · LLM05:2025 Improper Output Handling →
- Tool action
- Separate reading, proposing and modifying. Limit function, permission and autonomy to the task; read access does not authorise sending. OWASP · LLM06:2025 Excessive Agency →
- Configuration
- Keep secrets out of the system prompt. Confidentiality of its wording does not replace access controls. OWASP · LLM07:2025 System Prompt Leakage →
- Consumption
- Set request, duration and action limits, then exercise stopping and degraded operation with a demonstration budget. OWASP · LLM10:2025 Unbounded Consumption →
Useful traces without copying documents
Link test identifier, policy version, technical identity and effective groups, document identifier/version, access path, decision and timestamp. For revocation, add the change time and first observed denial per path. Use demonstration markers instead of secrets; restrict logs to necessary information and protect their access.
Continue with prompt injection testing →
Sources, editions and scope of the example
OWASP 2025 and API 2023 editions are explicitly identified. NIST AI 100-2 E2025 is a taxonomy published in March 2025; its page notes an April PDF correction and a June 2025 potential-update note. None certifies this simulator or your application.
- OWASP · LLM08:2025 Vector and Embedding Weaknesses · 2025
- OWASP · LLM01:2025 Prompt Injection · 2025
- OWASP · LLM06:2025 Excessive Agency · 2025
- OWASP · LLM05:2025 Improper Output Handling · 2025
- OWASP · LLM07:2025 System Prompt Leakage · 2025
- OWASP · LLM10:2025 Unbounded Consumption · 2025
- OWASP · API1:2023 Broken Object Level Authorization · 2023
- NIST AI 100-2 E2025 · Adversarial Machine Learning · Final · March 2025 ·
RAG 관련성과 순위
이 언어판의 상세 참고 설명은 영어로 제공됩니다.
Relevance and permission need separate checks
A relevant document may be forbidden to the requester. Build the evaluation corpus within accessible scope and test denials independently of ranking scores.
- Keep permissions and document versions with the test set.
- Check revocation, deletion and citation paths before measuring relevance.
- Do not use an nDCG improvement as evidence that permissions are respected.
Explore ranking measures and relevance judgments →
Stanford CS276 · Retrieval evaluation · 2019 course archive · PDF pp. 3, 5–6 · consulted 2026-10-23
NIST TREC · Reciprocal rank definition · Repository snapshot 35cf096ba6d5ae08ca4803c056b31ed61a56a6d4 · consulted 2026-10-23
공식 참조
참조는 방법을 뒷받침합니다. 상황에 맞게 검사를 조정하십시오. 이는 인증이 아닙니다. 원본 참조 제목 및 소스 문서는 다른 언어로 작성되었을 수 있습니다.
참고 자료 확인일 .
- OWASP — LLM08:2025, Vector and Embedding Weaknesses
- OWASP · LLM01:2025 Prompt Injection
- OWASP · LLM06:2025 Excessive Agency
- OWASP · LLM05:2025 Improper Output Handling
- OWASP · LLM07:2025 System Prompt Leakage
- OWASP · LLM10:2025 Unbounded Consumption
- OWASP · API1:2023 Broken Object Level Authorization
- NIST AI 100-2 E2025 · Adversarial Machine Learning
- Stanford CS276 · Retrieval evaluation
- NIST TREC · Reciprocal rank definition
