Configuration

Configuration

Driplane needs a yaml file to work. An example can be found here.

The configuration file could have several sections, but the mandatory one is the general one. It specifies all the paths needed by driplane to find js files, templates and rules.

It contains the paths of rules, templates and javascript plugins.

1
2
3
4
5
6
general:
  log_path: "" # if nothing is specified it prints logs on stdout
  rules_path: "rules" # path containing the rules
  js_path: "js" # path of the js plugins
  templates_path: "templates" # path of templates
  debug: false # if true enable the debug logs

In the configuration it is possible to define default params for Feeders and Filters. In this way we don’t need to specify that configuration in the rules.

For the twitter feeder we can set the keys one time.

1
2
3
4
5
6
7
twitter:
  consumerKey: "consumerKey",
  consumerSecret: "consumerSecret",
  accessToken: "accessToken",
  accessSecret: "accessSecret",
  keywords: "#italy #coding #malware something",
  stallWarnings: "true"

Same for the Slack feeder and/or feeder.

1
2
3
4
5
slack:
  token: "xoxb-xxx-xxx-xxx"
    verification_token: "xxx"
    lt_enable: "true"
    lt_subdomain: "mytestdomain"

Each config will be visible ONLY to the related filter or feeder.

We can also define custom configurations and they will be available to all the feeders and filters.

1
2
custom:
  customKey: "This is a custom configuration"