AI Azure Content Safety 플러그인 구성 레퍼런스
AI Azure Content Safety 플러그인 구성 레퍼런스 (AI Azure Content Safety Plugin Configuration Reference)
이 문서는 Kong의 AI Azure Content Safety 플러그인에서 설정할 수 있는 구성 옵션을 하나씩 정리한 레퍼런스예요. Azure 인증을 위한 관리 ID, 클라이언트 ID·시크릿·테넌트 ID부터 Content Safety 인스턴스 URL과 API 키, 차단 목록(blocklist), 카테고리별 거부 수준, 요청 검사 모드 같은 필드가 각각 어떤 역할을 하는지 설명해 줘요. API 키처럼 민감한 값은 암호화하거나 볼트에서 참조할 수 있다는 점도 함께 확인할 수 있어요
출처: 문서
본문
{
"properties": {
"config": {
"properties": {
"azure_api_version": {
"default": "2023-10-01",
"description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.",
"minLength": 1,
"type": "string"
},
"azure_client_id": {
"description": "If `azure_use_managed_identity` is true, set the client ID if required.",
"type": "string"
},
"azure_client_secret": {
"description": "If `azure_use_managed_identity` is true, set the client secret if required. \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true
},
"azure_tenant_id": {
"description": "If `azure_use_managed_identity` is true, set the tenant ID if required.",
"type": "string"
},
"azure_use_managed_identity": {
"default": false,
"description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity",
"type": "boolean"
},
"blocklist_names": {
"description": "Use these configured blocklists (in Azure Content Services) when inspecting content.",
"items": {
"type": "string"
},
"type": "array"
},
"categories": {
"description": "Array of categories, and their thresholds, to measure on.",
"items": {
"properties": {
"name": {
"type": "string"
},
"rejection_level": {
"type": "integer"
}
},
"required": [
"name",
"rejection_level"
],
"type": "object"
},
"type": "array"
},
"content_safety_key": {
"description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"content_safety_url": {
"description": "Full URL, inc protocol, of the Azure Content Safety instance. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "string",
"x-referenceable": true
},
"guarding_mode": {
"default": "INPUT",
"description": "The guard mode to use for the request",
"enum": [
"BOTH",
"INPUT",
"OUTPUT"
],
"type": "string"
},
"halt_on_blocklist_hit": {
"default": true,
"description": "Tells Azure to reject the request if any blocklist filter is hit.",
"type": "boolean"
},
"log_blocked_content": {
"default": false,
"description": "Whether to log prompts and responses that are blocked by the guardrail.",
"type": "boolean"
},
"output_type": {
"default": "FourSeverityLevels",
"description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories",
"enum": [
"EightSeverityLevels",
"FourSeverityLevels"
],
"type": "string"
},
"response_buffer_size": {
"default": 100,
"description": "The amount of bytes receiving from upstream to be buffered before sending to the guardrails service. This only applies to the response content guard.",
"type": "number"
},
"reveal_failure_reason": {
"default": true,
"description": "Set true to tell the caller why their request was rejected, if so.",
"type": "boolean"
},
"ssl_verify": {
"default": true,
"description": "Whether to verify the certificate presented by the Azure Content Safety service when using HTTPS.",
"type": "boolean"
},
"stop_on_error": {
"default": true,
"description": "Stop processing if an error occurs",
"type": "boolean"
},
"text_source": {
"default": "concatenate_all_content",
"description": "Select where to pick the 'text' for the Azure Content Services request.",
"enum": [
"concatenate_all_content",
"concatenate_user_content",
"last_message"
],
"type": "string"
}
},
"required": [
"content_safety_url"
],
"type": "object"
},
"expressions": {
"additionalProperties": true,
"type": "object"
},
"protocols": {
"default": [
"grpc",
"grpcs",
"http",
"https"
],
"description": "A set of strings representing HTTP protocols.",
"items": {
"enum": [
"grpc",
"grpcs",
"http",
"https"
],
"type": "string"
},
"type": "array"
},
"route": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
},
"service": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"config"
]
}
더 알아보기 (Learn more)
- 콘텐츠 안전 키 같은 민감한 필드가 어떻게 암호화되는지 궁금하다면 키링 문서를 참고해 보세요 — encrypted
- API 키나 인스턴스 URL을 볼트에 저장해 두고 참조하는 방법을 자세히 알아보세요 — referenceable