Can create users in bulk
Can apply restrictions by roles.

Role based restrictions can be applied in the configuration file. We need to first
declare a list of users with their corresponding roles, and in each query rule we can
declare the roles that are allowed to query that index.

E.g. EsaPermissions.js
var base = {
  indices: {
      _default: {
          access: "allow",
          fields: ["name"],
          source_filters: ["directed_by"],
          roles: ["SINGER", "DRUMMER"]
      }
  }
};

var users = [
    {
        username: "ringo",
        roles: ["DRUMMER"]
    }
]

That file creates a user with "DRUMMER" role, and it can only query the
"_default" index. If no roles are specified for the query restrictions, then
the roles are ignored completely and only the other parameters are applied.

The query sent to the proxy then needs a user field that takes a string.