I’m new to Kong and I have a question about configuring the basic-auth plugin using deck.
I’m trying to define everything in my kong.yaml file, but I’m not sure where to put the consumers and where to define their basic-auth credentials inside the file.
Credentials are nested under each Consumer using the basicauth_credentials array. Each entry contains the username and password. This pattern is shown in multiple docs: [Create Consumer; Multiple auth]
consumers:
- username: jsmith
basicauth_credentials:
- username: jsmith
password: my-password
- username: Dana
basicauth_credentials:
- username: Dana
password: dana
So:
Consumers go in a top-level consumers: block in kong.yaml.
Basic-auth credentials are nested under each consumer in basicauth_credentials, not in a separate top-level section.
Please check out the AI Assistant on the docs site for other questions, I hope that helps