본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

ACL 플러그인 구성 레퍼런스

원문 보기 위키 갱신

ACL 플러그인 구성 레퍼런스 (ACL Plugin Configuration Reference)

ACL 플러그인에서 사용할 수 있는 모든 구성 옵션을 한눈에 정리해 보여주는 레퍼런스 문서예요. allow와 deny 필드로 특정 그룹의 서비스나 라우트 접근을 허용하거나 차단하는 방법을 확인할 수 있어요. allow_when과 deny_when을 사용하면 CEL 불리언 표현식으로 요청 컨텍스트 기반의 조건부 접근 제어도 가능해요. 인증 그룹 우선 사용, X-Consumer-Groups 헤더 숨기기, 컨슈머 그룹 포함 같은 세부 옵션까지 다루니 실제 설정 전에 참고하면 좋아요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "allow": {
          "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.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "allow_when": {
          "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.",
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        },
        "always_use_authenticated_groups": {
          "default": false,
          "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.",
          "type": "boolean"
        },
        "deny": {
          "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.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "deny_when": {
          "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.",
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        },
        "hide_groups_header": {
          "default": false,
          "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service. This header is not set when allow_when or deny_when is used.",
          "type": "boolean"
        },
        "include_consumer_groups": {
          "default": false,
          "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.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https",
          "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)