Organized network cables in a private equipment cabinet
Physical infrastructure is one layer of protection. Identity, application policy, and operating controls remain essential. AI-generated illustration.

Local does not mean automatically protected

Running a model on company infrastructure changes where inference happens. It does not automatically encrypt databases, establish user permissions, prevent malicious instructions in documents, or satisfy a compliance framework. Each control needs an owner and evidence that it works.

Begin by mapping assets and access: original documents, extracted text, embeddings, retrieval results, prompts, model responses, backups, and operational logs. Decide who can read, change, export, and delete each class of information.

Identity before retrieval

Authenticate the user before document search. Derive department, roles, and tenant identity from a trusted server-side identity system. Do not let a browser request or a prompt declare its own permissions.

The filter must restrict retrieved material before it becomes model context. Removing restricted passages from the displayed answer is too late: the model has already received them.

Same collection. Different access.

Source documents

ENG / 014Deployment guide
FIN / 026Revenue forecast
TEAM / 007Team handbook

Model context

ENG / 014

Deployments require two approvals.

FIN / 026

Forecast for the next quarter.

TEAM / 007

Policies shared with the whole team.

In this example, the role selects permitted passages before they reach the model. The restricted document stops at the boundary.

Carry permissions through ingestion

Every searchable chunk needs a link to its original document and trustworthy permission metadata. Copy access policy from the authoritative source, not from document text. Changing a document’s permissions, replacing it, or deleting it must invalidate or update the searchable representation.

An embedding is a representation of data, not a safe public substitute for it. Treat indexes, snapshots, and intermediate files as sensitive assets with their own access and retention policies.

Enforce the query boundary

Qdrant supports authentication and query filters; the application still has to apply its document policy correctly. Use TLS for network connections and restrict database credentials to the capabilities needed. See Qdrant security and its access-control guide.

The following conceptual request illustrates the shape of a permission-filtered query-points call. The vector is intentionally a two-dimensional teaching example, not an embedding model output or a production collection configuration.

{
  "query": [0.12, 0.34],
  "filter": {
    "must": [
      {"key": "tenant_id", "match": {"value": "demo-company"}},
      {"key": "allowed_roles", "match": {"any": ["engineering"]}}
    ]
  },
  "limit": 5,
  "with_payload": true
}

Construct the filter on the server from verified identity. Prevent the client from bypassing it, querying another collection, or supplying a privileged API credential. Test users with no matching role, expired sessions, removed permissions, and documents shared across multiple teams. A clearance level alone is rarely a complete policy.

Network isolation has an operating cost

Separate the user interface from database and management networks. Review outbound requests from parsers, model downloads, plugins, telemetry, and support tooling. If the service must operate offline, test it with outbound access actually blocked, including document upload and embedding generation.

Plan how approved updates enter the environment. Isolation without a patching process can leave old vulnerable components running for longer. Keep a documented path for reviewing and transferring model and software releases.

Sources are evidence to inspect

A retrieved document can contain misleading or hostile instructions. Treat document content as untrusted input, keep tool permissions separate from model instructions, and avoid giving a general assistant unrestricted access to files or outbound actions.

Citations make review easier. They do not certify factual accuracy. Where an answer affects a consequential decision, the workflow should require a responsible person to inspect the source and approve the next action.

A practical security acceptance test

  • A user cannot retrieve another tenant’s or department’s restricted document.
  • Removing access takes effect in search, caches, and stored conversations as designed.
  • A malicious document cannot grant itself a role or override the server’s filter.
  • Logs and backups follow the same data-handling policy as the live system.
  • A failed identity service or malformed permission claim denies access.
  • Restore and update procedures are tested, documented, and assigned to an operator.

These controls support a security programme; they are not a certification or a claim of legal compliance. Map your organization’s obligations with its responsible security and compliance teams.

Questions and answers

Does a local model guarantee privacy?

No. Parsers, embeddings, plugins, logs, backups, and outbound connections can still expose data. Review each component and test the required boundaries through the application.

Where should document permissions be enforced?

On the server, during retrieval and before model context is assembled. Derive the policy from authenticated identity and authoritative document metadata; hiding passages in the final answer is too late.

What happens when a document is deleted or access is removed?

Update or invalidate the searchable chunks and relevant caches. Stored conversations and backups need explicit retention policies too. Test how quickly revoked access takes effect across the complete system.