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

JWT 플러그인 구성 레퍼런스

원문 보기 위키 갱신

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

이 문서는 Kong JWT 플러그인에서 설정할 수 있는 모든 구성 옵션을 스키마 형태로 정리한 레퍼런스예요. anonymous, claims_to_verify, header_names, key_claim_name 같은 각 필드의 설명과 기본값, 데이터 타입을 한눈에 확인할 수 있어요. JWT 인증 동작을 세밀하게 조정하고 싶을 때 어떤 옵션을 어떻게 설정해야 하는지 참고하기 좋아요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "anonymous": {
          "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.",
          "type": "string"
        },
        "claims_to_verify": {
          "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.",
          "items": {
            "enum": [
              "exp",
              "nbf"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "cookie_names": {
          "default": [],
          "description": "A list of cookie names that Kong will inspect to retrieve JWTs.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "header_names": {
          "default": [
            "authorization"
          ],
          "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "key_claim_name": {
          "default": "iss",
          "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.",
          "type": "string"
        },
        "maximum_expiration": {
          "default": 0,
          "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.",
          "maximum": 31536000,
          "minimum": 0,
          "type": "number"
        },
        "realm": {
          "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.",
          "type": "string"
        },
        "run_on_preflight": {
          "default": true,
          "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.",
          "type": "boolean"
        },
        "secret_is_base64": {
          "default": false,
          "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.",
          "type": "boolean"
        },
        "uri_param_names": {
          "default": [
            "jwt"
          ],
          "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A set of strings representing HTTP protocols.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https"
        ],
        "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)

이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.