Databricks Agent Bricks Legal-Entity Entitlements on AWS for Hong Kong and Singapore Banking Operations

A letter to shareholders, clients, regulators, employees, and the people entrusted with preserving legal-entity boundaries in an agentic institution

For most of the history of international banking, legal-entity separation was visible in buildings, ledgers, licenses, management chains, and correspondent relationships. A Hong Kong branch and a Singapore branch could belong to the same banking group while remaining different regulated establishments with different books, customer obligations, data restrictions, capital expectations, reporting duties, and supervisory relationships. The group could consolidate financial results, but the operating rights of one entity did not automatically become the operating rights of another.

Cloud data architecture made physical consolidation easier. Data from Entity HK and Entity SG can now be stored in the same Amazon S3 estate, governed by the same Databricks account, and queried through the same analytical platform. That consolidation can improve resilience, consistency, and economics. It also creates a serious risk. A shared platform can tempt an institution to confuse common infrastructure with common authority.

The arrival of AI agents increases the consequence. A human analyst usually chooses a report, writes a query, and reviews a result. An agent can choose tools, generate SQL, retrieve documents, call models, combine evidence, and repeat the process without a person inspecting every intermediate step. A single overprivileged service principal can turn a well-designed agent into a cross-entity data-exfiltration mechanism. A correct final answer does not excuse an unauthorized intermediate retrieval. An agent that reads Singapore customer transactions before deciding they are irrelevant has already crossed the boundary.

Databricks Agent Bricks, Unity Catalog, Unity Gateway, Genie Agents, and Genie Ontology provide the ingredients for a stronger model. Agent Bricks can build and operate production agents using governed data, models, tools, and enterprise context. Unity Catalog can register agents and services as governed objects, assign ownership, enforce grants, apply row filters and column masks, and preserve lineage and audit. Genie Ontology can supply business meaning while respecting Unity Catalog permissions. Databricks Clean Rooms can support approved collaboration where parties must calculate shared outcomes without directly exposing each other’s underlying data.

The institution must assemble these capabilities around one principle: an agent receives authority because of the legal entity, role, purpose, and execution context of the request, not because it happens to run inside the group’s Databricks account.

This paper describes an AWS-based architecture for a global banking group operating Entity HK and Entity SG on one Databricks platform while preserving extreme legal-entity and semantic isolation. It explains the role of the three-level namespace, service principals, account groups, attribute-based access control, dynamic row filtering, column masking, governed tags, trusted execution, Genie Ontology, clean rooms, aggregation controls, differential privacy, Photon, and auditable agent execution.

It also corrects several dangerous simplifications. Unity Catalog does not expose a product object formally named an entitlement interceptor. Policy enforcement is part of Unity Catalog’s access-control and query-execution path. Photon can execute predicates efficiently, but an institution should not promise that every policy guarantees physical non-reading of disallowed rows. Pruning depends on predicate shape, statistics, file layout, expression complexity, and runtime. The security guarantee is that unauthorized rows and values are not returned to the principal. Physical file elimination is a performance property that must be verified separately.

Databricks Clean Rooms do not automatically restrict every calculation to SUM or AVG, and they do not automatically add differential-privacy noise to every result. Clean Rooms provide a no-trust collaboration environment, OpenSharing, isolated serverless execution, explicit code approval, output control, and governed assets. Aggregate-only interfaces and differential privacy must be deliberately designed, tested, and approved. Precision in these statements is not pedantry. It is the difference between a control and a hope.

The business problem is legal authority inside shared infrastructure

Hong Kong and Singapore may be regional peers, but they are not interchangeable operating domains. Entity HK can be subject to Hong Kong banking, securities, privacy, outsourcing, recordkeeping, and supervisory requirements. Entity SG can be subject to Singapore banking, securities, personal-data, technology-risk, outsourcing, and recordkeeping requirements. The exact obligation depends on license, product, customer, booking model, processing location, and contractual arrangement. Platform architecture should not attempt to replace legal interpretation. It should make the approved interpretation enforceable.

A regional liquidity agent illustrates the problem. Group treasury may legitimately need a consolidated view of aggregate liquidity across Asia-Pacific. A Hong Kong desk agent may legitimately need Hong Kong balances, expected settlements, collateral, and limits. A Singapore agent needs the corresponding Singapore information. Consolidation does not imply that the Hong Kong agent may inspect Singapore customer-level transactions. Group treasury’s need for aggregate liquidity does not imply access to customer names or counterparty account numbers.

Traditional role-based access control can express some of this. The platform grants a Hong Kong group access to Hong Kong tables and a Singapore group access to Singapore tables. The model becomes fragile when data is physically shared, users hold several roles, applications use service principals, and hundreds of agents are created. Manual grants accumulate. A new table may receive a broad default. A copied view may omit a filter. An agent may call a function whose owner has broader access.

The institution therefore needs policy at several layers. Namespace isolation organizes ownership. Identity isolation establishes who is acting. ABAC interprets governed tags and context. Row filters constrain legal-entity records. Column masks protect sensitive fields. Service and tool permissions constrain what the agent can call. Genie Ontology constrains what semantic context the agent can retrieve. Clean Rooms constrain cross-party computation. Audit and tracing demonstrate what actually happened.

No layer should be treated as sufficient alone. Security comes from their composition.

The three-level namespace should encode accountability, not only convenience

Unity Catalog uses catalog.schema.table. This namespace is more than a naming convention. It is the hierarchy through which ownership, grants, policies, lineage, and discovery can be organized.

A legal-entity-first design can create catalogs such as bank_hk_prod, bank_sg_prod, and group_apac_shared. Within each legal-entity catalog, schemas can separate domains such as liquidity, payments, markets, credit, customer, finance, compliance, and agent_serving. Tables and views contain the governed records.

The Hong Kong liquidity position could be bank_hk_prod.liquidity.position_current. The Singapore equivalent could be bank_sg_prod.liquidity.position_current. A group aggregate approved for regional treasury could be group_apac_shared.treasury.liquidity_summary. The shared catalog should contain products deliberately published for group use, not direct shortcuts into entity-level base tables.

This model provides strong ownership clarity. Entity HK data owners control Hong Kong catalogs. Entity SG data owners control Singapore catalogs. Group owners control published shared products. A group administrator should not automatically become the business owner of every table simply because the administrator maintains the platform.

A second valid design stores common-format facts in a regional catalog with a mandatory legal_entity_code column. This improves shared engineering and can simplify group consolidation. It raises the importance of row-level policy and creates a larger blast radius if a policy is missing. The institution should use this model only when source contracts, policy inheritance, testing, and ownership are mature.

A hybrid design generally fits a global bank. Entity-owned raw and sensitive data remains in separate catalogs. Standardized, lower-sensitivity facts can enter a regional curated catalog with mandatory legal-entity attributes and ABAC. Deliberately aggregated products enter a group shared catalog. The platform avoids both extremes: complete duplication and uncontrolled centralization.

The namespace should also separate production from development. A service principal for a development agent should not silently receive production access through a common group. Development should use masked, synthetic, or approved branch data. Production grants should be explicit and time bounded where appropriate.

The identity plane should give each agent a non-human, accountable identity

Every production Agent Brick instance should run under a dedicated service principal or a dedicated governed service identity, depending on the deployment pattern. Reusing one service principal across Hong Kong and Singapore destroys attribution and increases the blast radius of a credential or policy error.

A Hong Kong liquidity agent can use sp_agent_liquidity_hk_prod. The Singapore instance can use sp_agent_liquidity_sg_prod. A group aggregate agent can use sp_agent_liquidity_apac_aggregate_prod. Each identity should have an owner, legal entity, business purpose, environment, cost center, risk classification, creation date, review date, and retirement process.

The service principal should belong to account groups aligned with function and legal entity, such as group_entity_hk, group_liquidity_readers, and group_agent_prod. The Singapore principal should belong to group_entity_sg, not group_entity_hk. Group membership should be managed through an approved identity lifecycle and reviewed independently of application deployment.

Group membership is necessary but not sufficient. An agent can act for a user. When the use case requires user-specific authority, the platform should preserve the end user’s identity through a supported on-behalf-of mechanism rather than collapsing every request into the app service principal’s broad rights. The effective authority should be the intersection of the user, agent, legal entity, purpose, tool, and data asset.

This distinction matters for a regional manager. The manager may be authorized to see aggregate Hong Kong and Singapore liquidity but not customer-level Singapore transactions. If the request runs only as a powerful regional service principal, the agent can retrieve too much. If the execution carries the manager’s governed context and uses aggregate products, the platform can enforce the intended boundary.

Agent services registered through Unity Gateway should receive explicit EXECUTE grants. Registration provides discoverability, ownership, and consistent permissions. It does not make an agent safe. The service’s source connection, base path, runtime policy, model, tools, and underlying data privileges must all be reviewed.

Secrets should use OAuth or managed credentials rather than personal tokens. No prompt, notebook, environment file, or Markdown instruction should contain database credentials. Credential rotation should not require changing the agent’s semantic identity.

ABAC should express policy from governed attributes

Role-based grants answer which principal can use which object. Attribute-based access control answers which policy should apply when object, identity, and data attributes meet defined conditions. This is essential at banking scale because a single manual grant model cannot safely express thousands of combinations.

Unity Catalog ABAC policies use governed tags and can apply row filters or column masks at catalog, schema, or table scope. ABAC is preferable to manually attaching a policy to every table when the institution needs consistent enforcement across many data products. A new tagged table can inherit the policy rather than depend on a developer remembering to add it.

The bank should define account-level governed tag keys such as legal_entity, jurisdiction, data_classification, customer_data, cross_border_restricted, purpose, books_records, and retention_class. Tag values should be controlled by authorized principals. An ordinary table owner should not be able to remove Classification.HighlyConfidential merely to make a query succeed.

Identity attributes should be sourced from the enterprise identity plane. Examples include home legal entity, approved jurisdictions, employment status, function, outsourcing company, and clearance. Databricks supports identity-attribute functions in specified ABAC policy conditions, subject to current limitations. Identity attributes should be treated as security data. Their source, freshness, and change approval require the same control as privileged group membership.

A Hong Kong row policy should not simply test whether the principal’s name contains hk. It should call a governed SQL function or policy condition that evaluates authoritative group or identity attributes. The row data must contain a canonical legal-entity code, not an unreliable free-text country field.

ABAC requires supported compute. Current Databricks documentation requires serverless compute, Databricks Runtime 16.4 or above on standard compute, or dedicated Runtime 16.4 or above with fine-grained access-control filtering enabled. Older unsupported runtimes should not be allowed to read ABAC-secured tables through an alternate path.

Policy scale also requires quota awareness. The institution should prefer reusable policies at catalog or schema scope and avoid one custom policy per table and agent. ABAC policy counts, principal limits, and tag propagation delay should be tested before the bank treats the design as limitless.

Row filters should enforce legal-entity visibility at query time

A row filter is a SQL function or policy expression evaluated at query time. Rows for which the function returns false are excluded from the result. For a shared regional table, the filter can compare legal_entity_code with the principal’s allowed entity set.

A simplified Hong Kong-only concept is easy to describe: return a row when legal_entity_code = 'HK' and the principal belongs to the Hong Kong entity group. Production logic is usually more nuanced. Some service principals need only HK. Some regional risk principals may see HK and SG aggregates but not detail. Some compliance investigators may receive approved temporary access. Some operational records belong to a booking entity, processing entity, and customer jurisdiction simultaneously.

The correct model uses explicit dimensions. booking_legal_entity_code identifies the entity holding the position. processing_legal_entity_code identifies the operational processor. customer_jurisdiction_code identifies the customer context. data_residency_class identifies storage or processing restrictions. A policy should use the dimension relevant to the approved purpose rather than one overloaded legal_jurisdiction_code.

The policy should fail closed. A null or unknown entity code should not become globally visible. It should be excluded from ordinary consumption and routed to data stewardship. An unresolved mapping is risk, not shared data.

When the agent sends SQL or uses a DataFrame API, Unity Catalog evaluates the effective principal and applicable policy. The engine executes the secured logical plan. Unauthorized rows do not appear in the result. The application should not be able to disable the policy through prompt wording, generated SQL, or a notebook parameter.

The physical behavior needs careful language. The optimizer can push a simple legal-entity predicate into scan planning, and Delta Lake or Apache Iceberg statistics and clustering can allow files containing only Singapore rows to be skipped for an HK-only query. Photon can execute eligible filters efficiently. However, a complex UDF, mixed-entity file, missing statistics, or unfavorable layout can require reading files that contain both allowed and disallowed rows before filtering them. Security is maintained because prohibited rows are not returned, but physical non-read cannot be universally guaranteed by row filtering alone.

If the legal requirement demands stronger physical or regional isolation, the bank should store entity data in separate catalogs, storage locations, workspaces, AWS accounts, or regions as required. Logical policy is not a substitute for an approved residency architecture.

Column masks should minimize sensitive values before agent context is built

Column masks transform a column’s value for principals who lack the required authority. The return type remains compatible with the underlying column. The mask can return the original value, a partial value, a token, a generalized category, or null.

Fields such as customer name, counterparty account, national identifier, payment reference, telephone number, email address, exact address, and internal investigation marker should be classified through governed tags. A column tagged data_classification=highly_confidential can inherit a mask policy at catalog or schema scope.

The mask should match the purpose. A liquidity agent rarely needs a customer’s name. It may need customer segment, currency, expected amount, settlement date, and confidence. Returning null is safer than returning a partially masked name if the name has no analytical purpose. A support workflow may require the last four digits of an account. A sanctions workflow may require the full legal name but only under approved handling.

Masking should occur before data becomes model context. Sending a full account number to a model and asking the model not to reveal it is not data protection. The SQL result, tool response, trace, cache, and prompt should contain only the authorized representation.

A tag does not enforce a policy by itself. The bank must create the governed tag, restrict assignment, attach the ABAC mask policy, and test the result through every supported runtime and application path. The platform should continuously scan for highly confidential columns without an active mask or a documented exception.

Photon improves execution but policy remains a governance contract

Photon is Databricks’ vectorized query engine for SQL and DataFrame workloads. It can accelerate scans, joins, aggregations, and filters on supported operations. In a legal-entity query, the secured plan can include the row predicate, and Photon can execute that plan efficiently.

The bank should nevertheless separate security assurance from performance assurance. The security test verifies that an HK principal cannot obtain SG rows or unmasked SG values. The performance test verifies that the plan prunes relevant files, reads an acceptable number of bytes, and meets latency objectives. Passing one does not imply passing the other.

Data layout should support the policy. Tables can use liquid clustering on high-value fields such as booking_legal_entity_code, as_of_date, and account_id where query evidence supports them. Files should avoid unnecessary mixing of entity records when the principal access pattern is entity selective. Data-skipping statistics should cover policy and filter fields. The team should inspect query profiles and plans under the real service principal.

The institution should not reveal physical plan details to users who do not need them if those details expose schema or policy internals. Security teams and performance engineers require enough telemetry to prove execution while preserving separation of duties.

Genie Ontology should provide semantic isolation as well as data isolation

Data authorization alone does not solve semantic cross-contamination. An HK agent can be restricted to HK rows yet still answer with a Singapore-specific business definition if the ontology or instructions combine both domains carelessly.

Genie Ontology is a unified context layer combining modeled Unity Catalog semantics with inferred context from metric views, dashboards, SQL queries, and Genie Agents. Snippets receive authority scores and are permission gated. Genie uses only context extracted from assets the principal is permitted to see.

The bank should create entity-specific authoritative assets. Hong Kong liquidity definitions belong in HK-owned metric views, pages, and Genie Agents. Singapore definitions belong in SG-owned assets. Group definitions belong in the shared catalog and should state how entity values are consolidated, converted, eliminated, and timestamped.

A term such as available liquidity can differ by legal entity because of local reserve, settlement, encumbrance, or funding treatment. The HK ontology should define available_liquidity_hk through the approved Hong Kong metric. The SG ontology should define its own metric. A group metric should not silently reuse one entity’s definition.

Authority should be explicit. A signed treasury policy outranks an old dashboard description. A certified metric view outranks an ad hoc query. A current legal interpretation outranks a conversational note. Genie Ontology can score authority and freshness, but the organization remains responsible for source hierarchy, ownership, effective date, and supersession.

The agent should cite the data and semantic sources used. A regional answer should state whether it is an HK detail, SG detail, or approved group aggregate. The user should not have to infer the legal scope from the conversation.

Ontology isolation needs testing. The team should issue the same ambiguous prompt under HK, SG, and regional identities and verify that the answer uses the correct definition and source. A response can contain no unauthorized rows and still be legally or economically wrong because it applied the wrong entity’s meaning.

Agent Bricks should be deployed as separate bounded agents

The bank should not create one omnipotent APAC agent and rely on prompts to keep it within legal boundaries. It should create bounded agents with independent identities, data permissions, tool permissions, budgets, tests, and owners.

The HK liquidity Agent Brick should use the HK service principal, HK Genie Agent, HK ontology context, HK metric views, and approved HK tools. The SG instance should use equivalent SG assets. The regional aggregate agent should use only published group aggregate products and clean-room outputs where necessary. It should not hold direct read permission on entity-level customer tables.

The system prompt should state purpose and limits, but prompts are not security policy. A user can ask the HK agent to ignore its rules. Unity Catalog, Unity Gateway, and tool authorization must make the request impossible rather than merely discouraged.

Each tool should be registered and governed. A function that retrieves account detail should be inaccessible to the group aggregate agent. A tool that writes a liquidity proposal should write only to the appropriate legal-entity workflow. A communication tool should not send externally without human approval.

MLflow tracing and agent evaluation should record model calls, tool calls, retrieved assets, SQL, latency, errors, guardrails, and outcomes subject to sensitive-data controls. Traces should use governed storage, retention, and masking. The bank should not improve agent observability by creating a second unprotected PII repository.

Agent evaluation should include legal-entity negative tests. The HK agent should be asked directly and indirectly for SG transactions, SG customer names, group-only reports, hidden account mappings, and prompt-injected tool calls. The SG agent should face symmetric tests. The regional agent should be tested against attempts to infer entity-level detail from repeated aggregate queries.

Trusted execution should be defined through verifiable controls

The phrase trusted execution context should mean more than a secure cluster. It should describe an execution in which identity, code, data, model, tools, network, logging, and output policy are known and enforced.

For an Agent Brick, the trusted context includes the dedicated service principal, registered agent service, approved model service, approved MCP or function tools, Unity Catalog data grants, ABAC policies, network egress restrictions, environment, code or agent version, and trace destination. Every production invocation should be attributable to this context.

The bank should use serverless or supported governed compute according to policy. It should prohibit arbitrary package installation and unrestricted internet egress for high-risk agents. External model endpoints should receive only permitted data and should be governed through Unity Gateway. Fallback models must satisfy the same jurisdiction, retention, and contractual requirements.

Trusted execution should also protect against confused-deputy behavior. A low-privilege user should not be able to cause a high-privilege agent to retrieve data and return it indirectly. On-behalf-of user context, result filtering, tool-specific authorization, and purpose checks reduce this risk.

The institution should maintain an execution manifest for every agent release. It should contain agent ID, legal entity, owner, code or configuration version, model, tools, data scopes, policy versions, network policy, benchmark result, budget, and rollback version. A change to any of these can alter effective authority and should trigger review.

Clean Rooms should govern cross-entity collaboration without pretending to erase trust

Databricks Clean Rooms use Unity Catalog, OpenSharing, serverless compute, and isolated execution to let collaborators analyze sensitive data without giving one another direct access to the underlying assets. In an approval-based clean room, collaborators approve code before it runs. In a packaged clean room, a provider can supply hidden code that a consumer runs against its own shared assets under a different trust model.

Although Entity HK and Entity SG belong to one bank, a clean-room pattern can be valuable when local legal owners require explicit collaboration boundaries. Each entity contributes approved tables or views. Neither receives direct access to the other’s rows. Approved notebooks calculate group-level liquidity, concentration, overlap, or stress measures in the isolated central environment.

The clean room itself does not guarantee that output is safe. An approved notebook could return a single-row group whose value identifies one transaction. A sequence of queries could differ by one person and reveal that person’s data. A model could encode sensitive information in free text. Output governance must therefore be explicit.

The bank should allow only reviewed notebooks or packaged analyses. Code should aggregate through approved functions. Output should require minimum group sizes, suppress rare categories, round or bucket sensitive measures, cap dimensions, prevent arbitrary predicates, and log every run. Raw rows should never be returned to the regional agent.

Clean Rooms operate on serverless compute and have specific network and storage requirements. If an S3 bucket is protected by a firewall or private endpoint, the institution must configure supported secure connectivity such as SecureConnect or use an approved storage arrangement. Network policy is part of the clean-room trust model.

The bank should distinguish a clean room from a general internal data share. If a group function has approved direct aggregate access, a certified group table may be simpler. A clean room is justified when collaborating owners need a stronger no-direct-access boundary, code approval, and explicit output contract.

Differential privacy must be designed, not assumed

Differential privacy provides a mathematical bound on how much the presence or absence of one individual record can affect a result. It typically adds calibrated random noise to aggregates and consumes a privacy budget represented by epsilon. Lower epsilon generally means stronger privacy and lower accuracy. Delta is another parameter in approximate differential privacy.

Databricks Clean Rooms can host approved code that implements differential privacy, but the platform should not be described as automatically adding noise to every clean-room output unless the specific deployed solution does so. The bank must select a library or implementation, define contribution bounds, choose epsilon and delta, track cumulative budget, and validate utility and attack resistance.

A regional liquidity aggregate may not require differential privacy when values are legal-entity-level and no personal data is involved. Customer concentration, transaction behavior, or small counterparty groups can require stronger protection. The method should follow the disclosure risk.

A practical control begins by limiting each subject’s contribution. Without contribution bounds, one customer can dominate an aggregate and remain inferable even after noise. The system then enforces a minimum group size, calculates an aggregate, adds calibrated noise, records privacy-budget consumption, and prevents unlimited repeated queries.

The regional agent should receive only the approved noisy or thresholded output. It should not receive the pre-noise result, privacy seed, or raw clean-room table. Differential-privacy parameters and budget usage should be part of the audit record.

The bank should test utility with domain experts. Excessive noise in liquidity data can create unsafe treasury decisions. In some cases, exact entity-level aggregate values governed by contractual access are better than noisy figures. Privacy technology should reduce disclosure risk without manufacturing false precision or false uncertainty.

Step 1: establish the AWS and Databricks account boundaries

Create an AWS Organizations structure separating security, centralized logs, shared networking, production Databricks, non-production Databricks, and source integration. For materially different residency or regulatory requirements, use separate AWS accounts and Databricks workspaces for Hong Kong and Singapore rather than relying only on logical controls.

Use AWS Control Tower where it fits the enterprise landing zone. Apply service control policies that protect AWS CloudTrail, AWS Config, Amazon GuardDuty, AWS KMS, approved regions, and Amazon S3 public-access blocks. Restrict unapproved cross-region replication and service use.

Use AWS IAM Identity Center federated with the enterprise identity provider. Synchronize groups and identity attributes through approved lifecycle management. Create separate entity, function, environment, and privileged-access groups. Require multifactor authentication and short privileged sessions.

Deploy Databricks workspaces in approved AWS regions. Use private subnets, controlled egress, S3 gateway endpoints, supported interface endpoints, and AWS PrivateLink where supported. Document any control-plane or model processing outside the data region. A shared metastore should be used only after legal, security, and data-residency review.

Centralize AWS and Databricks audit records in a restricted security account or catalog. Entity administrators should see relevant records, while a central audit team can perform approved group oversight without receiving unrestricted business data.

Step 2: create the namespace and storage model

Create bank_hk_prod, bank_sg_prod, and group_apac_shared catalogs. Create corresponding development catalogs with masked or synthetic data. Within each production catalog, create domain schemas and agent-serving schemas.

Back entity catalogs with approved S3 storage locations and AWS KMS keys. Use separate storage roots and keys where the risk assessment requires stronger separation. Do not grant users direct S3 access simply because they can query a table.

Assign catalog ownership to legal-entity data owners or delegated platform groups. Keep metastore administration separate from data ownership. A metastore admin should not perform ordinary analytical work with unrestricted authority.

Create published aggregate views in the shared catalog. Never grant the regional agent broad SELECT on both entity catalogs merely to simplify development.

Step 3: create service principals and account groups

Create dedicated service principals for every production agent instance and environment. Use names that encode function, entity, and environment. Add them to the minimum account groups.

Grant USE CATALOG, USE SCHEMA, SELECT, EXECUTE, CAN QUERY, or agent-service privileges only where required. Avoid ownership and MANAGE for runtime identities. The deployment identity and runtime identity should be different.

Register eligible agents as agent services in Unity Catalog through Unity Gateway. Grant EXECUTE only to intended users or applications. Record owner, legal entity, purpose, data scope, model, and support channel in the service metadata.

Use OAuth and managed authentication. Rotate credentials and review group membership quarterly or after organizational change. Disable unused service principals promptly.

Step 4: define governed tags and ABAC policy

Create account-governed tags for legal entity, jurisdiction, classification, customer data, purpose, residency, and retention. Restrict who can define and assign tag values.

Tag catalogs, schemas, tables, and high-risk columns. Require canonical legal-entity columns in shared regional facts. Add quality expectations that reject unknown or null legal entities from consumer tables.

Create row-filter policies at the regional catalog or schema level. Create column-mask policies for highly confidential tags. Use serverless or Runtime 16.4 and above according to current ABAC requirements.

Test propagation delay after tag change. A policy change should not be considered complete until effective and verified. Emergency revocation should use direct grants, principal disablement, or other immediate controls where tag propagation is too slow.

Step 5: create legal-entity row-filter functions

Implement governed SQL functions or inline policy expressions that use authoritative identity attributes and legal-entity columns. Fail closed for null, unknown, or unsupported values.

Create explicit exception logic for approved regional roles. Do not put named individuals permanently into policy code. Use groups or identity attributes with expiry and approval.

Attach the policies through ABAC at the broadest safe scope. Verify the policy through direct SQL, DataFrame APIs, Genie Agents, Databricks Apps, model tools, and scheduled jobs.

Inspect query profiles to measure pruning. Improve clustering and statistics if entity-selective workloads scan excessive data. Do not weaken the security function to improve performance.

Step 6: create column-mask policies

Define masks for customer name, account number, national identifier, contact data, counterparty account, internal investigation fields, and proprietary trading attributes. Select null, token, partial mask, or generalized value according to purpose.

Attach policies through governed classification tags. Test combinations of roles and identity attributes. Verify that masked values do not leak through derived expressions, caches, traces, exports, or error messages.

Build a coverage report listing sensitive tagged columns, active policies, exceptions, owners, and latest test date. Any highly confidential column without an active policy or documented isolated access path should generate a control defect.

Step 7: build entity-specific Genie Agents and ontology

Create separate HK and SG Genie Agents using only entity-owned tables, views, metric views, example SQL, and instructions. Use a pro or serverless SQL warehouse. Remember that data access is evaluated using each end user’s Unity Catalog permissions when users interact with Genie.

Create authoritative metric views for entity liquidity, settlement exposure, concentration, and limits. Curate Genie Ontology snippets with owner, jurisdiction, authority, freshness, and supersession.

Create a group Genie Agent using only approved shared metrics, published aggregates, and clean-room outputs. Test ambiguous terminology across identities. Verify that HK prompts use HK definitions and SG prompts use SG definitions.

Add citations and source display to user-facing answers. Every answer should state its legal-entity scope and as-of time.

Step 8: build and govern Agent Bricks

Create a separate Agent Brick project for HK, SG, and group aggregation. Bind each to its dedicated service principal, Genie Agent, model service, data resources, and tools. Set maximum steps, tool-call limits, token budgets, timeouts, and fallback rules.

Use Unity Gateway to govern model and agent access. Register models, tools, MCP services, and agents where supported. Prevent the group agent from calling entity-detail tools.

Deploy through version-controlled CI/CD. Require legal-entity entitlement tests before production. Store MLflow traces in governed locations with sensitive-data redaction.

Evaluate SQL correctness, semantic scope, citation validity, refusal quality, prompt injection, confused-deputy behavior, and cross-entity inference. A correct refusal to reveal SG detail to an HK agent is a successful outcome.

Step 9: create the cross-entity Clean Room

Enable Unity Catalog, serverless compute, OpenSharing, and the required clean-room features. Configure protected S3 access through the supported secure connectivity model.

Create a clean room between the entity data owners or their approved collaboration identities. Share only approved views. Add notebook code that calculates allowed group aggregates. Require approval before execution under the no-trust model.

Apply minimum group sizes, dimension allowlists, output rounding, query limits, and suppression. If differential privacy is required, implement bounded contribution, calibrated noise, privacy-budget tracking, and controlled output.

Publish only approved results into group_apac_shared. The regional Agent Brick should consume the published output, not the clean room’s raw inputs.

Step 10: validate entitlements as a production control

Build a matrix covering HK human users, SG human users, regional users, HK agents, SG agents, regional agents, support identities, data engineers, and administrators. Test allowed and denied access for every critical table, column, tool, agent, and clean-room output.

Use canary records with synthetic identifiers to detect cross-entity leakage. Ask each agent for prohibited data using direct prompts, indirect descriptions, encoded requests, malicious documents, and tool chains. Inspect traces to confirm that prohibited retrieval did not occur at any intermediate step.

Run concurrency and performance tests with ABAC enabled. Measure scan bytes, policy execution latency, query latency, and warehouse scaling. Security tests and performance tests should use the same production identity and policies.

Automate these tests in release pipelines and run them after policy, tag, schema, group, runtime, ontology, model, tool, or agent changes.

Step 11: establish monitoring, audit, and response

Collect Unity Catalog audits, Unity Gateway activity, agent traces, query history, policy changes, tag changes, service-principal changes, clean-room runs, and AWS security logs. Correlate them with one invocation or case ID.

Alert on denied cross-entity attempts, unusual query volume, repeated aggregate queries near suppression thresholds, changes to highly confidential tags, broad grants, disabled policies, and agent use outside approved hours or regions.

Create a response playbook. Disable the agent service, revoke service-principal group membership, stop the endpoint, preserve traces, identify affected data, and notify privacy, legal, security, and entity owners according to policy. Practice the playbook before an incident.

The human operating system is part of legal-entity isolation

Google’s psychological-safety research matters because the earliest sign of cross-entity leakage may be a junior analyst who sees an unfamiliar customer name, an engineer who notices a policy was not applied, or a compliance officer who sees a semantic definition from the wrong jurisdiction. They must be able to stop the agent without fear of delaying an executive initiative.

Amazon Leadership Principles provide the operating discipline. Customer Obsession means protecting customer confidentiality before optimizing agent convenience. Ownership means tracing an unauthorized answer through identity, group, policy, ontology, tool, and model. Dive Deep means inspecting intermediate tool calls rather than accepting a harmless final response. Insist on the Highest Standards means refusing to call a prompt a security boundary. Bias for Action means disabling a questionable agent while evidence is gathered. Frugality means centralizing reusable policy rather than copying fragile views. Earn Trust means disclosing preview status and residual risk. Have Backbone; Disagree and Commit means challenging a regional platform design that over-collects entity data and supporting the approved architecture after legal owners agree.

Bridgewater Associates contributes extreme truth and transparency and the idea meritocracy. A senior sponsor’s confidence should not outrank a failed entitlement test. A profitable use case should not receive weaker privacy controls. Transparency must remain permission-aware. Extreme truth does not mean universal access to client transactions.

Alfred Adler’s emphasis on belonging and contribution matters because legal-entity isolation can otherwise become a contest between headquarters and local teams. Hong Kong and Singapore owners should see that their controls contribute to group resilience. Central engineering should be treated as a service partner, not the owner of local legal interpretation.

Nonviolent Communication improves policy disputes. The record should state that the HK agent retrieved an ontology snippet derived from a Singapore dashboard, that the answer used an SG-specific liquidity definition, that Entity HK needs answers based on HK-approved semantics, and that the ontology owner is requested to isolate and retest the sources. This is precise without declaring malicious intent.

FBI negotiation practice contributes tactical empathy and calibrated information gathering. A regional executive may believe entity restrictions make the agent less useful. The architect can label the urgency for a consolidated view, summarize the legal owners’ concern, and identify the approved aggregate that would provide the decision without exposing transactions. The purpose is not to weaken the boundary. It is to discover the smallest data product that satisfies the real need.

Failure modes the institution must design out

The first failure mode is treating a shared metastore as shared authority. Infrastructure scope does not determine legal permission.

The second failure mode is using one regional service principal for all agents. Shared identity destroys isolation and auditability.

The third failure mode is relying on prompt instructions. Security must be enforced below the agent.

The fourth failure mode is using one overloaded jurisdiction field. Booking entity, processing entity, customer jurisdiction, and residency are different dimensions.

The fifth failure mode is assuming a row filter proves physical non-reading. Security and pruning are separate properties.

The sixth failure mode is tagging data without attaching an enforceable policy. Classification alone does not protect a value.

The seventh failure mode is assuming Ontology cannot cross-contaminate semantics. Permission-aware context still requires entity-specific authoritative definitions.

The eighth failure mode is assuming Clean Rooms automatically allow only aggregates or automatically add differential-privacy noise. Output controls must be engineered.

The ninth failure mode is allowing two writers for one governed dataset. Mutation authority must be explicit.

The tenth failure mode is cultural silence. An agent can cross a border in seconds if people hesitate to challenge it.

The shareholder standard

The success of legal-entity agent governance should not be measured by the number of agents deployed. It should be measured by useful decisions delivered without unauthorized disclosure, semantic contamination, or hidden concentration of authority.

The platform should report entitlement-test pass rates, denied cross-entity requests, sensitive-column mask coverage, unknown legal-entity rows, policy exceptions, service-principal review completion, ontology-source conflicts, clean-room output suppressions, differential-privacy budget use, agent refusal quality, and time to revoke access.

It should measure performance honestly. Report query latency with and without ABAC, bytes scanned, files pruned, policy evaluation time, and agent end-to-end latency. A secure system that cannot support the business will be bypassed. A fast system that crosses legal boundaries is not a business system.

It should measure architectural subtraction. Count duplicated views retired, manual grants removed, regional extracts eliminated, unmanaged agent identities closed, and direct cross-entity data copies replaced with published aggregates or clean-room computation.

The most important outcome is institutional trust. Entity HK should trust that its customer-level data cannot be retrieved by an SG agent. Entity SG should receive the same assurance. Regional management should receive the exact aggregate needed for capital and liquidity decisions. Regulators and auditors should be able to reconstruct identity, policy, source, model, tool, and output.

Unity Catalog provides the governance substrate. Agent Bricks provides the production agent framework. Unity Gateway governs agent and model services. Genie Ontology supplies business meaning under permission. Clean Rooms support bounded collaboration. AWS supplies the secure operating boundary. None of them independently solves legal-entity governance. Together, when configured with precision, they can turn shared infrastructure into controlled institutional leverage.

The bank should not seek one intelligent agent that knows everything. It should build a federation of agents that know exactly what they are authorized to know, can explain the scope of every answer, and refuse requests that cross their mandate. The regional institution gains more from trustworthy specialization than from artificial omniscience.

That is the raised bar: one group, several legal entities, shared technology, separate authority, governed collaboration, and no ambiguity about which boundary protected the customer when the agent made its decision.

References

Databricks. Create and manage row filter and column mask policies.

Databricks. Row filters and column masks.

Databricks. ABAC requirements, quotas, and limitations.

Databricks. Source:https://dev.to/martindd/databricks-agent-bricks-legal-entity-entitlements-on-aws-for-hong-kong-and-singapore-banking-24j2