Commit graph

791 commits

Author SHA1 Message Date
Gonzalo
17b7368a95
docs: attempt to avoid README version confusion 2021-06-15 12:29:14 -03:00
Gonzalo
2257f00876
docs: update 'How can I help?' section 2021-03-21 18:28:59 -03:00
Gonzalo
886ba3a18d
Merge branch '6-stable' 2021-02-07 16:46:46 -03:00
Gonzalo
12a8390d2d
Bump gem version to v6.5 2021-02-07 13:34:46 -03:00
Gonzalo
f3f0df3fc0
refactor: attempt to avoid user confusion by clarifying method is used by throttle 2021-02-07 13:34:26 -03:00
brchristian
0f1a72a4d4
Use single quotes in example configuration 2021-02-07 13:02:33 -03:00
Gonzalo
d1b01f0b4a
test: update ruby and rails versions 2021-02-07 13:02:16 -03:00
fatkodima
1e5fb868f6
Auto include middleware for older railses 2021-02-07 12:57:24 -03:00
fatkodima
e131750a6b
Make store proxies lookup dynamic 2021-02-07 12:56:50 -03:00
fatkodima
df354cd141
Make discriminators case-insensitive by default 2021-02-07 12:55:03 -03:00
Gonzalo Rodriguez
23f7e7f53b
Merge pull request #514 from brchristian/patch-1
Use single quotes in example configuration
2021-01-24 13:04:47 -03:00
Gonzalo
1c460b179e
Merge branch '6-stable' 2021-01-23 22:38:36 -03:00
Gonzalo
6328ddcb19
Bump gem version to v6.4 2021-01-23 21:26:11 -03:00
Gonzalo
33d1bac4a5
test: update ruby and rails versions 2021-01-23 21:26:11 -03:00
fukayatsu
dda2489936
Fix Ruby 2.7 kwargs warning in RedisCacheStoreProxy
(cherry picked from commit 9020201ff5)
2021-01-23 13:55:48 -03:00
Joe Van Dyk
38c89afcf3
Fix speling in README
(cherry picked from commit 7b3376021b)
2021-01-23 13:55:48 -03:00
Gonzalo
6316069638
docs: update repo references after move to rack org
(cherry picked from commit 26476670f4)
2021-01-23 13:55:48 -03:00
Gonzalo
476144ee40
build: update rubocop to earlier version fixing the LineLength crash
(cherry picked from commit cbae022df1)
2021-01-23 13:55:47 -03:00
Eliot Sykes
1cd4a1cd79
Mitigate login throttle bypasses in docs
This commit mitigates rate limit bypasses in the configuration
docs by normalizing the email throttle key. (The normalization process
used is the same as used by the Clearance gem.)

---

Often an authentication process normalizes email addresses and usernames
before look up, say by downcasing and removing any whitespace.

Throttles that do not perform the same normalization are vulnerable
to rate limit bypasses.

For example, an attacker can bypass a vulnerable throttle by using
unlimited case and whitespace variants for the same email address:

- Variant 1: `victim@example.org`
- Variant 2: `victim@example. org` (one whitespace)
- Variant 3: `victim@example.  org` (two whitespaces)
- Variant 4: `ViCtIm@eXaMpLe.org`
- etc, etc.

All of these variants resolve to the same email address, but allow
an attacker to bypass a vulnerable throttle. To mitigate, the email
throttle key should be normalized using the same logic the
authentication process uses for normalizing emails.

(cherry picked from commit 03926e0b75)
2021-01-23 13:55:47 -03:00
Tristan Toye
48531f546c
Clarify Calling HTTP_APIKey header in example (#488)
* Clarify Calling HTTP_ header in example

In trying to track down a bug here turns out I was trying to reference the wrong header shown in the readme.

Printing our `request.env` it becomes clear this is just the full request object:

```
{"rack.version"=>[1, 3],
 "rack.errors"=>#<IO:<STDERR>>,
 "rack.multithread"=>true,
 "rack.multiprocess"=>false,
 "rack.run_once"=>false,
 "SCRIPT_NAME"=>"",
 "QUERY_STRING"=>"",
 "SERVER_PROTOCOL"=>"HTTP/1.1",
 "SERVER_SOFTWARE"=>"puma 4.3.5 Mysterious Traveller",
 "GATEWAY_INTERFACE"=>"CGI/1.2",
 "REQUEST_METHOD"=>"POST",
 "REQUEST_PATH"=>"/api/v1/....",
 "REQUEST_URI"=>"/api/v1/...",
 "HTTP_VERSION"=>"HTTP/1.1",
 "HTTP_HOST"=>"example.com",
 "HTTP_APIKEY"=>"secret_key",
 "CONTENT_TYPE"=>"application/json",
 "HTTP_USER_AGENT"=>"PostmanRuntime/7.25.0",
 "HTTP_ACCEPT"=>"*/*",
 "HTTP_CACHE_CONTROL"=>"no-cache",
...
```

* Update README.md

(cherry picked from commit f92889b360)
2021-01-23 13:55:47 -03:00
Olle Jonsson
44b6a7353a
Use RuboCop 0.84.0
- this enables each of the new Cops and marks each with the version
they appeared in

(cherry picked from commit c07fcdde43)
2021-01-23 13:55:46 -03:00
Ryan Laughlin
9da0bb7712
Consolidate #testing section of README
(cherry picked from commit 029b5481fe)
2021-01-23 13:55:46 -03:00
Lukas Spieß
614e10aa9c
Use gender-neutral pronoun in Readme
(cherry picked from commit 58b4042e35)
2021-01-23 13:55:45 -03:00
fatkodima
1d2c646ae1
Remove support for ruby 2.3
(cherry picked from commit 56361ab56b)
2021-01-23 13:55:21 -03:00
brchristian
5945fbcdf5
Use single quotes in example configuration 2021-01-16 10:19:33 -08:00
Gonzalo
55d5e370fd
test: update ruby and rails versions 2020-12-27 16:57:15 -03:00
Gonzalo Rodriguez
e40c3dda44
Merge pull request #509 from fukayatsu/fix-ruby-2.7-kw-warnings-on-increment
Fix Ruby 2.7 kwargs warning in RedisCacheStoreProxy
2020-12-27 00:31:32 -03:00
Gonzalo Rodriguez
1cb24da681
Merge pull request #512 from joevandyk/patch-1
Fix speling in README
2020-12-26 00:12:36 -03:00
Gonzalo
26476670f4
docs: update repo references after move to rack org 2020-12-25 23:51:59 -03:00
Gonzalo
cbae022df1
build: update rubocop to earlier version fixing the LineLength crash 2020-12-25 23:47:14 -03:00
Joe Van Dyk
7b3376021b
Fix speling in README 2020-12-24 12:58:47 -08:00
fukayatsu
9020201ff5 Fix Ruby 2.7 kwargs warning in RedisCacheStoreProxy 2020-12-15 23:25:37 +09:00
Gonzalo Rodriguez
6d1bc9b617
Merge pull request #493 from eliotsykes/mitigate-throttle-bypass-in-docs
Mitigate login throttle bypasses in docs
2020-08-01 17:04:47 -03:00
Eliot Sykes
03926e0b75
Mitigate login throttle bypasses in docs
This commit mitigates rate limit bypasses in the configuration
docs by normalizing the email throttle key. (The normalization process
used is the same as used by the Clearance gem.)

---

Often an authentication process normalizes email addresses and usernames
before look up, say by downcasing and removing any whitespace.

Throttles that do not perform the same normalization are vulnerable
to rate limit bypasses.

For example, an attacker can bypass a vulnerable throttle by using
unlimited case and whitespace variants for the same email address:

- Variant 1: `victim@example.org`
- Variant 2: `victim@example. org` (one whitespace)
- Variant 3: `victim@example.  org` (two whitespaces)
- Variant 4: `ViCtIm@eXaMpLe.org`
- etc, etc.

All of these variants resolve to the same email address, but allow
an attacker to bypass a vulnerable throttle. To mitigate, the email
throttle key should be normalized using the same logic the
authentication process uses for normalizing emails.
2020-07-28 11:33:52 +01:00
Tristan Toye
f92889b360
Clarify Calling HTTP_APIKey header in example (#488)
* Clarify Calling HTTP_ header in example

In trying to track down a bug here turns out I was trying to reference the wrong header shown in the readme. 

Printing our `request.env` it becomes clear this is just the full request object:

```
{"rack.version"=>[1, 3],
 "rack.errors"=>#<IO:<STDERR>>,
 "rack.multithread"=>true,
 "rack.multiprocess"=>false,
 "rack.run_once"=>false,
 "SCRIPT_NAME"=>"",
 "QUERY_STRING"=>"",
 "SERVER_PROTOCOL"=>"HTTP/1.1",
 "SERVER_SOFTWARE"=>"puma 4.3.5 Mysterious Traveller",
 "GATEWAY_INTERFACE"=>"CGI/1.2",
 "REQUEST_METHOD"=>"POST",
 "REQUEST_PATH"=>"/api/v1/....",
 "REQUEST_URI"=>"/api/v1/...",
 "HTTP_VERSION"=>"HTTP/1.1",
 "HTTP_HOST"=>"example.com",
 "HTTP_APIKEY"=>"secret_key",
 "CONTENT_TYPE"=>"application/json",
 "HTTP_USER_AGENT"=>"PostmanRuntime/7.25.0",
 "HTTP_ACCEPT"=>"*/*",
 "HTTP_CACHE_CONTROL"=>"no-cache",
...
```

* Update README.md
2020-06-07 13:11:30 -03:00
Gonzalo Rodriguez
e148cf2a73
Merge pull request #486 from olleolleolle/rubocop-084
Use RuboCop 0.84.0
2020-06-03 19:37:41 -03:00
Olle Jonsson
c07fcdde43 Use RuboCop 0.84.0
- this enables each of the new Cops and marks each with the version
they appeared in
2020-05-24 17:50:56 +02:00
Gonzalo Rodriguez
493157d555
Merge branch '6-stable' 2020-05-20 23:53:44 -03:00
Gonzalo Rodriguez
3a5d10c8b3
Bump gem version to v6.3.1 2020-05-20 23:19:26 -03:00
Gonzalo Rodriguez
02f56979f1
Merge pull request #482 from splitwise/rofreg/avoid-rails-5.2.4.3-deprecation-warning
Fix deprecation warning in Rails 5.2.4.3
2020-05-20 23:03:29 -03:00
Gonzalo Rodriguez
91596db90f
Merge pull request #482 from splitwise/rofreg/avoid-rails-5.2.4.3-deprecation-warning
Fix deprecation warning in Rails 5.2.4.3
2020-05-20 21:33:13 -03:00
Ryan Laughlin
31dd7a8d17 Override RedisCacheStoreProxy#read to always use raw: true 2020-05-20 10:34:58 -04:00
Gonzalo Rodriguez
d92f66c8d9
Merge pull request #483 from splitwise/rofreg/clean-up-documentation
Consolidate #testing section of README
2020-05-18 20:24:53 -03:00
Ryan Laughlin
029b5481fe Consolidate #testing section of README 2020-05-18 17:41:58 -04:00
Ryan Laughlin
d5a240d9d2 Fix deprecation warning in Rails 5.2.4.3 2020-05-18 17:14:12 -04:00
Gonzalo Rodriguez
fe5deb9093
Merge branch '6-stable' 2020-04-26 13:09:29 -03:00
Gonzalo Rodriguez
35e4983400
doc: add Testing section to the README 2020-04-26 13:09:13 -03:00
Gonzalo Rodriguez
33b7c3b233
Merge branch '6-stable' 2020-04-26 12:39:42 -03:00
Gonzalo Rodriguez
aa071aa5df
Bump gem version to v6.3.0 2020-04-26 11:57:31 -03:00
Gonzalo Rodriguez
76bbada48f
ci: update rubies 2020-04-25 16:30:34 -03:00