Skip to content
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

XFF is not taken into account in a and_statement #129

Open
Taeglin opened this issue Dec 4, 2023 · 0 comments
Open

XFF is not taken into account in a and_statement #129

Taeglin opened this issue Dec 4, 2023 · 0 comments

Comments

@Taeglin
Copy link

Taeglin commented Dec 4, 2023

What is the current behavior?
XFF is not taken into account in a and_statement

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

`{
name = "Block_Non_Admin_IPs_For_Admin"
priority = "1"

  action = "block"

  visibility_config = {
    metric_name = "Allow_Admin_IPs"
  }

  and_statement = {
    statements = [ # 2 or more statements are required for AND
      {
        not_statement = {
          ip_set_reference_statement = {
            arn = aws_wafv2_ip_set.admin_IPs_cloudfront.arn

            ip_set_forwarded_ip_config = {
              fallback_behavior = "NO_MATCH"
              header_name       = "X-Forwarded-For"
              position          = "ANY"
            }
          }
        }
      },
      {
        byte_match_statement = {
          field_to_match = {
            uri_path = "{}"
          }

          positional_constraint = "STARTS_WITH"
          search_string         = "/admin"
          priority              = 0
          type                  = "NONE"
        }
      }
    ]
  }
}`

What is the expected behavior?

When running terraform plan, I should see the XFF added in the rule but it's not
Software versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant