Snowflake — Block Mode

Overview

Deploy Akto Guardrails in Block Mode on Snowflake using Snowpark Container Services (SPCS).

In Block Mode, the Akto proxy intercepts traffic between your client and the Cortex Agent API. Each request and response is evaluated against your guardrail policies. Unsafe responses are blocked and replaced with a configurable fallback message.

Architecture

Setup

1

Create Image Repository

2

Push Image

Pull the Akto public image, tag it for your Snowflake registry, and push it.

Replace <repository_url> with the URL returned by SHOW IMAGE REPOSITORIES in the previous step.

3

Store Secrets

Store your Akto token and Snowflake PAT as Snowflake secrets. These are referenced securely in the service spec — never hardcode tokens directly.

4

Create Compute Pool

5

Configure Network Access

Create an egress network rule that allows the service to reach Akto Guardrails and your Snowflake account, then attach it to an external access integration.

6

Deploy Service (Block Mode)

The service runs in Block Mode by default — unsafe requests are blocked before they reach the Cortex Agent API.

circle-info

Optional: Enable response guardrails

Set ENABLE_RESPONSE_GUARDRAILS: "true" to also apply guardrails to the agent's response before it is returned to the client. When a response is blocked, the value set in SAFE_RESPONSE_TEXT is returned instead.

Leave this flag unset or set it to "false" if you only want request-side enforcement.

7

Verify the Service

Confirm the service is running and retrieve its public endpoint URL.

8

Generate a Programmatic Access Token (PAT)

The proxy authenticates to the Snowflake API using a PAT. Complete the steps below and then update the secret created in Step 3.

circle-exclamation
9

Send a Sample Request

Use the public endpoint URL from Step 7 to send a request through the proxy.

Block Mode Behavior

Input
Outcome
Returned to Client

Safe request / safe response

Allowed

Original response

Unsafe request or response

Blocked

SAFE_RESPONSE_TEXT value

Checklist

circle-info

Use this checklist to confirm the deployment is complete:

Complete Production Script

chevron-rightView complete production scripthashtag

Get Support

If you need assistance with the Snowflake Block Mode setup:

Our team is available 24/7 to help with setup, troubleshooting, and best practices.

Last updated