← ALL PROBLEMS
AI & Automation / AI ACCESS CONTROL

How to Stop AI Assistants Exposing Data Users Should Not See

Design permission-aware enterprise retrieval so AI assistants respect identity, document ACLs, least privilege and auditable access decisions.

Problem-first engineeringPractical diagnosticsProduction-minded solutions
01 / THE REAL-WORLD SCENARIO

What is actually going wrong?

An AI assistant can unintentionally bypass the access boundaries users expect if retrieval runs with a broad service identity and does not enforce the caller's permissions on every result.

Symptoms teams commonly notice

  • A user receives content from a restricted document
  • Different users get identical answers despite different access rights
  • The retrieval service uses one broad shared credential
  • Access revocation does not take effect in the assistant
02 / ROOT-CAUSE ANALYSIS

Why this problem happens

Use evidence to narrow the failure domain before applying a fix.

  • 01The application retrieves with an over-privileged service identity
  • 02Document permissions are not synchronised into the retrieval index
  • 03Identity context is lost between the user interface and retrieval layer
  • 04Prompt instructions are treated as a substitute for access control
  • 03 / VISUAL 01 — ARCHITECTURE EXPLORER

    Explore the system flow

    Select a stage to see what should happen and what evidence to inspect.

    SELECTED STAGE

    User identity

    Authenticate and resolve group claims

    04 / SOLUTION DESIGN

    How to solve it reliably

    A production solution should address the root cause, make failures observable and support safe recovery.

    1. 01
      Authenticate the user and propagate a verifiable identity context to the retrieval service.
    2. 02
      Enforce document-level ACL filters before content reaches the language model; never rely on prompt wording to hide restricted data.
    3. 03
      Use least-privilege service identities and separate administrative indexing from user-time retrieval.
    4. 04
      Define how permission changes and revocations invalidate cached results and indexed ACL metadata.
    5. 05
      Log user identity, retrieved document IDs, policy decisions and access-denial events without unnecessarily logging sensitive content.
    IMPLEMENTATION EXAMPLE
    # Illustrative retrieval guard: enforce ACL before building LLM context
    principal = authenticate_request(token)
    allowed_doc_ids = acl_service.allowed_documents(principal.id)
    
    results = vector_store.search(
        query=user_question,
        filter={"document_id": {"$in": allowed_doc_ids}}
    )
    
    # Only authorised passages may be passed to the model.
    context = build_context(results)

    Illustrative starting point. Validate identifiers, data types, security and platform-specific syntax in your environment before production use.

    05 / VISUAL 02 — DIAGNOSTIC SIMULATOR

    Find the likely failure area

    Choose the symptom closest to what you observe. This guided diagnostic suggests where to investigate first; it does not replace environment-specific testing.

    FIRST INVESTIGATION
    ⌁

    Restricted content appears in an answer

    Trace retrieved document IDs and ACL filtering before generation.

    06 / VISUAL 03 — IMPLEMENTATION WALKTHROUGH

    Turn the fix into an operating practice

    Follow the stages in order. Each step creates evidence for the next one.

    IMPLEMENTATION STAGE 01

    Map identity and permissions

    Document users, groups, source ACLs and trust boundaries.

    07 / PREVENTION CHECKLIST

    Keep the problem from returning

    • Map identity and permissions: Document users, groups, source ACLs and trust boundaries.
    • Enforce before generation: Filter retrieval candidates using authoritative permissions.
    • Handle change and revocation: Synchronise ACL updates and invalidate affected caches.
    • Test adversarial access cases: Verify allowed, denied, revoked and cross-tenant scenarios.
    RELATED TIERSHIFT CAPABILITIES

    Where we can help

    LET'S SOLVE THE RIGHT PROBLEM

    Dealing with this challenge in your environment?

    Share the symptoms, constraints and outcome you need. We can help scope a practical technical approach.

    Talk to TierShift →