Skip to content

Commit c441bc2

Browse files
authored
Merge pull request #13 from crowdsecurity/doc_imp
minor typos or suggestions in doc
2 parents 27c5b47 + 9bad6e6 commit c441bc2

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

docs/contribute.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contribute to this plugin
22

3-
> Before all, be sure to [get the stack installed using the docker-compose guide](install-with-docker-compose.md).
3+
> First, be sure to [get the stack installed using the docker-compose guide](install-with-docker-compose.md).
44
# Play with crowdsec state
55

66
```bash
@@ -32,7 +32,7 @@ docker-compose run --rm wpscan --url http://wordpress5-6/
3232
docker-compose exec wordpress5-6 composer install --working-dir /var/www/html/wp-content/plugins/cs-wordpress-bouncer --prefer-source
3333
```
3434

35-
> In this dev environment, we use `--prefer-source` to be able to develop the bouncer library at the same time. Composer will may ask you for your own Github token to download sources instead of using dist packages.
35+
> In this dev environment, we use `--prefer-source` to be able to develop the bouncer library at the same time. Composer may ask you for your own Github token to download sources instead of using dist packages.
3636
3737

3838
### Quick `docker-compose` cheet sheet
@@ -68,13 +68,13 @@ Then re-run the stack.
6868

6969
### Try the plugin with another WordPress version
7070

71-
In start of 2021, [more than 90% of the wordpress websites](https://wordpress.org/about/stats/) was using WordPress versions:
7271

7372
The plugin is tested under each of these WordPress versions: `5.6`, `5.5`, `5.4`, `5.3`, `5.2`, `5.1`, `5.0`, `4.9`.
73+
(Representing [more than 90% of the wordpress websites](https://wordpress.org/about/stats/))
7474

7575
#### Add support for a new WordPress version
7676

77-
This is a sheet cheet to help testing briefly the support:
77+
This is a cheat sheet to help testing briefly the support:
7878

7979
```bash
8080

@@ -94,11 +94,11 @@ docker-compose down && docker rmi wordpress-bouncer_wordpress<X.X>
9494
docker-compose run wordpress<X.X> bash
9595
```
9696

97-
> Note: The `DOCKER_HOST_IP` environnment variable is initialized via `source ./load-env-vars.sh`.
97+
> Note: The `DOCKER_HOST_IP` environnement variable is initialized via `source ./load-env-vars.sh`.
9898
9999
### Plugin debug mode VS production mode
100100

101-
The debug mode throw verbose errors. The production hide every error to let users navigate in every edge cases.
101+
The debug mode throws verbose errors. The production mode hides every error to let users navigate in every edge cases.
102102

103103
This plugin goes in debug mode when Wordpress debug mode is enabled.
104104

@@ -107,9 +107,9 @@ To try the production mode of this plugin, just disable the wordpress debug mode
107107
WORDPRESS_DEBUG: 1 # Comment this line the simulate the production mode
108108
```
109109
110-
#### Test linux behaviour from OSX or Windows
110+
#### Test Linux behavior from OSX or Windows
111111
112-
You can test the Linux behaviour of this project using **Vagrant**.
112+
You can test the Linux behavior of this project using **Vagrant**.
113113
114114
```bash
115115
vagrant up

docs/full-guide.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Full guide
22

3-
This scenario exposes you the main features this plugin is capable of.
3+
This guide exposes you the main features of the plugin.
44

5-
## Let's get starting!
5+
## Let's get started!
66

77
We will start using "live" mode. You'll understand what it is after try the stream mode.
88

9-
* Before all, be sure to [get the stack installed using the docker-compose guide](install-with-docker-compose.md).
9+
* First, be sure to [get the stack installed using the docker-compose guide](install-with-docker-compose.md).
1010

1111
* open a terminal to display LAPI logs in realtime:
1212

@@ -16,33 +16,33 @@ docker-compose logs -f crowdsec
1616

1717
* In wp-admin, [ensure the bouncer is configured with **live** mode](http://localhost:8050/wp-admin/admin.php?page=crowdsec_plugin) (stream mode disabled).
1818

19-
### Discove the cache system
19+
### Discover the cache system
2020

21-
* In a tab, visit the [public home](http://localhost:8050/). The way is free because LAPI said your IP is clean.
21+
* In a tab, visit the [public home](http://localhost:8050/). You're allowed because LAPI said your IP is clean.
2222

2323
> To avoid latencies when the clean IP browse the website, the bouncer will keep this information in cache for 30 seconds (you can change this value in the [avdanced settings page](http://localhost:8050/wp-admin/admin.php?page=crowdsec_advanced_settings)). In other words, LAPI will not be requested to check this IP for the next 30 seconds.
2424
25-
* You can call the website many time as you want, the cache system will take relay during the ban period and so LAPI will not be disturbed. The ban decision will stay in cache for the full ban duration. Then the [public home](http://localhost:8050/) should be available again.
25+
* You can call the website as many times as you want, the cache system will take relay during the ban period and so LAPI will not be disturbed. The ban decision will stay in cache for the full ban duration. Then the [public home](http://localhost:8050/) should be available again.
2626

2727
### Try ban remediation
2828

29-
* As we don't want this delay, to take in account immediately the last unban, feel free to [clear the cache in the wp-admin](http://localhost:8050/wp-admin/admin.php?page=crowdsec_plugin).
29+
* If you want to skip this delay, feel free to [clear the cache in the wp-admin](http://localhost:8050/wp-admin/admin.php?page=crowdsec_plugin).
3030

31-
The `DOCKER_HOST_IP` environnment variable is initialized via a call to:
31+
The `DOCKER_HOST_IP` environnement variable is initialized via a call to:
3232

3333
```bash
3434
source ./load-env-vars.sh
3535
```
3636

37-
* In a term, ban your own IP for 4 hours:
37+
* In a terminal, ban your own IP for 4 hours:
3838

3939
```bash
4040

4141
# Ban your own IP for 4 hours:
4242
docker-compose exec crowdsec cscli decisions add --ip ${DOCKER_HOST_IP} --duration 4h --type ban
4343
```
4444

45-
* Immediately, the [public home](http://localhost:8050/) is now locked with a short message to explain you that you were ban.
45+
* Immediately, the [public home](http://localhost:8050/) is now locked with a short message to explain you that you are banned.
4646

4747
### Try "captcha" remediation
4848

@@ -60,18 +60,18 @@ docker-compose exec crowdsec cscli decisions add --ip ${DOCKER_HOST_IP} --durati
6060

6161
* The [public home](http://localhost:8050/) now request you to fill a captcha.
6262

63-
* While you fail resolving the captcha, you'll not be able to access the website.
63+
* Unless you manage to solve the captcha, you'll not be able to access the website.
6464

6565
> Note: when you resolve the captcha in your browser, the associated PHP session is considered as sure.
66-
> If you remove the captcha decision with `cscli`, then you add a new captcha decision for your IP, you'll not be prompted no more for the current PHP session. To view the captcha page, You can force using a new PHP session opening the front page with incognito mode.
66+
> If you remove the captcha decision with `cscli`, then you add a new captcha decision for your IP, you'll not be prompted for the current PHP session. To view the captcha page, You can force using a new PHP session opening the front page with incognito mode.
6767
6868
## Stream mode, for the high traffic websites
6969

70-
With live mode, as you tried it just before, each time a user arrives to the website for the first time, a called is made to LAPI. If the traffic on your website is high, the bouncer will call LAPI very often.
70+
With live mode, as you tried it just before, each time a user arrives to the website for the first time, a call is made to LAPI. If the traffic on your website is high, the bouncer will call LAPI very often.
7171

72-
To avoid this, LAPI offers a "stream" mode. The whole decisions list is updated for a predefined frequency. Let's try it!
72+
To avoid this, LAPI offers a "stream" mode. The decisions list is updated at a predefined frequency and kept in cache. Let's try it!
7373

74-
> This bouncer used the WordPress cron system. For this demo purpose, we encourage you to [install the WP-Control plugin](http://localhost:8050/wp-admin/plugin-install.php?s=wp-control&tab=search&type=term), a plugin to view and control each Wordpress Cron task jobs.
74+
> This bouncer uses the WordPress cron system. For demo purposes, we encourage you to [install the WP-Control plugin](http://localhost:8050/wp-admin/plugin-install.php?s=wp-control&tab=search&type=term), a plugin to view and control each Wordpress Cron task jobs.
7575
7676
First, clear the previous decisions:
7777

@@ -82,7 +82,7 @@ docker-compose exec crowdsec cscli decisions delete --all
8282

8383
* Then enable "stream" mode [right here](http://localhost:8050/wp-admin/admin.php?page=crowdsec_advanced_settings) and set the resync frequency to 30 seconds. If you installed WP-Control plugin, you can see that a new cron tak has just been added here http://localhost:8050/wp-admin/tools.php?page=crontrol_admin_manage_page.
8484

85-
* As the whole blocklist has just been loaded in cache (0 decision!), your IP is now free. The [public home](http://localhost:8050/) is now available.
85+
* As the whole blocklist has just been loaded in cache (0 decision!), your IP is allowed. The [public home](http://localhost:8050/) is available.
8686

8787
* Now, if you ban your IP for 4h:
8888

@@ -92,13 +92,13 @@ docker-compose exec crowdsec cscli decisions add --ip ${DOCKER_HOST_IP} --durati
9292

9393
* In less than 30 seconds your IP will be banned and the [public home](http://localhost:8050/) will be locked.
9494

95-
Conclusion: with the stream mode, LAPI is never call directly when the website user arrives for the first time.
95+
Conclusion: with the stream mode, LAPI decisions are fetched on a regular basis rather than being called when user arrives for the first time.
9696

9797
# Try Redis or Memcached
9898

9999
In order to get better performances, you can switch the cache technology.
100100

101-
The docker-compose file started 2 container not used until now, redis and memcached.
101+
The docker-compose file started 2 unused containers, redis and memcached.
102102

103103
Let's try **Redis**!
104104

@@ -118,4 +118,4 @@ Very similar with **Memcached**!
118118
The bouncer has a stats page indicating each time :
119119
- an IP has been banned by your website, or
120120
- when a captcha has been presented to an IP visiting your website
121-
- when a captcha the captcha has been solved or not.
121+
- when a captcha has been solved or not.

docs/install-with-docker-compose.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Before all, create a `.env` file, using:
1515
cp .env.example .env
1616
```
1717

18-
> Note about PHP 8.0: WordPress official docker image [does not officially supports PHP 8.0](https://hub.docker.com/_/wordpress?tab=tags&page=1&ordering=last_updated) at this time. However, as the CrowdSec PHP Library does support PHP 8.0, there is a good chance that the pluggin will work fine with PHP 8.0, but we can not currently test it.
18+
> Note about PHP 8.0: WordPress official docker image [does not officially supports PHP 8.0](https://hub.docker.com/_/wordpress?tab=tags&page=1&ordering=last_updated) at this time. However, as the CrowdSec PHP Library does support PHP 8.0, there is a good chance that the plugin will work fine with PHP 8.0, but we can not currently test it.
1919
2020
## Configure WordPress and the CrowdSec Plugin
2121

@@ -51,7 +51,7 @@ The LAPI URL is:
5151

5252
http://crowdsec:8080
5353

54-
## Try the plugin behaviour
54+
## Try the plugin behavior
5555

5656
| Info | Value |
5757
|-----------------|--------------------------------------|

0 commit comments

Comments
 (0)