


key names: array of parameter names (apikey by default) from which the plugin searches for a key. The client should send an identity authentication key using one of the key names. The plugin attempts to read the credential from the header or query parameters with the same name.hide credentials: whether to hide credentials from the upstream service.anonymous: optional string (user uuid) used as the "anonymous" user if authentication fails. If it is empty (default), the request fails, identity authentication fails, and a 4xx response is returned. Note that this value should refer to the consumer ID field rather than the custom_id field in Cloud Native API Gateway.key in header: If it is enabled, parameters of the key that the plugin searches for are in the header.key in query: If it is enabled, parameters of the key that the plugin searches for are in Query.key in body: If this option is enabled, the plugin reads the request body (if the request has one and its MIME type is supported) and attempts to locate the key within it. The supported MIME types are application/x-www-form-urlencoded, application/json, and multipart/form-data.run on preflight: whether the plugin should run its logic on OPTIONS preflight requests.


username: user (application) name. Either this field or custom_id should be specified.custom_id: custom identifier used to map the user to another database. Either this field or username should be specified.Tags: tag.

key: key value. If it is not specified, a key is generated automatically by default.

curl http://kong:8000/{proxy path}/ is returned.HTTP/1.1 401 UnauthorizedServer:Date: Mon, 25 Apr 2022 14:16:10 GMTContent-Type: application/json; charset=utf-8Content-Length: 45Connection: keep-aliveWWW-Authenticate: Key realm="kong"X-Kong-Response-Latency: 1{"message":"No API key found in request"}
curl http://kong:8000/{proxy path}?apikey=<some_key>HTTP/1.1 200 OKServer:Date: Mon, 25 Apr 2022 14:19:19 GMTContent-Type: text/html; charset=UTF-8Content-Length: 6Connection: keep-aliveX-Kong-Upstream-Latency: 5X-Kong-Proxy-Latency: 0Via: kong/2.4.1ok
피드백