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

복호화 정책 구성 참조

원문 보기 위키 갱신

복호화 정책 구성 참조 (Decrypt Policy Configuration Reference)

이 문서는 Kong Event Gateway에서 Kafka 레코드나 키를 AES_256_GCM 방식으로 복호화하는 복호화(Decrypt) 정책의 구성 참조 자료예요. 정책 이름, 설명, 활성화 여부 같은 기본 필드와 함께 정책 적용 여부를 판단하는 불리언 조건식 작성 방법까지 JSON 스키마 형태로 정리되어 있어요. 각 필드의 타입, 기본값, 길이 제약이 명시되어 있어서 정책을 직접 작성하거나 검토할 때 참고하면 좋아요

출처: 문서

본문

구성

{
  "description": "Decrypts Kafka records or keys using AES_256_GCM. Keys are therefore 256 bits long.",
  "type": "object",
  "properties": {
    "type": {
      "description": "The type name of the policy.",
      "type": "string",
      "enum": [
        "decrypt"
      ],
      "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/EventGatewayDecryptPolicyConfig"
    },
    "condition": {
      "description": "A string containing the boolean expression that determines whether the policy is applied.",
      "type": "string",
      "example": "context.topic.name.endsWith(\"my_suffix\") && record.headers[\"x-flag\"] == \"a-value\"",
      "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"
          },
          {
            "name": "context.topic.name",
            "type": "string",
            "description": "The name of the topic."
          },
          {
            "name": "record.headers",
            "type": "object",
            "description": "An associative array of header key value pairs."
          }
        ]
      }
    }
  },
  "required": [
    "type",
    "config"
  ],
  "title": "Decrypt"
}

관련 리소스

더 알아보기 (Learn more)

  • 정책 엔티티의 개념과 생성·관리 방법을 설명해요 — Policies
  • 복호화 정책과 짝을 이루는 암호화 정책의 구성 참조예요 — Encrypt policy
  • 복호화에 사용할 키를 정적으로 관리하는 엔티티를 설명해요 — Static keys
  • Kong Event Gateway로 Kafka 메시지를 암호화하고 복호화하는 전체 과정을 다루는 가이드예요 — Encrypt and decrypt Kafka messages with Kong Event Gateway
  • 정책이 적용되는 가상 클러스터 개념을 설명해요 — Virtual clusters