feat(lib): annotate cookies with what rule was passed (#576)
* feat(lib): annotate cookies with what rule was passed Anubis JWTs now contain a policyRule claim with the cryptographic hash of the rule that it passed. This is intended to help with a future move away from proof of work being the default. Signed-off-by: Xe Iaso <me@xeiaso.net> * test(lib): fix cookie storage logic Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
28ab29389c
commit
fbbab5a035
4 changed files with 164 additions and 23 deletions
12
lib/testdata/rule_change.yaml
vendored
Normal file
12
lib/testdata/rule_change.yaml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
bots:
|
||||
- name: old-rule
|
||||
path_regex: ^/old$
|
||||
action: CHALLENGE
|
||||
|
||||
- name: new-rule
|
||||
path_regex: ^/new$
|
||||
action: CHALLENGE
|
||||
|
||||
status_codes:
|
||||
CHALLENGE: 401
|
||||
DENY: 403
|
||||
Loading…
Add table
Add a link
Reference in a new issue