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
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Azure Deployment Using FileZilla
  • Mastering Scalability and Performance: A Deep Dive Into Azure Load Balancing Options
  • Cookies Revisited: A Networking Solution for Third-Party Cookies
  • Auto-Instrumentation in Azure Application Insights With AKS

Trending

  • GDPR Compliance With .NET: Securing Data the Right Way
  • A Guide to Developing Large Language Models Part 1: Pretraining
  • Hybrid Cloud vs Multi-Cloud: Choosing the Right Strategy for AI Scalability and Security
  • Beyond Linguistics: Real-Time Domain Event Mapping with WebSocket and Spring Boot
  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 user avatar
Thomas Jardinet
DZone Core CORE ·
Updated Oct. 18, 19 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
6.4K Views

Join the DZone community and get the full member experience.

Join For Free

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
  • Cookies Revisited: A Networking Solution for Third-Party Cookies
  • Auto-Instrumentation in Azure Application Insights With AKS

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!