You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(config): deprecate the report_as field for challenges
This was a bad idea when it was added and it is irresponsible to
continue to have it. It causes more UX problems than it fixes with
slight of hand.
Closes: #1310Closes: #1307
Signed-off-by: Xe Iaso <me@xeiaso.net>
### Deprecate `report_as` in challenge configuration
29
+
30
+
Previously Anubis let you lie to users about the difficulty of a challenge to interfere with operators of malicious scrapers as a psyops attack:
31
+
32
+
```yaml
33
+
bots:
34
+
# Punish any bot with "bot" in the user-agent string
35
+
# This is known to have a high false-positive rate, use at your own risk
36
+
- name: generic-bot-catchall
37
+
user_agent_regex: (?i:bot|crawler)
38
+
action: CHALLENGE
39
+
challenge:
40
+
difficulty: 16# impossible
41
+
report_as: 4# lie to the operator
42
+
algorithm: slow # intentionally waste CPU cycles and time
43
+
```
44
+
45
+
This has turned out to be a bad idea and has been removed.
46
+
47
+
If you are using this setting, you will get a warning in your logs. To remove this warning, remove this setting from your policy file.
48
+
28
49
### Logging customization
29
50
30
51
Anubis now supports the ability to log to multiple backends ("sinks"). This allows you to have Anubis [log to a file](./admin/policies.mdx#file-sink) instead of just logging to standard out. You can also customize the [logging level](./admin/policies.mdx#log-levels) in the policy file:
| `difficulty` | `4` | The challenge difficulty (number of leading zeros) for proof-of-work. See [Why does Anubis use Proof-of-Work?](/docs/design/why-proof-of-work) for more details. |
96
-
| `report_as` | `4` | What difficulty the UI should report to the user. Useful for messing with industrial-scale scraping efforts. |
97
95
| `algorithm` | `"fast"` | The challenge method to use. See [the list of challenge methods](./configuration/challenges/) for more information. |
s.logger.Warn("[DEPRECATION] the report_as field in this bot rule is deprecated, see https://github.com/TecharoHQ/anubis/issues/1310 for more information", "bot_name", rule.Name, "difficulty", rule.Challenge.Difficulty, "report_as", rule.Challenge.ReportAs)
172
172
}
173
173
ifrule.Challenge.Algorithm=="" {
174
174
rule.Challenge.Algorithm=chall.Method
@@ -648,7 +648,6 @@ func (s *Server) check(r *http.Request, lg *slog.Logger) (policy.CheckResult, *p
0 commit comments