In short
- An AI assistant should retrieve only the information the signed-in person is authorised to access. A prompt asking it to keep secrets is not an access-control system.
- Scope data access on the server using verified identity, legal entity and current permissions. Apply the same boundary to search results, tools, citations, caches and conversation history.
- These controls reduce disclosure risk; they do not prove that an entire application is secure. Test denied cases and permission changes as carefully as successful answers.
Why instructions alone are insufficient
An instruction such as “do not show other employees' salaries” cannot substitute for checking whether a query may access a compensation record. If a retrieval tool places restricted material into the model's context, the boundary has already failed even when the final answer appears harmless.
For private company AI, establish the allowed sources before connecting a model. The application should derive access from the authenticated session, not a role or company name supplied in the question. The same rule must apply when the assistant calls a tool or follows a source link.
OWASP identifies both sensitive information disclosure and weaknesses in retrieval and embedding systems as risks. Its guidance supports least privilege and permission-aware retrieval, alongside validation and monitoring. Those are components of a defence, not a claim that one filter solves every failure mode.
An example permission matrix
This matrix is a starting point for discussion, not a default policy for every employer. The data owner must approve the actual permissions.
| Caller role | Possible permitted sources | Excluded unless explicitly authorised | Evidence to test |
|---|---|---|---|
| Employee | Own approved facts and company handbook | Another person's pay, contracts and personnel notes | Own-record access succeeds; peer-record access is denied |
| Line manager | Approved team information for active direct reports | Other teams and restricted compensation fields | Reporting-line changes remove old access |
| HR specialist | Assigned entity records and approved policies | Unassigned legal entities and separately restricted files | Entity boundary holds for search and source links |
| Finance reviewer | Approved compensation inputs for assigned work | HR case notes unrelated to that work | Field-level scope holds in summaries and exports |
Test the same boundary in English and Arabic
Authorisation should depend on identity and data scope, not the language of the request. An English question about an Arabic document and an Arabic question about an English document must pass through the same access checks.
Use synthetic records with distinctive values for a repeatable test. Ask the same allowed and forbidden questions in both languages, then include a mixed-language request and a request to summarise an entire team. A refusal should not expose a restricted value through a title, filename, snippet or citation.
Record which sources were retrieved as well as the final answer, with logs designed to avoid copying sensitive content unnecessarily. A fluent answer is not evidence of correct authorisation.
What to verify beyond retrieval
- Role changes: remove a role or move a synthetic employee between entities, then check that old access stops within the agreed revocation window.
- Caches and history: repeat a question as a different user and confirm earlier privileged content is not reused across the boundary.
- Direct sources: open a cited document as the same user and verify that the storage layer enforces the restriction too.
- Tool calls: attempt a forbidden record lookup through every connected tool, including exports and summaries.
- Failure behaviour: test missing identity, stale permissions and unavailable policy checks. Agree a response that withholds restricted data.
Accurate people, role and entity records make these checks possible. Orivenn, described on orivenn.com, provides the people-and-approvals foundation TechFanar builds. Any AI connection still needs its own defined scope, implementation and acceptance evidence; this article is not a report of a completed security assessment.
Sources and scope
References checked on 17 November 2026:
- OWASP: sensitive information disclosure discusses disclosure risks and mitigations such as least privilege.
- OWASP: vector and embedding weaknesses discusses retrieval boundaries, cross-context leakage and source validation.
The matrix and test sequence are illustrative engineering guidance from TechFanar. A deployment needs an assessment against its own data, architecture and operating responsibilities.
Questions people ask
Does role filtering make salary disclosure impossible?
No. Correct filtering helps keep unauthorised records out of retrieval, but caches, tools, logs, old conversations, permissions and training data can introduce other paths. Test the complete application and its changes rather than relying on a single control.
Does retrieval mean company documents are used for model training?
Retrieval and training are different operations. A retrieval-based assistant supplies selected context at answer time; that does not by itself determine the model provider's retention or training practices. Agree the provider settings, contract, logging and hosting arrangements before sending company data.
How should we start a private AI project?
Choose a small set of approved documents, identify who owns them, define permitted and denied questions, and agree how to test both languages. Discuss a private AI scope before expanding the sources or giving the assistant tools that act on records.