Basic Auth Config

The following is an example of a configuration that restricts access to given request paths matching a prefix or exact pattern, request methods and credentials. { “basicauthrules”: [ { “requestpath”:{“exact”: “/api/reviews/pay”}, “requestmethods”:[ “GET”, “POST” ], “credentials”:[ “admin:admin”, “admin2:admin2” ] }, { “requestpath”:{ “prefix”:“/api” }, “requestmethods”:[ “GET”, “DELETE” ], “credentials”:[ “user:passwd”, “admin:admin” ] } ] }

PluginConfig

Top level configuration to restrict access using HTTP Basic Auth based on Basic Auth rules defined below.

FieldTypeDescriptionRequired
basicAuthRulesBasicAuth[]

Specifies a list of basic auth rules

No

BasicAuth

BasicAuth defines restriction rules based on three elements.

FieldTypeDescriptionRequired
requestPathPathMatcher

HTTP path to restrict access according to match pattern specification.

No
requestMethodsstring[]

HTTP request method operations such as GET, POST, HEAD, PUT, and DELETE.

No
credentialsstring[]

Credentials provided in the form username:password that have access.

No

PathMatcher

Restriction rule on requestpath is defined by matchpattern.

FieldTypeDescriptionRequired
exactstring (oneof)

match exact pattern in request_path

No
prefixstring (oneof)

match prefix pattern in request_path

No
suffixstring (oneof)

match suffix pattern in request_path

No
Was this information useful?
Do you have any suggestions for improvement?

Thanks for your feedback!