Configuration
This plugin is compatible with DB-less mode.
Compatible protocols
The AI Azure Content Safety plugin is compatible with the following protocols:
grpc
, grpcs
, http
, https
Parameters
Here's a list of all the parameters which can be used in this plugin's configuration:
-
string required
The name of the plugin, in this case
ai-azure-content-safety
.- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
name
. - If using the KongPlugin object in Kubernetes, the field is
plugin
.
- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
-
string
An optional custom name to identify an instance of the plugin, for example
ai-azure-content-safety_my-service
.The instance name shows up in Kong Manager and in Konnect, so it's useful when running the same plugin in multiple contexts, for example, on multiple services. You can also use it to access a specific plugin instance via the Kong Admin API.
An instance name must be unique within the following context:
- Within a workspace for Kong Gateway Enterprise
- Within a control plane or control plane group for Konnect
- Globally for Kong Gateway (OSS)
-
string
The name or ID of the service the plugin targets. Set one of these parameters if adding the plugin to a service through the top-level
/plugins
endpoint. Not required if using/services/{serviceName|Id}/plugins
. -
string
The name or ID of the route the plugin targets. Set one of these parameters if adding the plugin to a route through the top-level
/plugins
endpoint. Not required if using/routes/{routeName|Id}/plugins
. -
boolean default:
true
Whether this plugin will be applied.
-
record required
-
string required referenceable
Full URL, inc protocol, of the Azure Content Safety instance.
-
string required default:
2023-10-01
len_min:1
Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.
-
boolean default:
false
If checked, uses (if set)
azure_client_id
,azure_client_secret
, and/orazure_tenant_id
for Azure authentication, via Managed or User-assigned identity
-
string
If
azure_use_managed_identity
is true, set the client ID if required.
-
string
If
azure_use_managed_identity
is true, set the client secret if required.
-
string
If
azure_use_managed_identity
is true, set the tenant ID if required.
-
string referenceable encrypted
If
azure_use_managed_identity
is true, set the API key to call Content Safety.
-
string default:
concatenate_all_content
Must be one of:concatenate_all_content
,concatenate_user_content
Select where to pick the ‘text’ for the Azure Content Services request.
-
array of type
record
-
boolean default:
true
Set true to tell the caller why their request was rejected, if so.
-
string default:
FourSeverityLevels
Must be one of:FourSeverityLevels
,EightSeverityLevels
See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories
-
array of type
string
Use these configured blocklists (in Azure Content Services) when inspecting content.
-
boolean default:
true
Tells Azure to reject the request if any blocklist filter is hit.
-