-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new templating feature to allow to quickly override the default v…
…alues of settings and custom configurations. You can also precise steps to follow in the UI to help the user configure services.
- Loading branch information
1 parent
9289864
commit 57a1e22
Showing
20 changed files
with
1,495 additions
and
1,088 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"id": "templates", | ||
"name": "Templates", | ||
"description": "Fake core plugin for internal templates.", | ||
"version": "1.0", | ||
"stream": "yes", | ||
"settings": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} // TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
{ | ||
"name": "Basic security level", | ||
"settings": { | ||
"SERVER_NAME": "www.example.com", | ||
"USE_REVERSE_PROXY": "yes", | ||
"REVERSE_PROXY_HOST": "http://upstream-server:8080", | ||
"REVERSE_PROXY_URL": "/", | ||
"REVERSE_PROXY_CUSTOM_HOST": "", | ||
"REVERSE_PROXY_SSL_SNI": "no", | ||
"REVERSE_PROXY_SSL_SNI_NAME": "", | ||
"REVERSE_PROXY_WS": "no", | ||
"REVERSE_PROXY_KEEPALIVE": "no", | ||
"AUTO_LETS_ENCRYPT": "yes", | ||
"USE_LETS_ENCRYPT_STAGING": "no", | ||
"ALLOWED_METHODS": "GET|POST|HEAD|OPTIONS|PUT|DELETE|PATCH", | ||
"MAX_CLIENT_SIZE": "100m", | ||
"HTTP2": "yes", | ||
"HTTP3": "yes", | ||
"SSL_PROTOCOLS": "TLSv1.2 TLSv1.3", | ||
"COOKIE_FLAGS": "* SameSite=Lax", | ||
"CONTENT_SECURITY_POLICY": "", | ||
"PERMISSIONS_POLICY": "", | ||
"KEEP_UPSTREAM_HEADERS": "*", | ||
"REFERRER_POLICY": "no-referrer-when-downgrade", | ||
"USE_CORS": "yes", | ||
"CORS_ALLOW_ORIGIN": "*", | ||
"USE_BAD_BEHAVIOR": "yes", | ||
"BAD_BEHAVIOR_STATUS_CODES": "400 401 403 404 405 429 444", | ||
"BAD_BEHAVIOR_BAN_TIME": "3600", | ||
"BAD_BEHAVIOR_THRESHOLD": "30", | ||
"BAD_BEHAVIOR_COUNT_TIME": "60", | ||
"USE_ANTIBOT": "no", | ||
"ANTIBOT_URI": "/challenge", | ||
"ANTIBOT_RECAPTCHA_SCORE": "0.7", | ||
"ANTIBOT_RECAPTCHA_SITEKEY": "", | ||
"ANTIBOT_RECAPTCHA_SECRET": "", | ||
"ANTIBOT_HCAPTCHA_SITEKEY": "", | ||
"ANTIBOT_HCAPTCHA_SECRET": "", | ||
"ANTIBOT_TURNSTILE_SITEKEY": "", | ||
"ANTIBOT_TURNSTILE_SECRET": "", | ||
"USE_BLACKLIST": "yes", | ||
"USE_DNSBL": "no", | ||
"USE_LIMIT_CONN": "yes", | ||
"LIMIT_CONN_MAX_HTTP1": "25", | ||
"LIMIT_CONN_MAX_HTTP2": "200", | ||
"USE_LIMIT_REQ": "yes", | ||
"LIMIT_REQ_URL": "/", | ||
"LIMIT_REQ_RATE": "5r/s" | ||
}, | ||
"configs": ["modsec/anomaly_score.conf"], | ||
"steps": [ | ||
{ | ||
"title": "Web service - Front service", | ||
"subtitle": "Configure your web service facing your clients", | ||
"settings": [ | ||
"SERVER_NAME", | ||
"AUTO_LETS_ENCRYPT", | ||
"USE_LETS_ENCRYPT_STAGING" | ||
] | ||
}, | ||
{ | ||
"title": "Web service - Upstream server", | ||
"subtitle": "Configure the upstream server to be protected by BunkerWeb", | ||
"settings": [ | ||
"USE_REVERSE_PROXY", | ||
"REVERSE_PROXY_HOST", | ||
"REVERSE_PROXY_URL", | ||
"REVERSE_PROXY_CUSTOM_HOST", | ||
"REVERSE_PROXY_SSL_SNI", | ||
"REVERSE_PROXY_SSL_SNI_NAME", | ||
"REVERSE_PROXY_WS", | ||
"REVERSE_PROXY_KEEPALIVE" | ||
] | ||
}, | ||
{ | ||
"title": "HTTP - General", | ||
"subtitle": "Configure the settings related to the HTTP(S) protocol", | ||
"settings": [ | ||
"MAX_CLIENT_SIZE", | ||
"ALLOWED_METHODS", | ||
"HTTP2", | ||
"HTTP3", | ||
"SSL_PROTOCOLS" | ||
] | ||
}, | ||
{ | ||
"title": "HTTP - Headers", | ||
"subtitle": "Configure the settings related to the HTTP headers", | ||
"settings": [ | ||
"COOKIE_FLAGS", | ||
"CONTENT_SECURITY_POLICY", | ||
"PERMISSIONS_POLICY", | ||
"USE_CORS", | ||
"CORS_ALLOW_ORIGIN", | ||
"KEEP_UPSTREAM_HEADERS", | ||
"REFERRER_POLICY" | ||
] | ||
}, | ||
{ | ||
"title": "Security - Bad behavior", | ||
"subtitle": "Configure the settings related to the automatic ban when a bad behavior is detected.", | ||
"settings": [ | ||
"USE_BAD_BEHAVIOR", | ||
"BAD_BEHAVIOR_STATUS_CODES", | ||
"BAD_BEHAVIOR_BAN_TIME", | ||
"BAD_BEHAVIOR_THRESHOLD", | ||
"BAD_BEHAVIOR_COUNT_TIME" | ||
] | ||
}, | ||
{ | ||
"title": "Security - Blacklisting", | ||
"subtitle": "Configure the settings related to the external blacklists.", | ||
"settings": ["USE_BLACKLIST", "USE_DNSBL"] | ||
}, | ||
{ | ||
"title": "Security - Limiting", | ||
"subtitle": "Configure the settings related to limiting requests and connections.", | ||
"settings": [ | ||
"USE_LIMIT_CONN", | ||
"LIMIT_CONN_MAX_HTTP1", | ||
"LIMIT_CONN_MAX_HTTP2", | ||
"LIMIT_CONN_MAX_HTTP3", | ||
"USE_LIMIT_REQ", | ||
"LIMIT_REQ_URL", | ||
"LIMIT_REQ_RATE" | ||
] | ||
}, | ||
{ | ||
"title": "Security - Antibot", | ||
"subtitle": "Configure the settings about bot detection", | ||
"settings": [ | ||
"USE_ANTIBOT", | ||
"ANTIBOT_URI", | ||
"ANTIBOT_RECAPTCHA_SCORE", | ||
"ANTIBOT_RECAPTCHA_SITEKEY", | ||
"ANTIBOT_RECAPTCHA_SECRET", | ||
"ANTIBOT_HCAPTCHA_SITEKEY", | ||
"ANTIBOT_HCAPTCHA_SECRET", | ||
"ANTIBOT_TURNSTILE_SITEKEY", | ||
"ANTIBOT_TURNSTILE_SECRET" | ||
] | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/common/core/templates/templates/low/configs/modsec/anomaly_score.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SecAction \ | ||
"id:900110,\ | ||
phase:1,\ | ||
pass,\ | ||
t:none,\ | ||
nolog,\ | ||
tag:'OWASP_CRS',\ | ||
setvar:tx.inbound_anomaly_score_threshold=6,\ | ||
setvar:tx.outbound_anomaly_score_threshold=5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} // TODO |
Oops, something went wrong.