turbot / steampipe-plugin-azure

Use SQL to instantly query Azure resources across regions and subscriptions. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/azure
Apache License 2.0
37 stars 17 forks source link

Missing `web_application_firewall_configuration details` in Steampipe Azure plugin #765

Closed Priyanka-Chatterjee-2000 closed 3 months ago

Priyanka-Chatterjee-2000 commented 4 months ago

Description: I am experiencing an issue with the Steampipe Azure plugin where the web_application_firewall_configuration details are not being populated as expected when querying the azure_application_gateway table. Specifically, the firewallMode field which is needed for query development, along with other relevant configuration details, is missing.

Steps to Reproduce:

Create an Azure Application Gateway with a WAF policy using the Azure CLI or Azure Portal. Verify the creation of the WAF policy using az network application-gateway waf-policy list:

az network application-gateway waf-policy list
[
  {
    "applicationGateways": [
      {
        "id": "/subscriptions/d46........................./resourceGroups/demo/providers/Microsoft.Network/applicationGateways/test-pri",
        "resourceGroup": "demo"
      }
    ],
    "customRules": [],
    "etag": "W/\"8e.................................\"",
    "id": "/subscriptions/d46........................./resourceGroups/demo/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/test-2",
    "location": "westus2",
    "managedRules": {
      "exclusions": [],
      "managedRuleSets": [
        {
          "ruleGroupOverrides": [],
          "ruleSetType": "OWASP",
          "ruleSetVersion": "3.2"
        }
      ]
    },
    "name": "test-2",
    "policySettings": {
      "fileUploadEnforcement": true,
      "fileUploadLimitInMb": 100,
      "maxRequestBodySizeInKb": 128,
      "mode": "Detection",
      "requestBodyCheck": true,
      "requestBodyEnforcement": true,
      "requestBodyInspectLimitInKB": 128,
      "state": "Enabled"
    },
    "provisioningState": "Succeeded",
    "resourceGroup": "demo",
    "tags": {},
    "type": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"
  }
]

Attempt to query the web_application_firewall_configuration details using Steampipe:

select web_application_firewall_configuration from azure_application_gateway;

Expected Behavior: The web_application_firewall_configuration field should contain the WAF configuration details, including the firewallMode.

Actual Behavior: The query returns null for the web_application_firewall_configuration field:

{
 "rows": [
  {
   "web_application_firewall_configuration": null
  }
 ],
 "metadata": null
}

Additional Information: