# ADR-009 — چرا مجوز را به مدل واگذار نکنیم؟

Why is authorization outside the model?

Status: proposed · Date: 2026-10-15

## مسئله / Context

prompt و سند می‌توانند اشتباه یا آلوده باشند؛ tenant و policy باید مستقل enforce شوند.

Prompts/documents may be wrong or malicious; enforce tenant/policy independently.

## گزینه‌ها / Alternatives

محدودیت در prompt؛ filter روی index؛ policy gate همراه با guard مرجع.

Prompt restrictions, index filters, or a policy gate backed by authoritative guards.

## انتخاب فعلی / Choice

tenant از هویت؛ policy در tool gateway و guard در query/output؛ ACL فعلی حتی برای cache و citation قدیمی.

Identity-derived tenant, gateway policy, query/output guards, current ACLs for caches and old citations.

## چرایی و trade-off / Rationale and trade-off

متنِ خروجی مدل authority نیست؛ revocation در run جاری باید انتشار خروجی مبتنی بر context قدیمی را متوقف یا دوباره تولید کند.

Model text is not authority; revocation during a run must stop publication based on revoked context or regenerate it.

## فرض‌ها / Assumptions

نحوهٔ auth واقعی و data classification هنوز نیازمند تعریف است؛ سناریوهای آزمون مصنوعی‌اند.

Actual authentication and data classification remain to be specified; test scenarios are synthetic.

## روش آزمون / Validation

prompt injection، cross-tenant ID، revoked context in-flight و backup replay.

Injection, cross-tenant identifiers, in-flight revocation, and backup replay.

## بازنگری / Revisit

هر ابزار تازه یا دادهٔ حساس تازه، threat model و همین ADR را بازبینی می‌کند.

New tools or sensitive data require reviewing this ADR and threat model.

DDIA: 8, 9, 14
