ACL 정책 구성 레퍼런스
ACL 정책 구성 레퍼런스 (ACLs Policy Configuration Reference)
이 문서는 Kong Event Gateway에서 가상 클러스터 트래픽에 Kafka ACL을 적을 때 사용하는 ACL 정책의 구성 스키마를 정리한 레퍼런스예요. 정책 이름이나 설명, 활성화 여부 같은 기본 필드부터 실제 ACL 설정을 담는 config 필드까지 JSON 스키마 형태로 하나씩 살펴볼 수 있어요. 특히 condition 필드에 불리언 표현식을 작성해서 인증 주체의 이름이나 인증 타입에 따라 정책 적용 여부를 제어하는 방법도 함께 확인해요
출처: 문서
본문
구성
{
"description": "Apply Kafka ACLs to virtual cluster traffic.",
"type": "object",
"properties": {
"type": {
"description": "The type name of the policy.",
"type": "string",
"enum": [
"acls"
],
"maxLength": 255,
"minLength": 1,
"x-terraform-transform-const": true
},
"name": {
"description": "A unique user-defined name of the policy.",
"type": "string",
"maxLength": 255,
"x-unicode-pattern": "^[\\p{L}\\p{N}][\\p{L}\\p{N} _\\-\\.:/+']*[\\p{L}\\p{N}]$"
},
"description": {
"description": "A human-readable description of the policy.",
"type": "string",
"default": "",
"maxLength": 512
},
"enabled": {
"description": "Whether the policy is enabled.",
"type": "boolean",
"default": true
},
"labels": {
"$ref": "#/components/schemas/Labels"
},
"config": {
"description": "The configuration of the policy.",
"type": "object",
"$ref": "#/components/schemas/EventGatewayACLPolicyConfig"
},
"condition": {
"description": "A string containing the boolean expression that determines whether the policy is applied.",
"type": "string",
"example": "context.auth.principal.name == \"this-user\"",
"default": "",
"maxLength": 1000,
"x-expression": {
"type": "boolean",
"fields": [
{
"name": "context.auth.principal.name",
"type": "string",
"description": "Name of authenticated principal. Username in case of PLAIN/SCRAM, `sub` claim in case of OAUTHBEARER."
},
{
"name": "context.auth.principal.id",
"type": "string",
"description": "Kong Identity principal ID. Only populated when Kong Identity principal fetching is configured and succeeds.\n\n**Requires a minimum runtime version of `1.2`**.",
"x-min-runtime-version": "1.2"
},
{
"name": "context.auth.principal.metadata",
"type": "object",
"description": "Kong Identity principal metadata. Only populated when Kong Identity principal fetching is configured and succeeds. Values can be strings, numbers, booleans, arrays or nested JSON objects.\n\n**Requires a minimum runtime version of `1.2`**.",
"x-min-runtime-version": "1.2"
},
{
"name": "context.auth.type",
"type": "string",
"description": "The matched authentication type from a virtual cluster: anonymous, sasl_plain, sasl_scram_sha256, sasl_scram_sha512, sasl_oauth_bearer.\n"
}
]
}
}
},
"required": [
"type",
"config"
],
"title": "ACL"
}
관련 리소스
더 알아보기 (Learn more)
- 정책 엔티티의 공통 구조와 개념 이해 — Policies
- ACL이 적용되는 대상인 가상 클러스터 살펴보기 — Virtual clusters
- condition 필드에 사용할 불리언 표현식 문법 정리 — Expressions reference
- 네임스페이스와 ACL로 Kafka 토픽을 제품화하는 실습 가이드 — How-to: Productize Kafka topics with namespaces and ACLs
- Kong Identity OAuth 기반 인증을 설정하는 방법 — How-to: Set up Kong Event Gateway with Kong Identity OAuth