DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Azure Deployment Using FileZilla
  • Mastering Scalability and Performance: A Deep Dive Into Azure Load Balancing Options
  • Running a Self-Hosted WAF in Production: Practical Lessons From SafeLine
  • Supercharging AI Agents with Azure Context: A Hands-On Guide to Azure MCP

Trending

  • Going All In On the JVM 25 Virtual Threads
  • Java 8 Optional - Avoid Null and NullPointerException Altogether - and Keep It Pretty
  • Who Should Grade Your AI? Rules vs LLM Judges vs Humans
  • Replay, Scheduling, and Throttling: Engineering a Self-Service Kafka Streaming Tool at Scale

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. How to Troubleshoot Azure WAF

How to Troubleshoot Azure WAF

Microsoft Azure offers a WAF solution, for which a quick guide for debugging it can be useful. Let's take a closer look!

By 
Thomas Jardinet
DZone Core CORE ·
Updated Oct. 18, 19 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
6.9K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

gateway

If you're having trouble with the Azure Application Gateway, take a look at this quick troubleshooting guide.

What is Azure Application Gateway?

Azure Application Gateway is a (WAF) that protects web applications against common vulnerabilities and exploitation. It is based on OWASP rules and follows all the rules 3.0 or 2.2.9 of OWASP (Open Web Application Security Project). Microsoft tells us that these rules update themselves, which does not prevent it from having rules that generate false positives. This may also be due to a poorly implemented application, or a perfectible web framework, or perhaps that should be updated. It, therefore, seems useful to know how to debug it if you plan to use it in a project. This article is, therefore, a quick guide for debugging your WAF.

You may also enjoy: Understanding Azure Load Balancing Solutions

Before Troubleshooting

  • First, ensure that the "WAF Diagnostics Logs" are enabled. Make sure you have access to the administration console (I know it goes without saying, but it gets better by saying it).
  • Second, find out the mode in which the WAF is located:
    • Detection: Monitor and log all threat alerts. You enable the recording of diagnostics for Application Gateway in the Diagnostics section. You must also check that the WAF log is selected and activated. The web application firewall does not block incoming requests when it operates in detection mode.
    • Prevention: Blocks intrusions and attacks detected by the rules. The attacker receives a "403 Unauthorized Access" exception and the connection is terminated. The prevention mode records such attacks in WAF logs.
  • Read some documentations :
    • Presentation of the WAF Azure:
    • Troubleshoot Azure Guide :
    • Add an exclusion on the WAF (we would rather add an exclusion than disable a rule) 

Generic Process

  1. Generate errors, noting the date, time, and environment (production, pre-production, etc.) of the error occurrence.
  2. Go read the logs at these times, using the Azure Monitor @TODO  and take a screenshot.
  3. Analyze the logs (which is a JSON file).
    • List of important keywords :
      • requestUri: URI of the request, useful in case the problem occurs each time with the same URI.
      • ruleId: Rule ID
      • ruleGroup: As the name suggests
      • details\file: Name of the file where the rule is defined
      • details\line: File line where the rule is triggered
      • message: Generic wording of the detected problem
      • details\Message: Explanation of the error
      • details\data: Explanation of the error containing the problematic content
    • To find the rule:
      • Go to: https://github.com/SpiderLabs/owasp-modsecurity-crs/tree/v3.0/master/rules
      • Open the file indicated in the parameter details\file and go to the line indicated by the parameter details\line
  4. Depending on the case:
    • Either ask the project to make the necessary changes
    • Or add an exclusion, as indicated above at this URL
      • Examples of exclusion :
        • I have a cookie that contains attributes that cause concern :
          • Add an exclusion rule "Request cookie name equals <cookie-attribute-name>"
        • I have a setting on my HTTP call that raises concerns :
          • Add an exclusion rule "Request attribute name equals content"
  5. Go back to point 2, as long as you have errors.

Further Reason

Web Application Security: The New Way Forward

Using Logs to Investigate a Web Application Attack

azure Web application

Opinions expressed by DZone contributors are their own.

Related

  • Azure Deployment Using FileZilla
  • Mastering Scalability and Performance: A Deep Dive Into Azure Load Balancing Options
  • Running a Self-Hosted WAF in Production: Practical Lessons From SafeLine
  • Supercharging AI Agents with Azure Context: A Hands-On Guide to Azure MCP

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook