Use request tags in Unity Gateway service policies
Custom policies in Unity Gateway can now check request tags sent via headers to control model requests and MCP tool calls.
O que mudou
Use cases
Imagine you need to ensure that calls to an AI model or MCP tool include a valid project identifier before proceeding. With this feature, you can inspect caller-supplied tags directly within SQL-based service policies.
- Validate project or cost center tags before executing a model or tool.
- Block requests that lack required metadata tags.
- Enforce governance rules based on request context.
How to use
Use the Unity Gateway to create a SQL UDF that evaluates the event object and returns an access decision.
CREATE OR REPLACE FUNCTION my_catalog.my_schema.my_policy(
event VARIANT
)
RETURNS VARIANT
LANGUAGE SQL
RETURN CASE
WHEN event:context.request_tags.project::string IS NULL THEN
to_variant_object(named_struct('result', 'DENY', 'reason', 'Required project tag is missing.'))
ELSE
to_variant_object(named_struct('result', 'ALLOW', 'reason', 'Access permitted.'))
END;
What happens in this code:
- The UDF function receives the
eventargument of typeVARIANTcarrying the request context. - The path
event:context.request_tags.projectextracts the tag sent in theDatabricks-Ai-Gateway-Request-TagsHTTP header. - The conditional evaluates if the tag is present and returns a structured decision object using
to_variant_objectcontainingALLOWorDENY.
Limitations and requirements
- This feature is in Beta.
- Applies to Model Services, Model Provider Services, and MCP tool calls (
tools/call). - The combined decoded size of keys and values is limited to 10 KiB of UTF-8 data.
- Account admins must enable this feature from the account console Previews page.
- unity catalog
- unity gateway
- governance
- ai security
- access control
Use request tags in Unity Gateway service policies (Beta)
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- DatabricksGA
Repositórios de pacotes em nível de workspace para Databricks Apps
Administradores de workspace podem configurar repositórios padrão de pacotes Python e npm para Databricks Apps.
databricks apps · workspace settings - DatabricksGA
Redimensione partições de stateful streaming sem perder o checkpoint no Databricks
Agora é possível alterar o número de partições de shuffle em queries Structured Streaming e pipelines Lakeflow sem descartar o estado do checkpoint.
structured streaming · lakeflow - DatabricksAtualização
Google Gemini 4 Argon disponível no Unity Gateway do Databricks
O modelo multimodal Google Gemini 4 Argon já pode ser acessado via Foundation Model APIs e Unity Gateway.
unity catalog · foundation model apis