The portal is the recommended way to run the Protector. Everything below is for a file-only deployment, or for the details behind the portal screens.
The production image ships with compiled guardrail modules and the embedded NLP model, and generates a self-signed certificate on first start, so it runs with nothing mounted.
The stable tag points at the current release, so docker pull plus a restart applies new versions, including guardrail improvements, without a compose-file change. Pinning a version controls when upgrades occur. Minimal command, mounting only protector.conf:
docker run --rm \
-p 80:80 \
-p 443:443 \
-p 9001:9001 \
-p 9002:9002 \
-p 9003:9003 \
-v "$(pwd)/protector.conf:/etc/s60-protector/protector.conf:ro" \
--name s60-ai-protector \
secure60/s60-ai-protector:stable
A file-only deployment needs a configuration file and a run command. The configuration below runs the Protector in front of a model with PII masking on, in monitor mode: it reports what it would change and changes nothing.
Save as protector.conf, replacing url with your model endpoint:
{
"backends": {
"my-llm": {
"type": "proxy",
"url": "https://api.openai.com",
"profile": "starter"
}
},
"routing": { "uri_prefix": "/proxy", "header": "X-S60-Backend" },
"logging": { "enabled": true },
"policy": {
"profiles": {
"starter": {
"type": "llm",
"enforcement_mode": "monitor",
"input": {
"filters": {
"pii": {
"mode": "mask",
"entities": ["EMAIL_ADDRESS", "PHONE_NUMBER", "CREDIT_CARD"],
"score_threshold": 0.6
}
}
},
"output": {
"filters": {
"pii": {
"mode": "mask",
"entities": ["EMAIL_ADDRESS", "PHONE_NUMBER", "CREDIT_CARD"],
"score_threshold": 0.6
}
}
}
}
}
}
}
Start the container:
docker run -d --name s60-ai-protector \
-p 443:443 \
-v "$(pwd)/protector.conf:/etc/s60-protector/protector.conf:ro" \
secure60/s60-ai-protector:stable
Send a request. The request body is unchanged; only the host changes, and the backend name is in the path:
curl -sk https://localhost/proxy/my-llm/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4","messages":[{"role":"user","content":"escalate to a@bank.com"}]}' -D-
The response headers carry the policy decision:
x-s60-decision: modified
x-s60-enforcement-mode: monitor
x-s60-violation-count: 2
modified in monitor mode means protect mode would have masked the request; the
traffic was forwarded unchanged. Once the decisions in AI → AI Activity
are correct, set enforcement_mode to "protect" and restart. The same request then
reaches the model as escalate to <EMAIL_ADDRESS>.
services:
s60-ai-protector:
image: secure60/s60-ai-protector:stable
ports:
- "80:80"
- "443:443"
- "9001:9001"
- "9002:9002"
- "9003:9003"
volumes:
- ./protector.conf:/etc/s60-protector/protector.conf:ro
Mount the certificate and key, either at the default path or at a path given in
S60_TLS_CERT and S60_TLS_KEY:
docker run -d --name s60-ai-protector -p 443:443 -p 80:80 \
--env-file ./protector.env \
-v "$(pwd)/tls:/etc/s60-protector/tls:ro" \
secure60/s60-ai-protector:stable
/etc/s60-protector/tls/tls.crt and tls.key are picked up automatically; any other
path goes in S60_TLS_CERT and S60_TLS_KEY. The certificate must cover the hostname
your applications use.
protector.conf referenceThe protector.conf file is a JSON configuration that defines backends, routing rules, logging endpoints, and policy profiles. It must be mounted at /etc/s60-protector/protector.conf when running the container.
Backends define the upstream services or synthetic responses that requests are routed to. Each backend has a type and a profile that determines which guardrail policies apply.
proxy (default)
url field specifying the backend endpoint.{
"openai": {
"type": "proxy",
"url": "https://api.openai.com",
"profile": "default-profile"
}
}
blackhole
url field required.{
"internal-blackhole-logging-only": {
"type": "blackhole",
"profile": "logging-only-profile"
}
}
synthetic-response
response field containing the JSON response to return.{{last_user_message}} and {{prompt}} are replaced with the extracted user prompt.url field required.{
"test-llm": {
"type": "synthetic-response",
"profile": "default-profile",
"response": {
"backend": "test-llm",
"model": "test-model",
"echo": "Backend response: Last user said: {{last_user_message}}",
"note": "Response from synthetic test backend via Secure60 Protector."
}
}
}
The routing section defines how requests are mapped to backends.
| Field | Type | Description |
|---|---|---|
ports |
Object | Map of port numbers (as strings) to backend names. Example: {"9001": "openai", "9002": "anthropic"} |
uri_prefix |
String | URI prefix for URI-based routing (default: "/proxy"). Requests to /proxy/<backend>/... are routed to the named backend. |
header |
String | HTTP header name for explicit routing override (default: "X-S60-Backend"). If present, its value overrides port/URI routing. |
Routing Precedence:
X-S60-Backend header)server_port)/proxy/<backend>/...)The logging section configures audit trail destinations and batching behaviour. When enabled, events are batched and sent directly to the Secure60 ingest endpoint in JSONEachRow (NDJSON) format; no separate collector service is required.
Endpoint URL Construction:
project_id is provided: {secure60_endpoint}/ingest/1.0/http/project/{project_id}project_id is not provided: {secure60_endpoint} (base URL only)Example: With secure60_endpoint: "https://ingest.secure60.io" and project_id: "432", events are sent to:
https://ingest.secure60.io/ingest/1.0/http/project/432
| Field | Type | Description |
|---|---|---|
enabled |
Boolean | Enable/disable sending events to Secure60 endpoint. Default: false. When false, events are still logged to stdout but not sent to the endpoint. |
secure60_endpoint |
String | (Optional) Base HTTPS endpoint URL. Default: "https://ingest.secure60.io". |
project_id |
String | (Optional) Project ID to append to the endpoint URL. If provided, the full URL becomes {secure60_endpoint}/ingest/1.0/http/project/{project_id}. Example: "432" or "515". Required for most Secure60 deployments. |
ingest_token |
String | (Optional) Bearer token for authenticating with the Secure60 ingest endpoint. If provided, included as Authorization: Bearer <token> header. Required for authenticated endpoints. |
source_name |
String | (Optional) Source identifier for audit events. Defaults to "s60-protector". |
batch |
Object | (Optional) Batching configuration for high-throughput scenarios. See batch configuration below. |
Events are batched to reduce API calls. Batches are flushed when any limit is reached.
| Field | Type | Default | Description |
|---|---|---|---|
batch.max_events |
Number | 100 |
Maximum number of events in a batch before flushing. |
batch.max_bytes |
Number | 1048576 (1MB) |
Maximum total size (in bytes) of batched events before flushing. |
batch.max_seconds |
Number | 5 |
Maximum time (in seconds) to wait before flushing a batch. For a single event, this is the maximum wait time before it is sent. |
Batching behaviour:
max_eventsmax_bytesmax_seconds (checked periodically)Content-Type: application/x-ndjsoningest_token is configured, batches include Authorization: Bearer <token> headerExample:
{
"logging": {
"enabled": true,
"secure60_endpoint": "https://ingest.secure60.io",
"project_id": "432",
"ingest_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"source_name": "s60-protector",
"batch": {
"max_events": 100,
"max_bytes": 1048576,
"max_seconds": 5
}
}
}
Note: When project_id is set (e.g., "432"), the full endpoint URL becomes https://ingest.secure60.io/ingest/1.0/http/project/432. If project_id is not set, events are sent to the base secure60_endpoint URL.
Profiles define guardrail policies that are applied to requests and responses. Each backend references a profile by name.
{
"policy": {
"profiles": {
"profile-name": {
"type": "llm",
"enforcement_mode": "protect",
"input": { ... },
"output": { ... },
"logging": { ... }
}
}
}
}
| Field | Type | Description |
|---|---|---|
type |
String | Profile type, typically "llm". Used to determine output extraction logic. |
enforcement_mode |
String | "protect" to block violating requests/responses, "monitor" to log violations but allow traffic. |
input |
Object | Input guardrail configuration (field extraction and filters). |
output |
Object | Output guardrail configuration (field extraction and filters). |
logging |
Object | (Optional) Custom field mapping for audit logging. |
audit |
Object | (Optional) Controls what the audit trail records for calls through this profile. See Audit capture below. |
Both input and output sections support field_extraction to specify where to extract text from the request/response body using dot notation.
| Field | Type | Description |
|---|---|---|
field_extraction.field_path |
String | Dot notation path to extract text. Examples: "prompt", "messages.0.content", "choices.0.message.content". Supports nested objects and array indices (0-based). |
If field_path is not configured or does not match, the built-in extraction applies:
prompt field, or last user message in messages array.echo field (for type: "llm").Example:
{
"input": {
"field_extraction": {
"field_path": "messages.0.content"
},
"filters": { ... }
},
"output": {
"field_extraction": {
"field_path": "choices.0.message.content"
},
"filters": { ... }
}
}
The filters section within input or output defines guardrail rules.
PII Filter
| Field | Type | Description |
|---|---|---|
pii.mode |
String | "block" to refuse the call, "mask" to replace the detected values in place, "monitor" to record without changing anything, "off" to disable. |
pii.entities |
Array | Entity types to detect. Common values: "PERSON", "EMAIL_ADDRESS", "PHONE_NUMBER", "CREDIT_CARD", "IBAN_CODE", "US_SSN", "CRYPTO", "IP_ADDRESS". Only the entities you list are detected. |
pii.score_threshold |
Number | Confidence threshold (0.0-1.0) for PII detection. Only detections above this threshold trigger violations. Default: 0.2. |
Secrets Filter
| Field | Type | Description |
|---|---|---|
secrets.mode |
String | "block" to block requests/responses containing secret keywords, "monitor" to log only, "off" to disable. |
Keywords detected: secret_token, password (case-insensitive). |
Jailbreak Filter (input only)
| Field | Type | Description |
|---|---|---|
jailbreak.mode |
String | "block" to block jailbreak attempts, "monitor" to log only, "off" to disable. |
Detects phrases: "ignore previous instructions", "ignore all previous instructions", "bypass your safety", "bypass the safety", "jailbreak mode", "pretend you are not an ai". |
Example:
{
"input": {
"filters": {
"pii": {
"mode": "block",
"entities": ["PERSON", "EMAIL_ADDRESS", "PHONE_NUMBER"],
"score_threshold": 0.6
},
"secrets": {
"mode": "block"
},
"jailbreak": {
"mode": "block"
}
}
},
"output": {
"filters": {
"pii": {
"mode": "mask",
"entities": ["EMAIL_ADDRESS"],
"score_threshold": 0.6
},
"secrets": {
"mode": "off"
}
}
}
}
The optional logging.field_mapping section maps fields from the request/response to Secure60 CIM fields in audit events.
| Field | Type | Description |
|---|---|---|
logging.field_mapping |
Object | Map of target CIM field names to source paths. Source paths can be: dot notation paths to request body fields, response header names (e.g., "X-S60-Decision"), or special values like "prompt", "decision", "profile". |
Example:
{
"logging": {
"field_mapping": {
"message_text": "messages.0.content",
"event_guardrail_decision": "X-S60-Decision",
"custom_field": "request.metadata.user_id"
}
}
}
The optional audit block matches the portal’s Audit panel and controls what a
profile’s audit rows record.
| Field | Type | Description |
|---|---|---|
audit.capture_mode |
String | "full" (default) records the prompt and response in full, truncated to max_content_chars. "masked" records a PII-anonymised version instead. "summary" records the violation type, rail and rule only — never the message content. See Capture mode above. |
audit.capture_tokens |
Boolean | Default true. Set false to drop tokens_in, tokens_out and tokens_cached from this profile’s evaluation rows. model_used and tool_names are unaffected. |
audit.max_content_chars |
Number | Truncation length for captured prompt/response text. Default 4000. |
Example:
{
"audit": {
"capture_mode": "masked",
"capture_tokens": false,
"max_content_chars": 4000
}
}
| Profile | Enforcement | Highlights |
|---|---|---|
default-profile |
monitor |
Blocks PERSON, EMAIL_ADDRESS, PHONE_NUMBER, blocks secrets/jailbreaks, output filters disabled. |
no-email-profile |
protect |
Blocks inbound emails/secrets, monitors jailbreak heuristics, masks outbound EMAIL_ADDRESS. |
logging-only-profile |
monitor |
No filters enabled, used with blackhole backends for audit-only scenarios. |