AI Lakera Guard 정책 구성 레퍼런스
AI Lakera Guard 정책 구성 레퍼런스 (AI Lakera Guard Policy Configuration Reference)
이 문서는 Kong AI Gateway에서 AI Lakera Guard 정책을 구성할 때 사용하는 설정 항목들을 한눈에 확인할 수 있는 레퍼런스예요. 프록시 연결 정보, Lakera Guard 구독에 쓰이는 API 키, 프로젝트 ID, 오류 발생 시 처리 방식, 응답 차단 메시지 같은 각 속성의 타입과 기본값이 정리되어 있어요. Lakera Guard로 프롬프트와 응답을 검사해 유해 콘텐츠를 걸러내는 정책을 세부 조정할 때 참고하면 좋아요
출처: 문서
본문
{
"properties": {
"config": {
"type": "object",
"properties": {
"proxy_config": {
"type": "object",
"properties": {
"proxy_scheme": {
"type": "string",
"enum": [
"http"
],
"description": "The proxy scheme to use when connecting. Only `http` is supported.",
"default": "http"
},
"auth_username": {
"type": "string",
"description": "The username to authenticate with, if the forward proxy is protected by basic authentication.",
"x-referenceable": true
},
"auth_password": {
"type": "string",
"description": "The password to authenticate with, if the forward proxy is protected by basic authentication.",
"x-referenceable": true,
"x-encrypted": true
},
"no_proxy": {
"type": "string",
"description": "Comma-separated list of hosts that should not be proxied."
},
"http_proxy_host": {
"type": "string",
"description": "A string representing a host name, such as example.com."
},
"http_proxy_port": {
"type": "integer",
"maximum": 65535,
"minimum": 0,
"description": "An integer representing a port number between 0 and 65535, inclusive."
},
"https_proxy_host": {
"type": "string",
"description": "A string representing a host name, such as example.com."
},
"https_proxy_port": {
"type": "integer",
"maximum": 65535,
"minimum": 0,
"description": "An integer representing a port number between 0 and 65535, inclusive."
}
}
},
"api_key": {
"type": "string",
"description": "API key for the Lakera Guard subscription.",
"x-referenceable": true,
"x-encrypted": true
},
"project_id": {
"type": "string",
"description": "Project ID to apply filters from. If null, it will use the subscription's default project.",
"x-referenceable": true
},
"stop_on_error": {
"type": "boolean",
"description": "Stop processing if an error occurs.",
"default": true
},
"response_failure_message": {
"type": "string",
"description": "The message to return when a failure occurs on the response phase.",
"default": "Response was filtered by Lakera Guard"
},
"guarding_mode": {
"type": "string",
"enum": [
"BOTH",
"INPUT",
"OUTPUT"
],
"description": "The guardrail mode to use for the request.",
"default": "INPUT"
},
"text_source": {
"type": "string",
"enum": [
"concatenate_all_content",
"concatenate_user_content",
"last_message"
],
"description": "Select where to pick the 'text' for the Lakera Guard request (when text/generation is selected).",
"default": "concatenate_all_content"
},
"continue_on_detection": {
"type": "boolean",
"description": "If true, the guardrail will not block the request or response. Block data and details will still be visible via kong logs. You can expect this field to work coherently with `guarding_mode` parameter.",
"default": false
},
"rejection_mode": {
"type": "string",
"enum": [
"none",
"stealth",
"verbose"
],
"description": "Controls block response format and status code. 'none' returns 400 with plain text block reason, 'stealth' 403 without details and 'verbose' returns 403 with rich JSON details. In streaming mode, the final SSE chunk includes finish_reason='blocked_by_guard' and 'verbose' will include a 'guardrail_result' metadata entry under 'data.choices[0]' in OpenAI format.",
"default": "none"
},
"log_blocked_content": {
"type": "boolean",
"description": "Whether to log prompts and responses that are blocked by the guardrail.",
"default": false
},
"lakera_service_url": {
"type": "string",
"description": "The guard-operation URL of the Lakera Guard service. Defaults to the SaaS /v2/guard endpoint. It can be set to a locally hosted instance of Lakera Guard.",
"default": "https://api.lakera.ai/v2/guard",
"x-referenceable": true
},
"timeout": {
"type": "number",
"description": "Connection timeout with the guardrail service.",
"default": 10000
},
"request_failure_message": {
"type": "string",
"description": "The message to return when a failure occurs on the request phase.",
"default": "Request was filtered by Lakera Guard"
},
"response_buffer_size": {
"type": "number",
"description": "The amount of bytes receiving from upstream to be buffered before sending to the guardrail service. This only applies to the response content guard.",
"default": 100
},
"reveal_failure_categories": {
"type": "boolean",
"description": "Whether to reveal failure categories in the response to the caller.",
"default": false
},
"verify_ssl": {
"type": "boolean",
"description": "Whether to verify the SSL certificate of the guardrail service endpoint.",
"default": true
}
}
}
}
}
관련 리소스
더 알아보기 (Learn more)
- 커스텀 가드레일로 나만의 AI 보호 규칙을 구성하는 정책을 확인해요 — AI Custom Guardrail Policy
- Google Cloud Model Armor 기반 AI 보호 정책의 구성을 살펴봐요 — AI GCP Model Armor Policy
- Azure Content Safety를 활용한 콘텐츠 안전 정책 구성을 확인해요 — AI Azure Content Safety Policy
- AWS Guardrails로 AI 트래픽을 검사하는 정책 구성을 알아봐요 — AI AWS Guardrails Policy
- AI Gateway 감사 로그에서 Lakera Guard 로그를 확인하는 방법을 살펴봐요 — AI Gateway audit log reference