What happens if I configure multiple authentication methods but don’t use an anonymous Consumer?
If config.anonymous
isn’t set, then all configured authentication plugins will attempt to authenticate every request.
For example, if you have Key Auth and Basic Auth configured on a Gateway Service, then every request has to contain both types of authentication.
In this case, the last plugin executed is the one setting the credentials passed to the upstream service.
What if I configure an anonymous Consumer but don’t add request termination?
When multiple authentication plugins are enabled on a Gateway Service and config.anonymous
is set without any request termination, unauthorized requests will be allowed through.
If you want anonymous access to be forbidden, you must configure the Request Termination plugin on the anonymous Consumer.
Can I use the anonymous Consumer with OpenID Connect?
If you are using the OpenID Connect plugin for handling Consumer authentication, you must set both config.anonymous
and config.consumer_claim
in the plugin’s configuration, as setting config.anonymous
alone doesn’t map that Consumer.