Consumer Restriction Configuration
Parameters
See plugin common configurations for configuration options available to all plugins.
-
type—string· optional · default:consumer_nameValid values:
consumer_name,consumer_group_id,service_id, orroute_idKey type to restrict by.
-
whitelist—array[string]· optionalList of objects to whitelist.
At least one of
whitelist,blacklist, andallowed_by_methodsshould be configured. If all are configured, the precedence isblacklist>whitelist>allowed_by_methods. -
blacklist—array[string]· optionalList of objects to blacklist.
At least one of
whitelist,blacklist, andallowed_by_methodsshould be configured. If all are configured, the precedence isblacklist>whitelist>allowed_by_methods. -
allowed_by_methods—array[object]· optionalList of key-value pairs of consumer name and their corresponding HTTP methods allowed.
At least one of
whitelist,blacklist, andallowed_by_methodsshould be configured. If all are configured, the precedence isblacklist>whitelist>allowed_by_methods.-
user—string· optionalConsumer username.
-
methods—array[string]· optionalValid values: Any combination of the
GET,POST,PUT,DELETE,PATCH,HEAD,OPTIONS,CONNECT,TRACE,PURGEmethodsList of allowed HTTP methods for the consumer.
-
-
rejected_code—integer· optional · default:403Valid values: greater than or equal to 200
HTTP status code to return when the request is rejected.
-
rejected_msg—string· optionalError message to return when the request is rejected.