Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #40 from fastly/add_publisher
Browse files Browse the repository at this point in the history
Add publisher functionality
  • Loading branch information
josehelps authored Aug 21, 2018
2 parents eda1669 + b24afda commit d9779f8
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 59 deletions.
7 changes: 7 additions & 0 deletions Documentation/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@
## Listing all rules and their status for a service
`./waflyctl -apikey $FASTLY_TOKEN -serviceid 7YCnicdpjTvxR2JdzNxxxx -list-rules`

## Set all rules of publisher owasp to logging
`./waflyctl -apikey $FASTLY_TOKEN -serviceid 7YCnicdpjTvxR2JdzNAKCj -publisher owasp -action log`

## Disable WAF in case of an emergency
`./waflyctl -apikey $FASTLY_TOKEN -serviceid 7YCnicdpjTvxR2JdzNAKCj -status disable`


6 changes: 5 additions & 1 deletion Documentation/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Usage of waflyctl:
[Required] API Key to use
-config string
Location of configuration file for waflyctl. (default "/Users/jhernandez/.waflyctl.toml")
-configuration-set string
Changes WAF configuration set to the provided one]
-delete
When set removes a WAF configuration created with waflyctl.
-delete-logs
Expand All @@ -27,14 +29,16 @@ Usage of waflyctl:
List current WAF rules and their status
-owasp
When set edits the OWASP object base on the settings in the configuration file.
-publisher string
Which rule publisher to use in a comma delimited fashion, overwrites publisher defined in config file, choices are: owasp, trustwave, fastly
-rules string
Which rules to apply action on in a comma delimited fashion, overwrites ruleid defined in config file, example: 94011,93110,1000101..
-serviceid string
[Required] Service ID to Provision
-status string
Disable or Enable the WAF. A disabled WAF will not block any traffic, also disabling a WAF does not change rule statuses on its configure policy.
-tags string
Which rules tags to add to the ruleset in a comma delimited fashion, overwrites tags defined in config file, example: OWASP,wordpress,php
Which rules tags to add to the ruleset in a comma delimited fashion, overwrites tags defined in config file, example: wordpress,language-php,drupal
-with-perimeterx
Enable if the customer has perimeterX enabled on the service as well as WAF. Helps fix null value logging.
```
3 changes: 2 additions & 1 deletion config_examples/waflyctl.toml.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

logpath = "waflyctl.log"
apiendpoint = "https://api.fastly.com"
tags = ["OWASP","language-html","language-htm","language-css","language-jpg","language-json"]
tags = [""]
publisher = ["owasp"]
action = "log"
rules = []

Expand Down
Loading

0 comments on commit d9779f8

Please sign in to comment.