Conditions are expressions using JEXL that control access to something.

Conditions are a single expression.

Conditions can be applied to:

The context of a Condition includes three variables:

An com.google.common.collect.ImmutableMap of query string arguments.

The arguments will be typed according to their specified uk.co.spudsoft.query.defn.DataType and will either be a single value or, if the argument is multi-valued, an com.google.common.collect.ImmutableList or typed values.

Note that the arguments are only typed when a pipeline instance is created, if the arguments field is access before (i.e. in a folder permissions.jexl file) all values will be strings. * params

A io.vertx.core.MultiMap of un-processed query string argumets. * headers

A io.vertx.core.MultiMap of request headers. * cookies

A java.util.Map map of request cookies. * clientIp

The IP address of client making the request, taken from the first of:

A condition should return either the true or false. In addition if it returns the string "true" it will be considered to be true. Any other return value will be considered false.

Some examples Conditions are

*
requestContext != null

Checks that the request context is not null, pretty useless in a live environment. *

requestContext.clientIpIsIn('127.0.0.1/32','172.17.0.1/16','0:0:0:0:0:0:0:1')

Checks that the client IP address is either localhost or in "172.17.0.0/16". *

requestContext.host == 'localhost'

Checks that the host on the request is localhost.

When referencing optional arguments use "Map accesses" (args['argName']) rather than "JavaBean property access" (args.argName). The dotted approach will generate an error if the argument is not supplied.

Name

Type

Details

logger

expression