ACL 정책 구성 레퍼런스
ACL 정책 구성 레퍼런스 (ACL Policy Configuration Reference)
이 문서는 Kong ACL 정책의 구성 옵션을 JSON 스키마 형태로 정리해 놓은 레퍼런스예요. allow와 deny로 서비스나 라우트에 접근할 수 있는 그룹을 지정하는 방법부터, hide_groups_header나 include_consumer_groups, always_use_authenticated_groups 같은 세부 옵션의 기본값과 동작 방식까지 확인할 수 있어요. 특히 allow_when과 deny_when을 사용하면 요청 컨텍스트를 대상으로 평가되는 CEL 불리언 표현식으로 조건부 허용과 차단을 설정할 수 있다는 점이 눈에 띄는 부분이에요. 네 가지 접근 제어 옵션 중 정확히 하나만 지정해야 한다는 규칙도 함께 기억해 두면 좋아요
출처: 문서
본문
{
"properties": {
"config": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arbitrary group names that are allowed to consume the service or route. Exactly one of `config.allow`, `config.deny`, `config.allow_when`, or `config.deny_when` must be specified."
},
"deny": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arbitrary group names that are not allowed to consume the service or route. Exactly one of `config.allow`, `config.deny`, `config.allow_when`, or `config.deny_when` must be specified."
},
"hide_groups_header": {
"type": "boolean",
"description": "If enabled (`true`), prevents the `X-Consumer-Groups` and `X-Authenticated-Groups` headers from being sent in the request to the upstream service. These headers are not set when `allow_when` or `deny_when` is used.",
"default": false
},
"include_consumer_groups": {
"type": "boolean",
"description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields. This option is ignored when `allow_when` or `deny_when` is used.",
"default": false
},
"always_use_authenticated_groups": {
"type": "boolean",
"description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous. This option is ignored when `allow_when` or `deny_when` is effective.",
"default": false
},
"allow_when": {
"type": "array",
"items": {
"type": "string",
"maxLength": 1024,
"minLength": 1
},
"description": "Allow the request if it matches any of these CEL boolean expressions evaluated against the request context (consumer, principal, HTTP attributes, consumer groups, etc.). Exactly one of `config.allow`, `config.deny`, `config.allow_when`, or `config.deny_when` must be specified."
},
"deny_when": {
"type": "array",
"items": {
"type": "string",
"maxLength": 1024,
"minLength": 1
},
"description": "Deny the request if it matches any of these CEL boolean expressions evaluated against the request context (consumer, principal, HTTP attributes, consumer groups, etc.). Exactly one of `config.allow`, `config.deny`, `config.allow_when`, or `config.deny_when` must be specified."
}
}
}
}
}
관련 리소스
더 알아보기 (Learn more)
- ACL 정책이 컨슈머 그룹 기반으로 접근을 제어하는 만큼, 컨슈머 엔티티에 해당하는 AI Consumer 문서를 함께 보면 개념 연결이 쉬워요 — AI Consumer
- 인증 전략과 접근 제어가 어떻게 맞물리는지 큰 그림을 잡고 싶다면 AI Auth Strategies 문서가 좋은 출발점이에요 — AI Auth Strategies
- ACL 정책을 실제 시나리오에 적용하는 사례가 궁금하다면 Kong Identity로 AI 모델에 단계별 예산을 강제하는 가이드를 참고해 보세요 — Enforce tiered AI budgets on AI Models with Kong Identity