AI PII Sanitizer 정책 구성 참조
AI PII Sanitizer 정책 구성 참조 (AI PII Sanitizer Policy Configuration Reference)
이 문서는 Kong의 AI PII Sanitizer 정책에서 설정할 수 있는 구성 옵션들을 한눈에 정리한 참조 자료예요. 로그에 민감 정보 기록 여부, PII 감지 시 요청 차단, 거부 응답 형식(rejection_mode), 익명화할 데이터 유형(anonymize), 커스텀 패턴 같은 필드별 타입과 기본값을 확인할 수 있어요. 정책을 처음 설정하거나 세부 동작을 조정할 때 바로 참고하기 좋은 문서예요
출처: 문서
본문
{
"properties": {
"config": {
"type": "object",
"properties": {
"skip_logging_sanitized_items": {
"type": "boolean",
"description": "Whether to log sanitized items in the Kong log policies. Turn it on if you want to hide sensitive data from logs.",
"default": false
},
"port": {
"type": "number",
"description": "The port of the sanitizer",
"default": 8080
},
"timeout": {
"type": "number",
"description": "Connection timeout with the sanitizer service.",
"default": 10000
},
"stop_on_error": {
"type": "boolean",
"description": "Stop processing if an error occurs.",
"default": true
},
"block_if_detected": {
"type": "boolean",
"description": "Whether to block requests containing PII data",
"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"
},
"anonymize": {
"type": "array",
"items": {
"type": "string",
"enum": [
"all",
"all_and_credentials",
"bank",
"credentials",
"creditcard",
"crypto",
"custom",
"date",
"domain",
"driverlicense",
"email",
"general",
"ip",
"medical",
"nationalid",
"nrp",
"passport",
"phone",
"ssn",
"url"
]
},
"description": "List of types to be anonymized",
"default": [
"all_and_credentials"
]
},
"custom_patterns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"regex": {
"type": "string"
},
"score": {
"type": "number",
"maximum": 1,
"minimum": 0,
"default": 0.5
}
},
"required": [
"name",
"regex"
]
},
"minLength": 1,
"description": "List of custom patterns to be used for anonymization"
},
"proxy_config": {
"type": "object",
"properties": {
"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."
},
"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
}
}
},
"continue_on_detection": {
"type": "boolean",
"description": "If true, the guardrail will not block the request or response. Sanitization data and details will still be visible via kong logs. You can expect this field to work coherently with `sanitization_mode` parameter.",
"default": false
},
"scheme": {
"type": "string",
"description": "The protocol can be http and https",
"default": "http"
},
"keepalive_timeout": {
"type": "number",
"description": "The keepalive timeout for the established http connnection",
"default": 60000
},
"sanitization_mode": {
"type": "string",
"enum": [
"BOTH",
"INPUT",
"OUTPUT"
],
"description": "The sanitization mode to use for the request",
"default": "INPUT"
},
"recover_redacted": {
"type": "boolean",
"description": "Whether to recover redacted data. This doesn't apply to the redacted output.",
"default": true
},
"allow_all_conversation_history": {
"type": "boolean",
"description": "If false, will ignore all previous chat messages from the conversation history.",
"default": true
},
"host": {
"type": "string",
"description": "The host of the sanitizer",
"default": "localhost"
},
"redact_type": {
"type": "string",
"enum": [
"placeholder",
"synthetic"
],
"description": "What value to be used to redacted to",
"default": "placeholder"
}
}
}
}
}
관련 리소스
더 알아보기 (Learn more)
- 요청에 포함된 민감 데이터를 보호하는 방법을 단계별로 안내해요 — How to protect sensitive data in requests
- 응답에 포함된 민감 데이터를 보호하는 방법을 설명해요 — How to protect sensitive data in responses
- 자체 감지 로직이 필요할 때 활용할 수 있는 커스텀 가드레일 정책이에요 — AI Custom Guardrail Policy
- PII Sanitizer가 생성하는 로그를 감사 기록에서 확인하는 방법을 다뤄요 — AI Gateway audit log reference