Skip to main content

AI guardrails and ABAC

Beta

This feature is in Beta. Workspace admins can control access to this feature from the Previews page by opting into the Unity Gateway Service Policies preview. See Manage workspace-level previews.

Attribute-based access control (ABAC) also provides service policies, which act as AI guardrails. A service policy checks each request to an AI service registered in Unity Catalog, and each response, and allows it, denies it, or holds it for approval. AI guardrails apply to model services, model provider services, and MCP services, and you set them up in Unity Gateway. This page explains how AI guardrails relate to the other ABAC policies and to Unity Catalog privileges. To set up a guardrail, see Guardrails for AI services.

How AI guardrails relate to other ABAC policies​

ABAC policies answer different questions, as the following table shows:

Policies

What they decide

When they apply

Where they apply

GRANT policies

Which privileges a principal gets on securable objects whose governed tags match, such as EXECUTE to call a service.

When Unity Catalog checks access.

Supported securable types, including model services, model provider services, and MCP services.

DENY policies (Beta)

Who can't manage permissions on a securable object. They deny only MANAGE ACCESS CONTROL, so they don't stop a principal from calling a service.

When Unity Catalog checks access.

Supported securable types, including model services, model provider services, and MCP services.

Row filter and column mask policies

Which rows and column values a principal sees in a table.

When a query reads the table.

Tables and views.

Service policies (AI guardrails)

Whether a request to an AI service, or its response, can proceed, based on its content and on who is calling.

On each call, before Databricks invokes the service (input) and after the service responds (output).

Model services, model provider services, and MCP services.

Policies

What they decide

When they apply

Where they apply

GRANT policies

Which privileges a principal gets on securable objects whose governed tags match, such as EXECUTE to call a service.

When Unity Catalog checks access.

Supported securable types, including model services, model provider services, and MCP services.

DENY policies (Beta)

Who can't manage permissions on a securable object. They deny only MANAGE ACCESS CONTROL, so they don't stop a principal from calling a service.

When Unity Catalog checks access.

Supported securable types, including model services, model provider services, and MCP services.

Row filter and column mask policies

Which rows and column values a principal sees in a table.

When a query reads the table.

Tables and views.

Service policies (AI guardrails)

Whether a request to an AI service, or its response, can proceed, based on its content and on who is calling.

On each call, before Databricks invokes the service (input) and after the service responds (output).

Model services, model provider services, and MCP services.

GRANT policies can grant the privilege to call a service. DENY policies only restrict who can manage a service's permissions. See What does it mean to deny MANAGE ACCESS CONTROL?. Like a row filter or column mask policy, a custom service policy can reference a Unity Catalog function that contains the governance logic.

How service policies complement Unity Catalog grants​

Unity Catalog privileges and service policies address different governance questions and operate at different enforcement points.

Aspect

Unity Catalog privileges

Service policies

Question answered

Can this principal call this service?

How must this interaction proceed?

Inputs

Principal identity and granted privileges

Request content, response content, request tags, tool annotations, and actor context

Enforcement point

Before the request reaches the service

Before the service is invoked (input phase, ON CALL) and after the service responds (output phase, ON RESULT)

Granularity

Per principal, per securable

Per request, based on content and context

Aspect

Unity Catalog privileges

Service policies

Question answered

Can this principal call this service?

How must this interaction proceed?

Inputs

Principal identity and granted privileges

Request content, response content, request tags, tool annotations, and actor context

Enforcement point

Before the request reaches the service

Before the service is invoked (input phase, ON CALL) and after the service responds (output phase, ON RESULT)

Granularity

Per principal, per securable

Per request, based on content and context

Service policies don't replace Unity Catalog grants. A principal must first have the appropriate Unity Catalog privileges to call a service. Service policies then evaluate the content of each interaction to enforce additional governance rules.

Govern AI services at scale​

To control who can call AI services across a schema, use ABAC GRANT policies. A GRANT policy grants a privilege, such as EXECUTE, on every model, model service, model provider service, or MCP service whose governed tags match its condition, so a service is covered as soon as it's tagged. See Govern models and MCPs with GRANT policies.

You attach a service policy to one service at a time, through the Unity Gateway UI, and it applies to all account users on that service. Attaching service policies at the catalog or schema level, with ABAC conditions, or to specific principals isn't available. See Limitations.

Set up AI guardrails in Unity Gateway​

The guides, tutorials, and references for AI guardrails are in the Unity Gateway documentation: