-
Notifications
You must be signed in to change notification settings - Fork 1
[Hotfix] WAF 차단으로 인한 로그인 실패 문제 임시 조치 #203
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -90,22 +90,79 @@ resource "aws_wafv2_web_acl" "this" { | |||||||||||||||||||||||||||||||||||||||||||||
| rule { | ||||||||||||||||||||||||||||||||||||||||||||||
| name = "AWS-Managed-Bot-Control-Rule-Set" | ||||||||||||||||||||||||||||||||||||||||||||||
| priority = 40 | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| override_action { | ||||||||||||||||||||||||||||||||||||||||||||||
| none {} | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| managed_rule_group_statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| vendor_name = "AWS" | ||||||||||||||||||||||||||||||||||||||||||||||
| name = "AWSManagedRulesBotControlRuleSet" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| rule_action_override { | ||||||||||||||||||||||||||||||||||||||||||||||
| name = "SignalNonBrowserUserAgent" | ||||||||||||||||||||||||||||||||||||||||||||||
| action_to_use { | ||||||||||||||||||||||||||||||||||||||||||||||
| count {} | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| visibility_config { | ||||||||||||||||||||||||||||||||||||||||||||||
| cloudwatch_metrics_enabled = true | ||||||||||||||||||||||||||||||||||||||||||||||
| metric_name = "aws-managed-bot-control" | ||||||||||||||||||||||||||||||||||||||||||||||
| sampled_requests_enabled = true | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| # 임시 조치로 ua가 node일 경우만 통과시킴 | ||||||||||||||||||||||||||||||||||||||||||||||
| rule { | ||||||||||||||||||||||||||||||||||||||||||||||
| name = "Block-Non-Node-User-Agents" | ||||||||||||||||||||||||||||||||||||||||||||||
| priority = 41 | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| action { | ||||||||||||||||||||||||||||||||||||||||||||||
| block {} | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| and_statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| label_match_statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| scope = "LABEL" | ||||||||||||||||||||||||||||||||||||||||||||||
| key = "awswaf:managed:aws:bot-control:signal:non_browser_user_agent" | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| not_statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| byte_match_statement { | ||||||||||||||||||||||||||||||||||||||||||||||
| search_string = "node" | ||||||||||||||||||||||||||||||||||||||||||||||
| field_to_match { | ||||||||||||||||||||||||||||||||||||||||||||||
| single_header { | ||||||||||||||||||||||||||||||||||||||||||||||
| name = "user-agent" | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| positional_constraint = "CONTAINS" | ||||||||||||||||||||||||||||||||||||||||||||||
| text_transformation { | ||||||||||||||||||||||||||||||||||||||||||||||
| priority = 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| type = "NONE" | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+141
to
+151
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 케이스 민감도 때문에 실제 Node UA가 차단될 수 있음 (치명적)
아래 패치를 적용하세요: - text_transformation {
- priority = 0
- type = "NONE"
- }
+ text_transformation {
+ priority = 0
+ type = "LOWERCASE"
+ }또는 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| visibility_config { | ||||||||||||||||||||||||||||||||||||||||||||||
| cloudwatch_metrics_enabled = true | ||||||||||||||||||||||||||||||||||||||||||||||
| metric_name = "block-non-node-uas" | ||||||||||||||||||||||||||||||||||||||||||||||
| sampled_requests_enabled = true | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| # Anonymous IP list | ||||||||||||||||||||||||||||||||||||||||||||||
| rule { | ||||||||||||||||||||||||||||||||||||||||||||||
| name = "AWS-Managed-Anonymous-IP-List" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User-Agent 기반 우회는 쉽게 스푸핑 가능 — 추가 방어선 필요
임시 조치라 하더라도 UA 문자열은 누구나 위조할 수 있습니다. 최소한 다음 중 하나 이상을 병행하세요:
향후 커스텀 UA로 전환 시, UA만으로 신뢰하지 말고 상기 수단 중 하나를 함께 적용해 주세요.
🤖 Prompt for AI Agents