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

필드 복호화 정책 구성 레퍼런스

원문 보기 위키 갱신

필드 복호화 정책 구성 레퍼런스 (Decrypt Fields Policy Configuration Reference)

이 문서는 Kong Event Gateway에서 파싱된 Kafka 레코드의 필드를 AES_256_GCM 방식으로 복호화하는 Decrypt Fields 정책의 구성 항목을 설명해요. 이 정책은 스키마 검증 정책의 하위 정책으로만 사용할 수 있고 런타임 버전 1.2 이상이 필요하다는 점도 함께 안내해요. type, name, enabled 같은 기본 속성부터 조건식으로 적용 대상을 제어하는 condition 필드까지 구성 요소를 하나씩 살펴봐요

출처: 문서

본문

구성

{
  "description": "Decrypts fields of parsed Kafka records using AES_256_GCM. Keys are therefore 256 bits long.\n\nNote this policy can only be used as a child of a `EventGatewayConsumeSchemaValidationPolicy` policy.\n\n**Requires a minimum runtime version of `1.2`**.",
  "type": "object",
  "properties": {
    "type": {
      "description": "The type name of the policy.",
      "type": "string",
      "enum": [
        "decrypt_fields"
      ],
      "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/EventGatewayParsedRecordDecryptFieldsConfig"
    },
    "condition": {
      "description": "A string containing the boolean expression that determines whether the policy is applied.\n\nWhen the policy is applied as a child policy of schema_validation, the expression can also reference\n`record.value` fields.\n",
      "type": "string",
      "example": "record.value.content.foo.bar == \"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."
          },
          {
            "name": "record.value.validated",
            "type": "boolean",
            "description": "Indicates whether the record value was successfully validated."
          },
          {
            "name": "record.value.content",
            "type": "object",
            "description": "The content of the record value."
          },
          {
            "name": "record.value.schema",
            "type": "object",
            "x-min-runtime-version": "1.2",
            "description": "Registry-supplied schema metadata for the record value. Populated when the value\nwas validated by a Confluent schema registry. Fields: `id` (uint), `version` (uint,\nwhen returned by the registry), `format` (\"avro\"|\"json\"), and either\n`avro.{name, namespace}` or `json.{title, id}`. Sub-fields are absent when not\napplicable; use `has()` to test presence. Registry `metadata` (tags and properties)\nis available from runtime 1.3 via `record.value.schema.metadata`.\n\n**Requires a minimum runtime version of `1.2`**."
          },
          {
            "name": "record.value.schema.metadata",
            "type": "object",
            "x-min-runtime-version": "1.3",
            "description": "Confluent schema-registry metadata for the record value. Present (as empty maps)\nwhenever `record.value.schema` is present. Fields:\n* `properties` (`map` of `string` to `string`) - Confluent `metadata.properties`;\n  empty map when the registry omits it.\n* `tags` (`map` of `string` to list of `string`) - keyed by tag, value is the list\n  of Confluent schema paths (e.g. `io.confluent.field.<name>`) carrying that tag;\n  empty map when the registry omits it.\n\n**Requires a minimum runtime version of `1.3`**."
          },
          {
            "name": "record.key.schema",
            "type": "object",
            "x-min-runtime-version": "1.2",
            "description": "Same shape as `record.value.schema`, populated when the record key has\nschema_validation configured.\n\n**Requires a minimum runtime version of `1.2`**."
          },
          {
            "name": "record.key.schema.metadata",
            "type": "object",
            "x-min-runtime-version": "1.3",
            "description": "Same shape as `record.value.schema.metadata`, populated when the record key has\nschema_validation configured.\n\n**Requires a minimum runtime version of `1.3`**."
          }
        ]
      }
    }
  },
  "required": [
    "type",
    "config"
  ],
  "title": "Decrypt Parsed Record Fields",
  "x-min-runtime-version": "1.2"
}

관련 리소스

더 알아보기 (Learn more)