Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
description: |
Configure the AI MCP Sanitizer Policy to reject a tool call, or replace a tool result with an error, when the PII service detects Social Security numbers or email addresses, instead of redacting them.
title: Block tool calls that contain PII

weight: 870

scopes:
- ai-mcp-server
- global

requirements:
- An existing [AI MCP Server](/ai-gateway/entities/ai-mcp-server/).
- An [AI PII Anonymizer service image](/ai-gateway/policies/ai-mcp-sanitizer/#ai-pii-anonymizer-service), pulled and running.

variables:
host:
description: The sanitizer service's host
value: $SANITIZER_SERVICE_HOST

name: block-tool-calls-that-contain-pii
display_name: Block tool calls that contain PII
type: ai-mcp-sanitizer

config:
anonymize:
- ssn
- email
sanitize_targets:
- tool_arguments
- tool_results
port: 8080

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use a variable for the host too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to using ${host} in that example,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I meant port 🤦

host: ${host}
recover_redacted: false
block_if_detected: true
rejection_mode: none
stop_on_error: true

tools:
- konnect-api
- terraform
- kongctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
description: |
Configure the AI MCP Sanitizer Policy to redact a custom identifier, such as an employee ID in the format `EMP-123456`, in tool call arguments.

title: Redact employee IDs with a custom pattern

weight: 860

scopes:
- ai-mcp-server
- global

requirements:
- An existing [AI MCP Server](/ai-gateway/entities/ai-mcp-server/).
- An [AI PII Anonymizer service image](/ai-gateway/policies/ai-mcp-sanitizer/#ai-pii-anonymizer-service), pulled and running.

variables:
host:
description: The sanitizer service's host
value: $SANITIZER_SERVICE_HOST

name: custom-employee-id-pattern
display_name: Redact employee IDs with a custom pattern
type: ai-mcp-sanitizer

config:
anonymize:
- custom
custom_patterns:
- name: employee_id
regex: "EMP-[0-9]{6}"
score: 0.9
sanitize_targets:
- tool_arguments
port: 8080
host: ${host}
recover_redacted: false
stop_on_error: true

tools:
- konnect-api
- terraform
- kongctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
description: |
Configure the AI MCP Sanitizer Policy to redact PII in tool call arguments and keep the sanitized items out of your logs. Use this when the logs themselves must not hold sensitive data.

title: Hide sanitized items from logs

weight: 840

scopes:
- ai-mcp-server
- global

requirements:
- An existing [AI MCP Server](/ai-gateway/entities/ai-mcp-server/).
- An [AI PII Anonymizer service image](/ai-gateway/policies/ai-mcp-sanitizer/#ai-pii-anonymizer-service), pulled and running.

variables:
host:
description: The sanitizer service's host
value: $SANITIZER_SERVICE_HOST

name: hide-sanitized-items-from-logs
display_name: Hide sanitized items from logs
type: ai-mcp-sanitizer

config:
anonymize:
- ssn
- email
- phone
sanitize_targets:
- tool_arguments
port: 8080
host: ${host}
recover_redacted: false
skip_logging_sanitized_items: true
stop_on_error: true

tools:
- konnect-api
- terraform
- kongctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
description: |
Configure the AI MCP Sanitizer Policy to send placeholders to the tool server and restore the original values when the tool returns them in its result. Recovery applies only to values redacted in tool call arguments.

title: Restore redacted values in tool results

weight: 850

scopes:
- ai-mcp-server
- global

requirements:
- An existing [AI MCP Server](/ai-gateway/entities/ai-mcp-server/).
- An [AI PII Anonymizer service image](/ai-gateway/policies/ai-mcp-sanitizer/#ai-pii-anonymizer-service), pulled and running.

variables:
host:
description: The sanitizer service's host
value: $SANITIZER_SERVICE_HOST

name: recover-redacted-values
display_name: Restore redacted values in tool results
type: ai-mcp-sanitizer

config:
anonymize:
- ssn
- email
sanitize_targets:
- tool_arguments
port: 8080
host: ${host}
recover_redacted: true
stop_on_error: true

tools:
- konnect-api
- terraform
- kongctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
description: |
Configure the AI MCP Sanitizer Policy to redact PII in both the arguments sent to a tool and the result the tool returns. You must set `recover_redacted` to `false` when you target tool results.

title: Sanitize tool call arguments and results

weight: 880

scopes:
- ai-mcp-server
- global

requirements:
- An existing [AI MCP Server](/ai-gateway/entities/ai-mcp-server/).
- An [AI PII Anonymizer service image](/ai-gateway/policies/ai-mcp-sanitizer/#ai-pii-anonymizer-service), pulled and running.

variables:
host:
description: The sanitizer service's host
value: $SANITIZER_SERVICE_HOST

name: sanitize-arguments-and-results
display_name: Sanitize tool call arguments and results
type: ai-mcp-sanitizer

config:
anonymize:
- ssn
- email
- phone
sanitize_targets:
- tool_arguments
- tool_results
port: 8080
host: ${host}
recover_redacted: false
stop_on_error: true

tools:
- konnect-api
- terraform
- kongctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
description: |
Configure the AI MCP Sanitizer Policy to redact Social Security numbers, email addresses, and phone numbers in the arguments an agent sends to a tool. The tool server receives placeholders instead of the original values.

title: Sanitize tool call arguments

weight: 900

scopes:
- ai-mcp-server
- global

requirements:
- An existing [AI MCP Server](/ai-gateway/entities/ai-mcp-server/).
- An [AI PII Anonymizer service image](/ai-gateway/policies/ai-mcp-sanitizer/#ai-pii-anonymizer-service), pulled and running.

variables:
host:
description: The sanitizer service's host
value: $SANITIZER_SERVICE_HOST

name: sanitize-tool-arguments
display_name: Sanitize tool call arguments
type: ai-mcp-sanitizer

config:
anonymize:
- ssn
- email
- phone
sanitize_targets:
- tool_arguments
port: 8080
host: ${host}
recover_redacted: false
stop_on_error: true

tools:
- konnect-api
- terraform
- kongctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
description: |
Configure the AI MCP Sanitizer Policy to redact PII in the results that a tool returns, so the agent and the LLM context never receive the original values. The Policy forwards the arguments to the tool server unchanged.

title: Sanitize tool call results

weight: 890

scopes:
- ai-mcp-server
- global

requirements:
- An existing [AI MCP Server](/ai-gateway/entities/ai-mcp-server/).
- An [AI PII Anonymizer service image](/ai-gateway/policies/ai-mcp-sanitizer/#ai-pii-anonymizer-service), pulled and running.

variables:
host:
description: The sanitizer service's host
value: $SANITIZER_SERVICE_HOST

name: sanitize-tool-results
display_name: Sanitize tool call results
type: ai-mcp-sanitizer

config:
anonymize:
- ssn
- email
- phone
sanitize_targets:
- tool_results
port: 8080
host: ${host}
recover_redacted: false
stop_on_error: true

tools:
- konnect-api
- terraform
- kongctl
Loading
Loading