-
-
Notifications
You must be signed in to change notification settings - Fork 392
feat: request weight #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: request weight #608
Conversation
Signed-off-by: Xe Iaso <[email protected]>
Signed-off-by: Xe Iaso <[email protected]>
| ogCacheConsiderHost = flag.Bool("og-cache-consider-host", false, "enable or disable the use of the host in the Open Graph tag cache") | ||
| extractResources = flag.String("extract-resources", "", "if set, extract the static resources to the specified folder") | ||
| webmasterEmail = flag.String("webmaster-email", "", "if set, displays webmaster's email on the reject page for appeals") | ||
| valkeyURL = flag.String("valkey-url", "", "Valkey URL for Anubis' state layer") |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| ogCacheConsiderHost = flag.Bool("og-cache-consider-host", false, "enable or disable the use of the host in the Open Graph tag cache") | ||
| extractResources = flag.String("extract-resources", "", "if set, extract the static resources to the specified folder") | ||
| webmasterEmail = flag.String("webmaster-email", "", "if set, displays webmaster's email on the reject page for appeals") | ||
| valkeyURL = flag.String("valkey-url", "", "Valkey URL for Anubis' state layer") |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| ogCacheConsiderHost = flag.Bool("og-cache-consider-host", false, "enable or disable the use of the host in the Open Graph tag cache") | ||
| extractResources = flag.String("extract-resources", "", "if set, extract the static resources to the specified folder") | ||
| webmasterEmail = flag.String("webmaster-email", "", "if set, displays webmaster's email on the reject page for appeals") | ||
| valkeyURL = flag.String("valkey-url", "", "Valkey URL for Anubis' state layer") |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| @@ -0,0 +1,86 @@ | |||
| package valkey | |||
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| @@ -0,0 +1,86 @@ | |||
| package valkey | |||
Check failure
Code scanning / check-spelling
Check File Path Error
| } | ||
| } | ||
|
|
||
| func (prc *PassRateChecker) Hash() string { |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| } | ||
|
|
||
| func (prc *PassRateChecker) Hash() string { | ||
| return internal.SHA256sum(fmt.Sprintf("pass rate checker::%s", prc.header)) |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| return internal.SHA256sum(fmt.Sprintf("pass rate checker::%s", prc.header)) | ||
| } | ||
|
|
||
| func (prc *PassRateChecker) Check(r *http.Request) (bool, error) { |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| } | ||
|
|
||
| func (prc *PassRateChecker) Check(r *http.Request) (bool, error) { | ||
| data, err := prc.store.MultiGetInt(r.Context(), [][]string{ |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
|
|
||
| func (prc *PassRateChecker) Check(r *http.Request) (bool, error) { | ||
| data, err := prc.store.MultiGetInt(r.Context(), [][]string{ | ||
| {"pass_rate", prc.header, r.Header.Get(prc.header), "pass"}, |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
Replaces #608 This is a big one and will be what makes Anubis a generic web application firewall. This introduces the WEIGH option, allowing administrators to have facets of request metadata add or remove "weight", or the level of suspicion. This really makes Anubis weigh the soul of requests. Signed-off-by: Xe Iaso <[email protected]>
Replaces #608 This is a big one and will be what makes Anubis a generic web application firewall. This introduces the WEIGH option, allowing administrators to have facets of request metadata add or remove "weight", or the level of suspicion. This really makes Anubis weigh the soul of requests. Signed-off-by: Xe Iaso <[email protected]>
* feat(lib): implement request weight Replaces #608 This is a big one and will be what makes Anubis a generic web application firewall. This introduces the WEIGH option, allowing administrators to have facets of request metadata add or remove "weight", or the level of suspicion. This really makes Anubis weigh the soul of requests. Signed-off-by: Xe Iaso <[email protected]> * fix(lib): maintain legacy challenge behavior Signed-off-by: Xe Iaso <[email protected]> * fix(lib): make weight have dedicated checkers for the hashes Signed-off-by: Xe Iaso <[email protected]> * feat(data): convert some rules over to weight points Signed-off-by: Xe Iaso <[email protected]> * docs: document request weight Signed-off-by: Xe Iaso <[email protected]> * fix(CHANGELOG): spelling error Signed-off-by: Xe Iaso <[email protected]> * chore: spelling Signed-off-by: Xe Iaso <[email protected]> * docs: fix links to challenge information Signed-off-by: Xe Iaso <[email protected]> * docs(policies): fix formatting Signed-off-by: Xe Iaso <[email protected]> * fix(config): make default weight adjustment 5 Signed-off-by: Xe Iaso <[email protected]> --------- Signed-off-by: Xe Iaso <[email protected]>
* feat(lib): implement request weight Replaces TecharoHQ#608 This is a big one and will be what makes Anubis a generic web application firewall. This introduces the WEIGH option, allowing administrators to have facets of request metadata add or remove "weight", or the level of suspicion. This really makes Anubis weigh the soul of requests. Signed-off-by: Xe Iaso <[email protected]> * fix(lib): maintain legacy challenge behavior Signed-off-by: Xe Iaso <[email protected]> * fix(lib): make weight have dedicated checkers for the hashes Signed-off-by: Xe Iaso <[email protected]> * feat(data): convert some rules over to weight points Signed-off-by: Xe Iaso <[email protected]> * docs: document request weight Signed-off-by: Xe Iaso <[email protected]> * fix(CHANGELOG): spelling error Signed-off-by: Xe Iaso <[email protected]> * chore: spelling Signed-off-by: Xe Iaso <[email protected]> * docs: fix links to challenge information Signed-off-by: Xe Iaso <[email protected]> * docs(policies): fix formatting Signed-off-by: Xe Iaso <[email protected]> * fix(config): make default weight adjustment 5 Signed-off-by: Xe Iaso <[email protected]> --------- Signed-off-by: Xe Iaso <[email protected]>
This is a big one and will be what makes Anubis a generic web application firewall. This introduces the WEIGH option, allowing administrators to have facets of request metadata add or remove "weight", or the level of suspicion. This really makes Anubis weigh the soul of requests.
Checklist:
[Unreleased]section of docs/docs/CHANGELOG.mdnpm run test:integration(unsupported on Windows, please use WSL)