Skip to main content

External Guardrail Validation

This guide walks through building, validating, and launching a partner guardrail that customers enforce through Unity Catalog external service policies. Customers attach the partner endpoint to Model Services, Model Provider Services, or MCP Services in Unity Gateway, and Databricks calls the configured partner endpoint on each interaction to enforce an ALLOW, DENY, or (on an MCP tool call) ASK verdict.

note

External Guardrail Validation is for Connected ISV partners that offer AI security or data-loss-prevention guardrails. It is not a Marketplace listing. For the broader Unity Gateway partner patterns, see Partner guardrails.

Beta

External service policies are in Beta. Workspace admins enable the Unity Gateway Service Policies preview. See Manage workspace-level previews and Service policies for AI securables.

Prerequisites​

Before starting External Guardrail Validation:

  • You must be a Databricks partner. If you're not yet a partner, start with Step 1.
  • Have a guardrail endpoint that will implement the external service policy API
  • Have OAuth machine-to-machine (M2M) credentials for that endpoint (client ID, client secret, and token endpoint)
  • Have access to a Databricks workspace where you can enable the Unity Gateway Service Policies preview and attach policies
  • Publish customer-facing setup documentation before the Integration Review (connection fields, policy_config values, and data-handling details)

Overview: phases to launch​

PhaseDescription
Register as ISV PartnerApply through the Partner Portal if you are not already a Databricks partner
Build EndpointImplement the Databricks external policy API on your guardrail endpoint
Test EndpointValidate the API contract directly with sample requests
Test in WorkspaceCreate a Unity Catalog HTTP connection, attach an External policy, and verify end-to-end in AI Playground
Integration ReviewComplete a live review with Databricks Partner Engineering, then agree on a launch plan
Launch and AmplifyKeep customer docs current and promote the integration

Step 1: Register as a Databricks ISV partner​

If you are not already a Databricks partner, apply through the Databricks Partner Portal. The portal walks you through the application details.

For the broader Connected ISV journey (apply, develop, live validation, validated partner), see Apply to become a partner.

Step 2: Build the endpoint to the API contract​

Your endpoint must implement the Databricks External service policy API reference. Follow the Databricks documentation for the requirements — this page does not repeat the contract.

  1. Endpoint requirements - Endpoint requirements
  2. Request contract - The event object | Event types | API types | The config object | Request examples
  3. Response contract - Response | Hold a tool call for approval
  4. Fail-closed, call timing, and data handling - How Databricks handles each response | When Databricks calls the endpoint | Data handling

If your endpoint supports more than one behavior, document the policy_config values customers should enter.

Step 3: Test the endpoint directly​

Before attaching a policy in a workspace, send sample requests to your endpoint and confirm it returns HTTP 200 with ALLOW, DENY, or ASK in under 5 seconds.

curl -X POST "https://api.example.com/ai-security/v1" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"event": {"type": "tool_call", "target": "main.default.github_mcp", "data": {"name": "create_issue", "arguments": {"repo": "acme/website"}}}, "config": {"policy_config": "{\"profile\": \"strict\"}", "phases": "pre_call"}}'

Expected outcomes:

  • ALLOW for clean content
  • DENY with a clear reason for content your guardrail should catch
  • ASK on a tool_call if you support approval holds
  • Response in under 5 seconds

Use the four request examples (tool_call, tool_result, model_call, model_result) to cover both MCP and model phases.

Documentation: Test your endpoint | Request examples

Step 4: Test end to end in a workspace​

Validate the full customer path in a Databricks workspace before the Integration Review. Follow the customer setup guide and use the steps below.

  1. Enable the preview - How to manage previews
  2. Confirm permissions - Before you begin
  3. Create a Unity Catalog HTTP connection - Create a connection to your vendor
  4. Attach an External policy - Attach the external service policy
  5. Start in Log mode - Unified trace table
  6. Switch to Enforce and wait - Test the policy (propagation typically takes 60 to 90 seconds)
  7. Test in AI Playground - Policy decisions
  8. Verify fail-closed behavior - Fail-closed behavior

When attaching the policy, set phase, rank, optional policy_config, and mode. Rank interacts with other policies on the service. Start in Log mode and review policy_evaluated events before switching to Enforce. On a block in Enforce mode, confirm the caller sees your reason in the databricks_service_policy object.

Documentation: Enforce a partner guardrail with an external service policy | Connect to external HTTP services | Order of evaluation

Step 5: Integration Review​

The Integration Review is a live session with Databricks Partner Engineer to validate your external guardrail integration.

What happens during the review​

  1. Demonstrate the configuration process in the Databricks workspace — create the Unity Catalog HTTP connection, attach the External policy, and set phase, rank, policy configuration, and mode (Log / Enforce).
  2. Run a simple test in AI Playground — show DENY (with your reason), ALLOW, and ASK on an MCP tool call if you support approval holds.
  3. Review your publicly available documentation — customer setup guide, accepted policy_config values, and data-handling details.

After validation​

If the review succeeds, your integration is marked as validated. Work with Databricks Partner Engineering on the launch plan and any remaining follow-ups from the review. This path does not include Marketplace listing steps.

Information to prepare​

ItemDescription
Supported services and phasesWhich of Model Service, Model Provider Service, and MCP Service you support, and whether you evaluate input, output, or both
policy_config keys and profilesValues customers should enter (for example {"profile": "strict"})
Detection categoriesRisks your guardrail covers (for example PII, prompt injection, unsafe content)
Latency and availability SLAEndpoint response-time and availability commitments (critical path in Enforce mode)
Data handlingWhat you store, retention, and processing locations
Public customer docs URLLink to your published setup guide reviewed during the session
Joint value propositionHow joint customers use your guardrail with Databricks, including key use cases

Documentation: Data handling

What's next: Launch and amplify​

Once the integration is validated and the launch plan is agreed:

  • Keep customer-facing documentation current — connection fields, policy_config values, data handling, and egress guidance
  • Recommend network egress review — customers should review destinations before attaching a policy
  • Share the integration on websites, blogs, and social channels

Documentation: Review network egress before you attach a policy

Troubleshooting​

Common partner-facing issues:

SymptomLikely cause
Every call is deniedEndpoint unreachable, returning errors, or timing out (fail-closed)
Reason says the result is unrecognizedVerdict was not ALLOW, DENY, or ASK
Caller sees the default reasonYour endpoint did not return a reason

Documentation: Troubleshooting | Limitations

Resources​