ING LuxembourgFinancial services

Who Is Allowed to See the Evidence?

An employee preparing a client review needs the right procedure and client evidence. This design keeps identity, retrieval, source links and cached answers within the same access boundary.

System overviewVisual summary
The same question has a different evidence boundary
“What does the payment review require?”
Employee · Client AShared guidanceClient A evidenceClient B excluded
Employee · Client BShared guidanceClient B evidenceClient A excluded

Illustrative synthetic records. The server’s identity policy sets access; the question cannot grant it.

A correct citation can still cross a boundary

Consider a relationship manager preparing internal review notes for Client A. From that client’s workspace, they ask: “What does the payment review require?” They need the applicable guidance, a source they can open and enough context for a colleague to review the notes. The assistant does not approve or execute a payment.

Searching shared procedures and client folders together can produce a convincing wrong-scope result. In the synthetic collection, Client B’s review requires two reviewers; Client A’s requires one. An unchecked global search selects B’s document for Advisor A. Its text and citation are internally consistent, but both the answer and document title cross the employee’s access boundary. These invented rules illustrate the failure; they are not ING procedures or an observed ING incident.

The proposed workspace panel should reduce manual searching while keeping the review trail intact: show permitted guidance and its source, or withhold an unsupported answer. Moving an employee off a client assignment must also stop yesterday’s cached answer and copied source link from remaining accessible. That makes identity, current assignment and source provenance part of the task, rather than checks added after the answer is written.

Why this is relevant to ING Luxembourg

ING Luxembourg’s Wholesale Banking outsourcing annex, July 2026 edition, page 23, describes employee communication and productivity tools, including generative AI assistance, and client information that may occur in them. Its privacy statement, v4.0, December 2025, pages 23–24, identifies access controls, segregation of duties and employee confidentiality obligations. These establish the local business context, without disclosing an assistant architecture or implying every listed item enters an LLM. Outsourcing annex, p. 23 · Privacy statement, pp. 23–24

The public documents were checked on 25 November 2026. The workspace, employees, documents and permission rules below are my independent design and synthetic lab; there is no connection to ING’s internal systems.

Put authorization before relevance

Authorize evidence before ranking

Local prototype with synthetic documents and demo identities. Each boundary can be inspected independently.

  1. Trusted server identityResolve the demo credential to a principal, roles and client entitlements.Query hints do not grant access.
  2. Filter the evidence scopeKeep public records and the internal or client records allowed by that identity.Before ranking or snippet assembly.
  3. Rank eligible evidenceScore only permitted records. Assemble context from that shortlist.
  4. Check facts and citationsVerify answer references against eligible evidence as an additional guard.
  5. Return a scoped answerReturn supported facts and permitted references, or a bounded no-evidence response.
When a reference is opened

Authorize citation access again

A direct document request repeats the identity and scope checks. Knowing an ID is not permission.

When an answer is reused

Keep the cache within the boundary

Bind reuse to the principal, effective access, policy and data version. Check cached references before serving.

A final answer check supplements authorization. It cannot undo exposing an unauthorized snippet earlier in the pipeline.

1. Take identity from the server

The HTTP service resolves a published demo bearer token with resolve_principal(). The immutable Principal record supplies id, roles, client_entitlements and grants_version. Advisor A has the advisor role and client-a entitlement. A request’s role_hint is ignored for authorization; client_hint can only narrow existing grants. Even a client ID selected in the workspace remains untrusted at this boundary.

This separates role and assignment. A generic advisor role does not unlock every client’s material, and a Client A entitlement does not unlock risk-only documents. Missing credentials yield HTTP 401. The fixed token registry is implemented for reproducibility; replacing it with trusted organizational identity and current assignment lookup is a production integration still to build.

2. Filter before ranking, snippets and context

The document contract is explicit: classification, allowed_roles, client_id, source_path, page, document_version and source-supported facts. For a client record, can_read() requires both a role intersection and the matching client entitlement; absent or invalid permission metadata is denied. within_scope() additionally intersects any requested client hint.

Only the eligible records enter a fresh SQLite FTS5 index. rank_documents() indexes their titles and bodies, converts the question to bounded plain tokens, applies BM25 and takes top-k. This keeps forbidden records out of ranking statistics, snippets and the result budget. Selecting the global top-k and deleting forbidden rows afterwards can lose a permitted answer that ranked just below them; the tie fixture isolates that failure.

Before response construction, search() reloads the principal and checks that grants, policy and data revisions still match. It reauthorizes selected documents, then copies their registered facts into a deterministic answer. /documents/{id} and /citations/{id} independently authorize the current caller. A stored ID or copied URL conveys no permission; denied and absent resources share the same HTTP 404 body.

The implemented lab stops at retrieval and deterministic response assembly. A future LLM should receive only this eligible evidence packet; semantic grounding and prompt-injection handling would need separate validation.

Inspect the implemented request and response contract

Run this against the local service. The credential is an intentionally public synthetic identity:

curl -H 'Authorization: Bearer DEMO-advisor-a' \
  'http://127.0.0.1:8765/search?q=payment%20review&client_hint=client-a&top_k=1'

This projection of the actual response keeps the fields the workspace needs to render the answer and source link. The full response also includes fact records and source metadata.

{
  "status": "answered",
  "answer": "Synthetic Client A payment review requires one reviewer.",
  "evidence": [{
    "doc_id": "01-client-a-review",
    "client_id": "client-a",
    "citation_url": "/citations/01-client-a-review"
  }],
  "trace": {
    "policy_version": "demo-abac-v1",
    "data_version": 1,
    "cache": "miss"
  }
}

HTTP responses omit the richer indexed/ranked IDs and grant diagnostics shown in the synthetic developer recordings. A policy-change rejection must not expose the documents selected under the old grants.

The small rule that controls the whole path

Authorize the document before it becomes a candidatePython20 lines
def can_read(principal, document):
    """Deny unknown or incomplete authorization metadata, then intersect grants."""
    if principal is None or not isinstance(document, dict):
        return False
    classification = document.get("classification")
    roles = document.get("allowed_roles")
    if classification not in {"public", "internal", "client"}:
        return False
    if not isinstance(roles, list) or any(not isinstance(r, str) or not r for r in roles):
        return False
    if "client_id" not in document:
        return False
    if classification == "public":
        return document["client_id"] is None and roles == []
    if not roles or not set(roles).intersection(principal.roles):
        return False
    if classification == "internal":
        return document["client_id"] is None
    return (isinstance(document["client_id"], str)
            and document["client_id"] in principal.client_entitlements)

This excerpt is extracted from the executable Python implementation. Unknown classifications or incomplete permission metadata are denied. A role match alone does not unlock client-specific material: the employee also needs that client entitlement. The same predicate governs retrieval, returned evidence and direct source lookup.

A cache entry carries an authorization dependency

The actual key is (principal.id, grants_digest, policy_version, data_version, normalized_query, client_hint, top_k). Identity prevents cross-employee reuse; the grant digest handles an assignment change; data and policy revisions invalidate stale dependencies. Scope and top-k preserve the requested retrieval contract. A hit also reauthorizes each referenced document.

revoke_client() replaces the principal and increments its grant revision. replace_document() and delete_document() advance the data revision. Requests and mutations use a process-local lock; the test hook simulates a grant change between retrieval and final validation. These local mutation methods establish the demonstrated behaviour. They do not automatically detect changes in an external identity service or document store.

Give the caller a usable failure contract

The service implements the responses below; the workspace reactions are proposed integration behaviour.

Service resultWorkspace action
HTTP 401, unauthenticatedRestore the trusted session before querying; never fall back to a supplied role.
HTTP 200, no_resultsState that no authorized supporting facts were found; do not reveal whether a hidden client document exists.
HTTP 200, authorization_changedDiscard the answer, refresh authorization and allow one bounded retry; stop if the snapshot changes again.
HTTP 404, not_found on a citationTreat the source as unavailable to this caller and refresh the result; a previously displayed link is insufficient.

Engineering ideas adapted from the reference cases

Slack AI applies the requesting user’s permissions before supplying content to its model. It reuses existing access-aware reading and search infrastructure. Its derived summaries also retain source dependencies so that removal of source messages can invalidate affected summaries. The transferable ideas are permission-preserving retrieval and traceable derived content. Here, a small predicate and source-tagged facts make those dependencies inspectable. Slack Engineering: secure and private AI

Slack enterprise search delegates access to connected systems. Its federated queries use per-user OAuth authorization and necessary read scopes; administrators and users can revoke source access. This motivates taking authority from a trusted integration rather than from a query’s wording. The local lab uses a fixed registry instead of OAuth or live source APIs, so it does not reproduce Slack’s permission freshness. Its particular cache key is my implementation choice. Both articles appear in the reference CSV. Slack Engineering: enterprise search

Inspect what the boundary changes

Recorded runs on synthetic documents and demo identities. Unsafe paths deliberately omit access checks or reuse a response outside its valid scope. These are not ING records or tests of ING systems.

SAME_QUERY

The same question, different permitted evidence

payment review
Trusted identity
Advisor A — Client A entitlement
Request hints
No client or role hint supplied.

Hints describe the request. They cannot add a role or client entitlement.

Unsafe local comparison

Controlled failure path; fictional records only.

Evidence returned

Synthetic Client B payment review requires two reviewers.

Evidence in this response

  • Client B payment reviewclient · client-b

    Outside this principal’s scope

    Synthetic Client B payment review requires two reviewers. Payment review requires client-specific approval before release. The assigned reviewer confirms the hold.

    synthetic/client-b/00-client-b-review.txt · page 1

    Demo citation endpoint /citations/00-client-b-review

Inspect the access and retrieval trace

Fact-to-document mapping

  • Synthetic Client B payment review requires two reviewers.

    00-client-b-review
Principal
advisor-a
Authorization order
NONE — intentionally unsafe CLI baseline
Recorded eligible documents
No scope filter
Indexed for this request
00-client-b-review, 01-client-a-review, 02-client-b-contact, 03-client-a-contact, 04-client-a-schedule, 05-client-b-schedule, 06-client-a-exception, 07-client-b-exception, 08-public-guide, 09-public-hours, 10-public-help, 11-public-notice, 12-internal-review, 13-internal-onboarding, 14-internal-risk, 15-internal-handover
Ranked documents
00-client-b-review
Cache
Not used
{
  "principal_id": "advisor-a",
  "authorization_order": "NONE — intentionally unsafe CLI baseline",
  "indexed_document_ids": [
    "00-client-b-review",
    "01-client-a-review",
    "02-client-b-contact",
    "03-client-a-contact",
    "04-client-a-schedule",
    "05-client-b-schedule",
    "06-client-a-exception",
    "07-client-b-exception",
    "08-public-guide",
    "09-public-hours",
    "10-public-help",
    "11-public-notice",
    "12-internal-review",
    "13-internal-onboarding",
    "14-internal-risk",
    "15-internal-handover"
  ],
  "ranked_document_ids": [
    "00-client-b-review"
  ],
  "unauthorized_evidence_ids": [
    "00-client-b-review"
  ]
}

Authorized response

Server identity determines the evidence scope.

Evidence returned

Synthetic Client A payment review requires one reviewer.

Evidence in this response

  • Client A payment reviewclient · client-a

    Synthetic Client A payment review requires one reviewer. Payment review requires client-specific approval before release. The assigned reviewer confirms the hold.

    synthetic/client-a/01-client-a-review.txt · page 1

    Demo citation endpoint /citations/01-client-a-review

Inspect the access and retrieval trace

Fact-to-document mapping

  • Synthetic Client A payment review requires one reviewer.

    01-client-a-review
Principal
advisor-a
Authorization order
before request-local FTS and again before response
Recorded eligible documents
10
Indexed for this request
01-client-a-review, 03-client-a-contact, 04-client-a-schedule, 08-public-guide, 09-public-hours, 10-public-help, 11-public-notice, 12-internal-review, 13-internal-onboarding, 15-internal-handover
Ranked documents
01-client-a-review
Cache
miss
Recorded grants version
1
{
  "principal_id": "advisor-a",
  "grants_version": 1,
  "grants_digest": "1ac6bdeaa0c47fde",
  "policy_version": "demo-abac-v1",
  "data_version": 1,
  "client_hint": null,
  "ignored_hints": [],
  "cache": "miss",
  "authorization_order": "before request-local FTS and again before response",
  "eligible_count": 10,
  "indexed_document_ids": [
    "01-client-a-review",
    "03-client-a-contact",
    "04-client-a-schedule",
    "08-public-guide",
    "09-public-hours",
    "10-public-help",
    "11-public-notice",
    "12-internal-review",
    "13-internal-onboarding",
    "15-internal-handover"
  ],
  "ranked_document_ids": [
    "01-client-a-review"
  ],
  "independent_audit": {
    "checked_evidence_count": 1,
    "checked_fact_count": 1,
    "unauthorized_evidence_ids": [],
    "unsupported_fact_ids": [],
    "unsupported_output_fields": [],
    "all_authorized_and_supported": true
  }
}

Identical query, Advisor B

Trusted identity · Advisor B — Client B entitlement

Synthetic Client B payment review requires two reviewers.

  • Client B payment reviewclient · client-b

Relevance and a valid citation do not grant access. The same query searches a different eligible corpus for each trusted identity.

Inspect the recorded acceptance checks
  • PassUnchecked ranking selects an unauthorized client record
  • PassAdvisor A receives Client A evidence
  • PassAdvisor B receives Client B evidence
  • PassActual guarded evidence and facts independently pass current policy and source checks

Checks describe this synthetic run. They do not establish production authentication or authorization coverage.

{
  "id": "SAME_QUERY",
  "title": "The same question, different permitted evidence",
  "request": {
    "query": "payment review",
    "principal_label": "Advisor A — Client A entitlement",
    "top_k": 1
  },
  "baseline": {
    "status": "answered",
    "answer": "Synthetic Client B payment review requires two reviewers.",
    "facts": [
      {
        "doc_id": "00-client-b-review",
        "text": "Synthetic Client B payment review requires two reviewers."
      }
    ],
    "evidence": [
      {
        "doc_id": "00-client-b-review",
        "title": "Client B payment review",
        "classification": "client",
        "client_id": "client-b",
        "source_path": "synthetic/client-b/00-client-b-review.txt",
        "page": 1,
        "citation_url": "/citations/00-client-b-review",
        "snippet": "Synthetic Client B payment review requires two reviewers. Payment review requires client-specific approval before release. The assigned reviewer confirms the hold."
      }
    ],
    "trace": {
      "principal_id": "advisor-a",
      "authorization_order": "NONE — intentionally unsafe CLI baseline",
      "indexed_document_ids": [
        "00-client-b-review",
        "01-client-a-review",
        "02-client-b-contact",
        "03-client-a-contact",
        "04-client-a-schedule",
        "05-client-b-schedule",
        "06-client-a-exception",
        "07-client-b-exception",
        "08-public-guide",
        "09-public-hours",
        "10-public-help",
        "11-public-notice",
        "12-internal-review",
        "13-internal-onboarding",
        "14-internal-risk",
        "15-internal-handover"
      ],
      "ranked_document_ids": [
        "00-client-b-review"
      ],
      "unauthorized_evidence_ids": [
        "00-client-b-review"
      ]
    }
  },
  "guarded": {
    "status": "answered",
    "answer": "Synthetic Client A payment review requires one reviewer.",
    "facts": [
      {
        "doc_id": "01-client-a-review",
        "text": "Synthetic Client A payment review requires one reviewer."
      }
    ],
    "evidence": [
      {
        "doc_id": "01-client-a-review",
        "title": "Client A payment review",
        "classification": "client",
        "client_id": "client-a",
        "source_path": "synthetic/client-a/01-client-a-review.txt",
        "page": 1,
        "citation_url": "/citations/01-client-a-review",
        "snippet": "Synthetic Client A payment review requires one reviewer. Payment review requires client-specific approval before release. The assigned reviewer confirms the hold."
      }
    ],
    "trace": {
      "principal_id": "advisor-a",
      "grants_version": 1,
      "grants_digest": "1ac6bdeaa0c47fde",
      "policy_version": "demo-abac-v1",
      "data_version": 1,
      "client_hint": null,
      "ignored_hints": [],
      "cache": "miss",
      "authorization_order": "before request-local FTS and again before response",
      "eligible_count": 10,
      "indexed_document_ids": [
        "01-client-a-review",
        "03-client-a-contact",
        "04-client-a-schedule",
        "08-public-guide",
        "09-public-hours",
        "10-public-help",
        "11-public-notice",
        "12-internal-review",
        "13-internal-onboarding",
        "15-internal-handover"
      ],
      "ranked_document_ids": [
        "01-client-a-review"
      ],
      "independent_audit": {
        "checked_evidence_count": 1,
        "checked_fact_count": 1,
        "unauthorized_evidence_ids": [],
        "unsupported_fact_ids": [],
        "unsupported_output_fields": [],
        "all_authorized_and_supported": true
      }
    }
  },
  "observations": [
    {
      "label": "Identical query, Advisor B",
      "request": {
        "query": "payment review",
        "principal_label": "Advisor B — Client B entitlement",
        "top_k": 1
      },
      "response": {
        "status": "answered",
        "answer": "Synthetic Client B payment review requires two reviewers.",
        "facts": [
          {
            "doc_id": "00-client-b-review",
            "text": "Synthetic Client B payment review requires two reviewers."
          }
        ],
        "evidence": [
          {
            "doc_id": "00-client-b-review",
            "title": "Client B payment review",
            "classification": "client",
            "client_id": "client-b",
            "source_path": "synthetic/client-b/00-client-b-review.txt",
            "page": 1,
            "citation_url": "/citations/00-client-b-review",
            "snippet": "Synthetic Client B payment review requires two reviewers. Payment review requires client-specific approval before release. The assigned reviewer confirms the hold."
          }
        ],
        "trace": {
          "principal_id": "advisor-b",
          "grants_version": 1,
          "grants_digest": "6288a59ab74397eb",
          "policy_version": "demo-abac-v1",
          "data_version": 1,
          "client_hint": null,
          "ignored_hints": [],
          "cache": "miss",
          "authorization_order": "before request-local FTS and again before response",
          "eligible_count": 10,
          "indexed_document_ids": [
            "00-client-b-review",
            "02-client-b-contact",
            "05-client-b-schedule",
            "08-public-guide",
            "09-public-hours",
            "10-public-help",
            "11-public-notice",
            "12-internal-review",
            "13-internal-onboarding",
            "15-internal-handover"
          ],
          "ranked_document_ids": [
            "00-client-b-review"
          ],
          "independent_audit": {
            "checked_evidence_count": 1,
            "checked_fact_count": 1,
            "unauthorized_evidence_ids": [],
            "unsupported_fact_ids": [],
            "unsupported_output_fields": [],
            "all_authorized_and_supported": true
          }
        }
      }
    }
  ],
  "lesson": "Relevance and a valid citation do not grant access. The same query searches a different eligible corpus for each trusted identity.",
  "checks": [
    {
      "name": "Unchecked ranking selects an unauthorized client record",
      "passed": true
    },
    {
      "name": "Advisor A receives Client A evidence",
      "passed": true
    },
    {
      "name": "Advisor B receives Client B evidence",
      "passed": true
    },
    {
      "name": "Actual guarded evidence and facts independently pass current policy and source checks",
      "passed": true
    }
  ]
}

These are executed local recordings. The website does not call a live assistant. Unsafe comparisons use CLI-only unfiltered retrieval or deliberately naive cache replays; the HTTP router exposes the authorized path only.

Follow SAME_QUERY into CROSS_USER_CACHE: the request text stays constant while the principal changes, so the returned client evidence must change. In REVOKED_CACHE, Advisor A loses Client A access after a permitted answer was cached. The next scoped query returns no facts and the citation lookup returns not_found. A response audit checks actual answer text, facts, snippets, source metadata and citation paths. The authored checks establish these fixture behaviours, without estimating production attack coverage or ING performance.

What to retain when the system grows

A request-local index makes permission ordering inspectable for sixteen fixtures, at the cost of rebuilding FTS per request. A larger implementation could use indexed permission filters or delegated source search. The deciding constraint is whether a connector can restrict access before ranking and context assembly while keeping permissions current, rather than whether its search is lexical or vector-based.

Proposed connection to an employee workspace

The next engineering increment is an integration contract, not another ranker:

  1. Source ingestion: associate each chunk with a stable source ID, document version, source ACL and ACL revision. Preserve the source locator. A document change or deletion must invalidate its derived evidence and answer dependencies.
  2. Identity adapter: resolve the employee and current client assignments server-side. The workspace sends a desired client scope; the service intersects it with those assignments. If a connector cannot establish permission freshness for client records, withhold those records rather than rely on an old snapshot.
  3. Release and observability: define the acceptable consistency interval between source authorization and answer release. Record request ID, policy/data revision, decision code and latency in controlled operational logs; keep raw client content and developer candidate traces out of normal responses and routine logs.

Validation would replay assignment revocation, deletion and policy updates across these real connectors, including concurrent requests and cached citations. That is the missing evidence needed before claiming a production access guarantee.

Run the prototype and inspect its tests

Download the Python access-control lab. It includes the synthetic corpus, employee registry, service, comparison runs and tests. No model download or external API is required.

Inside the extracted directory:

python3 benchmark.py
python3 -m unittest discover -s . -v
python3 server.py

The README documents demo credentials, request examples and the loopback-only HTTP service. Run npm run prepare:ing in the portfolio repository after changing the lab to regenerate the recorded walkthrough, exact code excerpt and downloadable package.