This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
48 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
# Build | ||
- install [Go](https://golang.org/doc/install) | ||
- `cd /waflyctl` | ||
- `go get github.com/BurntSushi/toml github.com/sethvargo/go-fastly/fastly gopkg.in/alecthomas/kingpin.v2 gopkg.in/resty.v1` | ||
- `go build waflyctl.go` | ||
- `./waflyctl` | ||
|
||
Install [Go](https://golang.org/doc/install) and run the following | ||
commands: | ||
|
||
``` | ||
cd waflyctl | ||
go get github.com/BurntSushi/toml github.com/sethvargo/go-fastly/fastly \ | ||
gopkg.in/alecthomas/kingpin.v2 gopkg.in/resty.v1 | ||
go build waflyctl.go | ||
./waflyctl | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,38 @@ | ||
# Examples | ||
|
||
Replace <service_id> and <configuration_set_id> where appropriate. | ||
|
||
## Provision a Service with OWASP rule set | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid BtYEP3WtWse5mGznpxxxx --tags OWASP` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --tags OWASP` | ||
|
||
## Add three rules to block mode on a Service with a WAF provisioned | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid BtYEP3WtWmx5mGznpxxxx --rules 1010010,931100,931110 --action block` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --rules 1010010,931100,931110 --action block` | ||
|
||
## Delete a WAF previously provisioned | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid 7YCnicdpjTvxR2JdzNxxxx --delete` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --delete` | ||
|
||
## Customer with PerimeterX bot protection | ||
`./waflyctl --apikey $FASTLY_TOKEN --domain myexample.com --with-perimeterx` | ||
`waflyctl --apikey $FASTLY_TOKEN --domain myexample.com --with-perimeterx` | ||
|
||
## Only edit OWASP object base on what it is set on the config file | ||
`./waflyctl --apikey $FASTLY_TOKEN --domain myexample.com --owasp` | ||
`waflyctl --apikey $FASTLY_TOKEN --domain myexample.com --owasp` | ||
|
||
## Disable a WAF, stop it for blocking traffic if something goes horribly wrong | ||
|
||
## Listing all configuration sets available on the fastly platform | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid 7YCnicdpjTvxR2JdzNxxxx --list-configuration-sets` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --list-configuration-sets` | ||
|
||
## Listing all rules available under a configuration set | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid 7YCnicdpjTvxR2JdzNxxxx --list-all-rules 552NEtnDyzucKd3vTjLgFC` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --list-all-rules <configuration_set_id>` | ||
|
||
## Listing all rules and their status for a service | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid 7YCnicdpjTvxR2JdzNxxxx --list-rules` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --list-rules` | ||
|
||
## Set all rules of publisher owasp to logging | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid 7YCnicdpjTvxR2JdzNAKCj --publisher owasp --action log` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --publisher owasp --action log` | ||
|
||
## Disable WAF in case of an emergency | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid 7YCnicdpjTvxR2JdzNAKCj --status disable` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --status disable` | ||
|
||
## Customer with shielding | ||
`./waflyctl --apikey $FASTLY_TOKEN --serviceid 2mvVrPMLDWSaZzCZIpbcUI --enable-logs-only --with-shielding` | ||
`waflyctl --apikey $FASTLY_TOKEN --serviceid <service_id> --enable-logs-only --with-shielding` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
# Requirements | ||
- Have a Fastly API Key in-hand with edit privileges | ||
- Have a service behind Fastly | ||
- Have WAF be enabled for your account | ||
|
||
* Have a Fastly API Key in-hand with edit privileges | ||
* Have a service behind Fastly | ||
* Have WAF enabled for your account | ||
|
||
# Installation | ||
- `brew install fastly/tap/waflyctl` | ||
- grab a copy of the [config](https://github.com/fastly/waflyctl/blob/master/config_examples/waflyctl.toml.example) file and place it under `~/.waflyctl.toml` where the tool defaults to. | ||
|
||
To install the latest release in macOS: | ||
|
||
* brew install fastly/tap/waflyctl | ||
|
||
Alternatively, to use unreleased code from the master branch: | ||
|
||
* brew install --HEAD fastly/tap/waflyctl | ||
|
||
You will also need to grab a copy of the | ||
[config](https://github.com/fastly/waflyctl/blob/master/config_examples/waflyctl.toml.example) | ||
file and place it under `~/.waflyctl.toml` where the tool defaults to. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters