mirror of
https://github.com/ADD-SP/ngx_waf.git
synced 2026-04-26 14:05:52 +03:00
[GH-ISSUE #85] Rule 一些疑問和許願 #61
Labels
No labels
MacOS
Nginx
OpenResty
Tengine
bug
documentation
enhancement
needs-investigation
pull-request
question
stale
stale
stale
timeout
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ngx_waf#61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ADeeeee on GitHub (Jan 20, 2022).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/85
測試環境:
Ubuntu 20.04.3 LTS
nginx version: nginx/1.18.0 (Ubuntu)
built with OpenSSL 1.1.1f 31 Mar 2020
TLS SNI support enabled
ngx_waf: 自己照文件流程 compile 出來的 LTS 1.18 版
規則參考:
https://docs.addesp.com/ngx_waf/advance/rule.html#ip-whitelist
https://github.com/ADD-SP/ngx_waf/issues/29
問題:
因為有時候 IP 白名單沒辦法一次加到全部,為方便作業所以會統一用內部規定的 user-agent 來執行 API 或是內部的 request,希望可以直接把這些 request 全部利用 user-agent 一次搞定,而不會開發過程時常為 IP 白名單的事情操勞
參考 AWS WAF 運作上各規則基本上也都是有一黑一白的作法,讓使用者能比較彈性應對各種需求,建議以下五個項目都也要有白名單
畢竟如果規則語法一時不查,可能會出大事
許願:
希望規則的文件上可以放上一些範例和寫法,畢竟有時候用文字敘述會不太確定實際運作狀況和語法如何
如 URL 是不是有含 URI 的部份,如我有額外參考這篇 issue 才大概知道怎麼寫
Ref. https://github.com/ADD-SP/ngx_waf/issues/29
希望文件能完整的將 current 和 LTS 版本的設定內容切清楚,譬如 waf_cc_deny 那部份就會混雜,不確定是否支援
Ref. https://github.com/ADD-SP/ngx_waf/issues/84
*Edit for wrong quote.
@ADD-SP commented on GitHub (Jan 20, 2022):
Questions
Currentversion, the relevant code has been removed and its functionality replaced bymodsecurity.uri, it was wrong to name the rule fileurlat first, but now it's not going to be corrected, keep it as it is. Forhttps://www.example.com/test/client?q=xxx,urlis/test/client, does not contain the schema, domain, and query string.Advices
Currentversion is clearly marked, such as the green text box. But some details are really easy to confuse, I will improve.@ADeeeee commented on GitHub (Jan 21, 2022):
沒問題,感謝解答
但今天測試又遇到一個問題,請問我 rule 裡面有辦法新增註解嗎?我寫了註解下 nginx -t 檢查語法都會出錯
尤其是 ip 的部份,加了一堆希望能有註解可以一目了然
@ADD-SP commented on GitHub (Jan 21, 2022):
This feature is not available.
@stale[bot] commented on GitHub (Jan 28, 2022):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
此 issue 因为最近没有任何活动已经被标记,如果在此之后的一段时间内仍没有任何活动则会被关闭。感谢您对项目的支持。