Rename the settings whose names do not say what they control (closes #234)
check / check (push) Waiting to run
check / check (push) Waiting to run
Applies the setting renames of the naming audit under the SWW_WAF_ and SWW_RPROXY_ prefixes, with sneak's names for the IP reputation cache time and the two time limits, which now take milliseconds. The rproxy log field default_disposition becomes waf_backend_no_answer, and config.Config and config.FromEnvironment become config.WAF and config.WAFFromEnvironment. Go fields, test names and prose follow. No aliases; nothing reads the old names. Model: opus-5-5
This commit is contained in:
1 parent
101cc0aba5
commit
4be0b6e7fc
97 files changed
+2030
-1810
No files matched your search
+2
-2
@@ -214,8 +214,8 @@ main() {
|
||||
wait_for "waf did not stop in order" logged "$WAF" '"msg":"stopped"'
|
||||
[ "$(status_from 203.0.113.9 /)" = 200 ] ||
|
||||
fail "with waf stopped, the app did not answer through rproxy"
|
||||
wait_for "rproxy logged no request SWW_RPROXY_DEFAULT_DISPOSITION decided" \
|
||||
logged "$APP" '"default_disposition":true'
|
||||
wait_for "rproxy logged no request SWW_RPROXY_WAF_BACKEND_NO_ANSWER_DISPOSITION decided" \
|
||||
logged "$APP" '"waf_backend_no_answer":true'
|
||||
docker exec "$APP" /usr/local/bin/sww healthcheck ||
|
||||
fail "with waf stopped, the app's health check failed"
|
||||
echo "example-app: with waf stopped, the app answers through rproxy"
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
# rproxy asks it there unless SWW_RPROXY_WAF_BACKEND says otherwise. Unless
|
||||
# SWW_WAF_STATE_DIR is set, the state files go in bin/state, beside the binary,
|
||||
# and unless SWW_WAF_CACHE_DIR is set, the cache files go in bin/cache. Unless
|
||||
# SWW_WAF_RULES_DIR is set, the rule files are those of share/rules.d, which the
|
||||
# SWW_WAF_RULE_FILES_DIR is set, the rule files are those of share/rules.d, which the
|
||||
# image ships.
|
||||
set -eu
|
||||
|
||||
@@ -37,9 +37,9 @@ main() {
|
||||
export SWW_WAF_CACHE_DIR
|
||||
mkdir -p "$SWW_WAF_CACHE_DIR"
|
||||
fi
|
||||
if [ -z "${SWW_WAF_RULES_DIR+set}" ]; then
|
||||
SWW_WAF_RULES_DIR="$ROOT/share/rules.d"
|
||||
export SWW_WAF_RULES_DIR
|
||||
if [ -z "${SWW_WAF_RULE_FILES_DIR+set}" ]; then
|
||||
SWW_WAF_RULE_FILES_DIR="$ROOT/share/rules.d"
|
||||
export SWW_WAF_RULE_FILES_DIR
|
||||
fi
|
||||
SWW_WAF_LISTEN_ADDR="${SWW_WAF_LISTEN_ADDR:-:8090}"
|
||||
SWW_RPROXY_WAF_BACKEND="${SWW_RPROXY_WAF_BACKEND:-http://127.0.0.1:${SWW_WAF_LISTEN_ADDR##*:}}"
|
||||
|
||||
Reference in new issue
Block a user