Enable Key Auth

This example enables the plugin and sets apikey as the key name.

For a full walkthrough, see the tutorial on enabling key authentication for a Gateway Service with Kong Gateway.

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: key-auth
    config:
      key_names:
      - apikey
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!