Skip to content
hekra01 edited this page Oct 29, 2014 · 5 revisions

Since 1.2.0

The Whitelist feature enable to restricting the set of WebDriver commands available to certain certain IPs.
Whitelist can be passed to WD via command line argument:

 WebDriver --whitelist=/path/to/wihtelist.xml

By default all command for all client IPs are allowed.
Example whitelist XML file:

<hosts>
    <!-- All requests originating from 172.32.191.8 allowed -->
    <host ip="172.32.191.8"/>
 
    <!-- Requests originating from 172.27.27.7 cannot modify size/position of windows or click on elements-->
    <host ip="172.27.27.7">
        <deny url="/session/*/window/*/size" method="POST"/>
        <deny url="/session/*/window/*/position" method="POST"/>
        <deny url="/session/*/window/*/maximize" method="POST"/>
        <deny url="/session/*/click" method="POST"/>
    </host>
 
    <!-- wildcard IP to apply to all addresses -->
    <host ip="*">
        <allow url="/status" method="GET" />
    </host>
</hosts>

In the above example:

  • if nothing specified all command are allowed for requests originating from that IP (172.32.191.8)
  • if "allow" is specified only the specified commands are allowed
  • if "deny" is specified this command will be disallowed, all other allowed;
  • if case "allow" and "deny" are specified for one IP, only disallowed will have effect, all other will be allowed;
  • for all other IP all commands will be disallowed

XML configuration files comply with this shema: whitelist.xsd

Clone this wiki locally