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

WAF_Policy: allow use of policy/use refering an existing ASM Policy on the BIG-IP #863

Open
amolari opened this issue Jul 31, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@amolari
Copy link

amolari commented Jul 31, 2024

Environment

  • Application Services Version: 3.52.0
  • BIG-IP Version: 17.1.1.3

Summary

It would be expected that in the WAF_Policy class, one can refer to an existing ASM policy.
For example, the LTM policy rule's action refers to the WAF_Policy object, which refers to an existing (already installed on the BIG-IP) on the BIG-IP (pointer).

[...]
            "actions": [
              {
                "event": "request",
                "type": "waf",
                "enabled": true,
                "policy": {
                  "use": "myPolicyA"
                }
              }
            ]
          }
        ],
        "strategy": "best-match",
        "class": "Endpoint_Policy"
      },
      "myPolicyA": {
        "class": "WAF_Policy",
        "policy": {
          "use": "/Common/policy_a"
        }
      },
[...]

Expected Behavior

Scenario mentioned above works. The WAF_Policy class object is a simple pointer to an existing ASM policy.

Actual Behavior

Not working, we get the following error:
{"code":422,"errors":["/Tenant/App/myPolicyA/policy: should NOT have additional properties"],"declarationFullId":"","message":"declaration is invalid","declarationId":"691121"}

@amolari amolari added bug Something isn't working untriaged Issue needs to be reviewed for validity labels Jul 31, 2024
@JuergenMang
Copy link

You can use following snippet to assign an existing waf policy. There is no requirement to define a policy object.

"vs_waf": {
    "class": "Service_HTTPS",
    "policyWAF": {
        "bigip": "/Common/asm-policy-name"
    }
}

@amolari
Copy link
Author

amolari commented Aug 2, 2024

@JuergenMang Indeed, we're using today what you've mentioned. But we have a special request/use-case where we would like to switch easily the declaration from using existing (on the BIG-IP) ASM policies to URL-fetched policies.

@sunitharonan sunitharonan removed the untriaged Issue needs to be reviewed for validity label Aug 5, 2024
@sunitharonan
Copy link

Thanks Alexandre, we have created AUTOTOOL-4470 and added to our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants