Agentic 工作流

Enterprise Agent security and compliance: data permissions, audit trails, and personal data law in practice

A financial holding company's lending Agent was blocked by compliance for six months, with one reason: it could read customer credit data across the entire bank, but the company could not explain what it accessed or who saw it. Enterprise Agent deployments stall most often not on capability but on auditability. This article translates personal data regulations from Greater China into concrete engineering work: data permissions, dynamic masking, and audit trails.

By

Tenten AI 研究團隊

應用 AI

Published

February 6, 2026

Read time

7 分鐘

AI agent 資安合規個資法稽核軌跡資料權限Agentic 工作流

Last year, a financial holding company called us to address a problem. Six months earlier, their compliance team had rejected a lending review Agent for a single reason: the system could access customer credit data across the entire bank, but nobody could explain what it actually accessed or who saw it.

Model accuracy was not the problem. The model performed well. Auditors wanted to know: what customer records did this Agent pull on June 12 at 3 PM for the relationship manager at Branch A, and under what authorization? No one could answer. The system logged API calls as successful or failed, but not the details: who accessed it, on behalf of whom, and which fields they touched.

This is where enterprise Agent deployments stall. The issue is not capability. It is auditability.

Permissions belong to users, not models

A common pitfall emerges when building RAG or agentic workflows. Teams give the Agent a service account with access to the entire knowledge base or full dataset, then rely on prompting to constrain it to answer questions only about the current user.

This approach works in demonstrations. In production, it becomes a liability.

Large language models produce non-deterministic outputs. A single instruction cannot guarantee the model will never overstep its scope. One prompt injection or one context contamination could cause the Agent to return Client B's data to Relationship Manager A. Under personal data regulations, the technical ability to access data you should not access is itself a violation. An actual breach does not need to occur.

The design principle is to keep permissions in the data layer, not the Agent. Every retrieval must carry the current user's identity, and the data layer (not the model) decides which records return. Implementation typically follows this approach:

  • Enforce row-level security or tenant isolation at retrieval time. The Agent cannot access data outside the user's authorization scope and cannot pull it into context.
  • Route all tool calls through your existing identity and access management system. High-sensitivity actions like credit checks or wire transfers must pass the same authorization check a human would use, not bypass it.
  • Apply dynamic masking to sensitive fields before they reach the model context. ID numbers, account numbers, and diagnosis codes show in full, partial, or hashed form depending on the user's role. Masking happens in the data layer, not in model prompts.

The model will make mistakes. The architecture must not grant it permission to do so.

Audit trails must trace who did what for whom

Decision-makers focus on traceability. If something goes wrong, can they figure out what happened? Agent auditing is harder than traditional system auditing because an additional layer of opaque reasoning exists. This layer must be deliberately logged.

An audit trail must record these elements: the real user who triggered the Agent, the data sources and fields the Agent retrieved, the tools and parameters it called, the masking rules that applied, and the final output. These records must be immutable, kept and destroyed according to retention policies, and connected to your existing SIEM. Audit logs should be stored separately from your application database, with permissions segregated from operational data. If the auditor and the audited system share access controls, auditing loses meaning.

Personal data law across Greater China and engineering implementation

Taiwan, mainland China, and Hong Kong have different personal data rules, but Agent design addresses the same control points across all three jurisdictions. The table below maps each regulatory requirement to concrete engineering work.

Regulatory FocusTaiwan (Personal Data Protection Act)China (Personal Information Protection Law / PIPL)Agent Engineering Implementation
Collection and Use Must Match PurposeOff-purpose use requires separate consentSensitive personal data needs 'explicit consent'Tag data by purpose; bind Agent retrieval scope to use case
Subject RightsAccess, correct, deleteAccess, copy, portability, deleteAudit trail must locate all records processed for a given individual
Sensitive Personal DataMedical records, genetic data (strict)Biometric data, financial accounts, location historyEnforce masking before context; role-based unmasking
Cross-Border TransferCompetent authority may restrictRequires security assessment or standard contractsTag data residency; API calls to models have auditable data flow
Incident ReportingNotify subject and competent authorityReport within deadline and remediateReal-time alerts on anomalous access; feed into monitoring and SIEM

Hong Kong's Personal Data (Privacy) Ordinance emphasizes data subject protection and transfer limits in similar ways. The principle is to translate compliance requirements into rules the data layer can enforce, not into promises written in policy documents. Agents operate within the scope of permissions and data they have access to, nothing more.

Operability beyond deployment day

Compliance teams ask this question: do these controls remain in place six months later?

Agent systems change. New data sources connect. Tools get added. Models update. Masking rules shift with business needs. Each change can reopen a permission that was closed. Operability is not optional; it is fundamental. Continuous offline testing applies red-team scenarios to sensitive access patterns (designed to trigger unauthorized access or expose masked fields). Pass rates become production thresholds, not one-time deployment checks. The permission matrix, masking rules, and audit schema are version-controlled. Every change generates a traceable record.

Back to the financial holding company: the solution was not to swap the model. Permissions moved from the Agent to the data layer. Complete audit trails were added. Role-based dynamic masking was layered on. The compliance team received a control matrix they could follow. The third submission was approved.

Security, auditability, and compliance are built into Agent systems from the start, not added after. A demonstration that runs is not production. Production is a system that can be audited thoroughly and answer every compliance question.

One stuck workflow
is enough to begin

Tell us what the team does today, where it breaks down, and what a better working day should look like.