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

LDAP 인증 고급 플러그인 구성 참조

원문 보기 위키 갱신

LDAP 인증 고급 플러그인 구성 참조 (LDAP Authentication Advanced Plugin Configuration Reference)

이 문서는 Kong의 LDAP 인증 고급 플러그인에서 설정할 수 있는 모든 구성 파라미터를 정리한 참조 자료예요. anonymous, base_dn, bind_dn 같은 LDAP 연결 기본 설정부터 consumer 매핑, 캐시 TTL, 그룹 검증 옵션까지 각 필드의 타입, 기본값, 설명을 한눈에 확인할 수 있어요. LDAP 서버와 연동해 사용자 인증을 세밀하게 제어하고 싶을 때 이 참조를 기준으로 설정값을 결정하면 돼요.

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "anonymous": {
          "default": "",
          "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.",
          "type": "string"
        },
        "attribute": {
          "description": "Attribute to be used to search the user; e.g., \"cn\".",
          "type": "string"
        },
        "base_dn": {
          "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.",
          "type": "string"
        },
        "bind_dn": {
          "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
          "type": "string",
          "x-referenceable": true
        },
        "cache_ttl": {
          "default": 60,
          "description": "Cache expiry time in seconds.",
          "type": "number"
        },
        "consumer_by": {
          "default": [
            "custom_id",
            "username"
          ],
          "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.",
          "items": {
            "enum": [
              "custom_id",
              "username"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "consumer_optional": {
          "default": false,
          "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.",
          "type": "boolean"
        },
        "group_base_dn": {
          "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.",
          "type": "string"
        },
        "group_member_attribute": {
          "default": "memberOf",
          "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.",
          "type": "string"
        },
        "group_name_attribute": {
          "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.",
          "type": "string"
        },
        "groups_required": {
          "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "header_type": {
          "default": "ldap",
          "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.",
          "type": "string"
        },
        "hide_credentials": {
          "default": true,
          "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.",
          "type": "boolean"
        },
        "keepalive": {
          "default": 60000,
          "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.",
          "type": "number"
        },
        "ldap_host": {
          "description": "Host on which the LDAP server is running.",
          "type": "string"
        },
        "ldap_password": {
          "description": "The password to the LDAP server. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
          "type": "string",
          "x-encrypted": true,
          "x-referenceable": true
        },
        "ldap_port": {
          "default": 389,
          "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.",
          "type": "number"
        },
        "ldaps": {
          "default": false,
          "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.",
          "type": "boolean"
        },
        "log_search_results": {
          "default": false,
          "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.",
          "type": "boolean"
        },
        "realm": {
          "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.",
          "type": "string"
        },
        "start_tls": {
          "default": false,
          "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.",
          "type": "boolean"
        },
        "timeout": {
          "default": 10000,
          "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.",
          "type": "number"
        },
        "verify_ldap_host": {
          "default": true,
          "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.",
          "type": "boolean"
        }
      },
      "required": [
        "attribute",
        "base_dn",
        "ldap_host"
      ],
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https",
        "ws",
        "wss"
      ],
      "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"
    }
  },
  "required": [
    "config"
  ]
}

관련 리소스

더 알아보기 (Learn more)

  • LDAP 인증 고급 플러그인의 기반이 되는 기본 플러그인의 개요와 동작 방식을 확인해요 — LDAP Authentication
  • bind_dn 같은 참조 가능 필드에 볼트에 저장된 시크릿을 연결하는 방법을 알아봐요 — referenceable
  • 키링으로 민감한 구성 필드를 암호화해 안전하게 보호하는 방법을 살펴봐요 — encrypted
  • Kong Manager에서 플러그인을 시각적으로 구성하고 관리하는 방법을 소개해요 — Kong Manager