Firewall configurations¶
The configurations of the Chat security enforcement points, chat inbound and chat outbound. Every call needs a Configuration management (admin) key, see the
Configuration API. The body is a FirewallConfig.
The examples set the address and the key once:
export MATVIS_URL="https://<your-matvis-host>"
export MATVIS_API_KEY="<your-admin-api-key>"
export CONFIG_UUID="<configuration-uuid>"
List¶
GET /api/v1/config/firewall
Returns every firewall configuration under data. Narrow the list with the query parameters:
| Parameter | Description |
|---|---|
name |
Only the configuration with this name. |
type |
Only this enforcement point: inbound or outbound. |
Create¶
POST /api/v1/config/firewall
Creates a firewall configuration and returns it under data, with its uuid. Send the complete configuration;
fields you leave out take their defaults.
curl -X POST "$MATVIS_URL/api/v1/config/firewall" \
-H "Authorization: $MATVIS_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{
"name": "prod-inbound",
"type": "inbound",
"language_filter_active": false,
"language_filter_valids": [],
"language_filter_min_block_severity": 5,
"pii_filter_active": true,
"pii_filter_config": [
{
"classes": "EMAIL_ADDRESS",
"min_block_severity": 5
}
],
"prompt_injection_active": true,
"prompt_injection_min_block_severity": 5,
"prompt_injection_markup_filter": {
"xml": false,
"html": false,
"sql": false,
"json": false
},
"content_filter_active": false,
"content_filter_config": [],
"custom_regex": [],
"pii_anonymization": false,
"non_blocking": false
}
EOF
curl -X POST "$MATVIS_URL/api/v1/config/firewall" \
-H "Authorization: $MATVIS_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{
"name": "prod-outbound",
"type": "outbound",
"language_filter_active": false,
"language_filter_valids": [],
"language_filter_min_block_severity": 5,
"pii_filter_active": true,
"pii_filter_config": [
{
"classes": "EMAIL_ADDRESS",
"min_block_severity": 5
}
],
"prompt_injection_active": false,
"prompt_injection_min_block_severity": 5,
"prompt_injection_markup_filter": {
"xml": false,
"html": false,
"sql": false,
"json": false
},
"content_filter_active": false,
"content_filter_config": [],
"custom_regex": [],
"pii_anonymization": false,
"non_blocking": false
}
EOF
Get¶
GET /api/v1/config/firewall/{uuid}
Returns one firewall configuration under data. GET a configuration to see its full shape.
Replace¶
PUT /api/v1/config/firewall/{uuid}
Replaces the firewall configuration with the body you send, the same shape as on create. Fields you leave out take their defaults, so send the complete configuration: GET it, change it, PUT it back. The change takes effect on the next request.
Delete¶
DELETE /api/v1/config/firewall/{uuid}
Deletes the firewall configuration. A configuration a model configuration uses cannot be deleted.
curl -X DELETE "$MATVIS_URL/api/v1/config/firewall/$CONFIG_UUID" -H "Authorization: $MATVIS_API_KEY"
Responses¶
See the status codes every Configuration API call shares.