IP Restriction 플러그인 설정 레퍼런스
IP Restriction 플러그인 설정 레퍼런스 (IP Restriction Plugin Configuration Reference)
이 문서는 Kong Gateway의 IP Restriction 플러그인 설정 레퍼런스예요. allow와 deny 목록으로 IP 주소나 CIDR 범위를 허용·차단하는 방법과, 거부된 요청에 반환할 상태 코드와 메시지를 지정하는 법을 확인할 수 있어요. consumer, consumer group, route 같은 스코핑 옵션과 지원 프로토콜까지 스키마 필드별로 정리되어 있어서, 플러그인을 적용하기 전에 필요한 파라미터를 점검할 때 참고하면 좋아요
출처: 문서
본문
{
"properties": {
"config": {
"properties": {
"allow": {
"description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.",
"items": {
"description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.",
"type": "string"
},
"type": "array"
},
"deny": {
"description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.",
"items": {
"description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.",
"type": "string"
},
"type": "array"
},
"message": {
"description": "The message to send as a response body to rejected requests.",
"type": "string"
},
"status": {
"description": "The HTTP status of the requests that will be rejected by the plugin.",
"type": "number"
}
},
"type": "object"
},
"consumer": {
"additionalProperties": false,
"description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
},
"consumer_group": {
"additionalProperties": false,
"description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
},
"expressions": {
"additionalProperties": true,
"type": "object"
},
"protocols": {
"default": [
"grpc",
"grpcs",
"http",
"https",
"tcp",
"tls"
],
"description": "A set of strings representing protocols.",
"items": {
"description": "A string representing a protocol, such as HTTP or HTTPS.",
"enum": [
"grpc",
"grpcs",
"http",
"https",
"tcp",
"tls",
"tls_passthrough",
"udp",
"ws",
"wss"
],
"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"
}
}
}
관련 리소스
더 알아보기 (Learn more)
- 특정 IP를 허용해서 Kong Gateway 리소스 접근을 제한하는 실습 과정을 단계별로 익혀요 — Restrict access to Kong Gateway resources by allowing specific IPs
- IP 기반 접근 제어와 함께 활용할 수 있는 봇 트래픽 감지 기능도 살펴봐요 — Bot Detector