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

Fix: allow sub-statements of IPSetReferenceStatements #156

Conversation

vboufleur
Copy link
Contributor

@vboufleur vboufleur commented Aug 17, 2023

Hi!

This PR is for allowing IPSetReferenceStatement.ARN entries which references a aws-firewall-factory controlled ipset (i.e. the name of the ipset) inside AND, OR and NOT statements (as sub-statements).

Before this PR, this policy would fail:

{
  "Name": "only-allow-the-good-guys",
  "Statement": {
    "AndStatement": {
      "Statements": [
        {
          "ByteMatchStatement": {
            "SearchString": "/good/guys/entrypoint",
            "FieldToMatch": {
              "UriPath": {}
            },
            "TextTransformations": [
              {
                "Priority": 0,
                "Type": "NONE"
              }
            ],
            "PositionalConstraint": "STARTS_WITH"
          }
        },
        {
          "NotStatement": {
            "Statement": {
              "IPSetReferenceStatement": {
                "ARN": "GoodGuysIPs"
              }
            }
          }
        }
      ]
    }
  },
  "Action": {
    "Block": {}
  },
  "VisibilityConfig": {
    "SampledRequestsEnabled": true,
    "CloudWatchMetricsEnabled": true
  }
}

Now its working ^^

@daknhh
Copy link
Contributor

daknhh commented Aug 21, 2023

Thank you, we are currently working on the aws firewall factory 4.0 where we changed all configs to ts and also fix this bug

@daknhh
Copy link
Contributor

daknhh commented Sep 1, 2023

Fixed here: https://github.com/globaldatanet/aws-firewall-factory/releases/tag/4.0.0 -> thank you <3

@daknhh daknhh closed this Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants