waf.tf 1.1 KB

123456789101112131415161718192021222324252627
  1. module "waf" {
  2. source = "../../submodules/wafv2"
  3. # Custom to resource
  4. allowed_ips = [] # bypasses filters, so should not be needed/used unless warranted. We previously did var.admin_remote_ipset, but that seems like a bad idea
  5. additional_blocked_ips = [] # NOTE: There is a standard list in the submodule
  6. admin_ips = concat(local.zscalar_ips, local.admin_ips)
  7. resource_arn = aws_alb.portal.arn
  8. fqdns = module.public_dns_record.forward # first entry in list will be the WAF name
  9. excluded_rules_AWSManagedRulesCommonRuleSet = [
  10. "SizeRestrictions_BODY",
  11. "GenericRFI_BODY", # Blocks portal lambda MSOCI-2060
  12. "CrossSiteScripting_BODY", # Blocks portal API MSOCI-2121
  13. "EC2MetaDataSSRF_BODY", # Blocks portal API MSOCI-2121
  14. ]
  15. excluded_rules_AWSManagedRulesUnixRuleSet = [
  16. "UNIXShellCommandsVariables_BODY", # Blocks portal API MSOCI-2121
  17. ]
  18. # These are passed through and should be the same for module
  19. tags = merge(local.standard_tags, var.tags)
  20. aws_partition = var.aws_partition
  21. aws_region = var.aws_region
  22. aws_account_id = var.aws_account_id
  23. }