Best Practices for Configuring Azure Application Gateway WAF for a Legacy Oracle Agile PLM Java/WebLogic Application

Zahan Khurram 0 Reputation points
2026-10-23T13:53:14.9866667+00:00

Hello Azure Community,

We have recently deployed Azure Application Gateway WAF v2 in front of our legacy Oracle Agile PLM application (Java/WebLogic-based). The Application Gateway is working correctly from a reverse proxy and application connectivity perspective. However, we are facing challenges configuring WAF in Prevention mode without disrupting legitimate application functionality.

I would appreciate guidance on Microsoft's recommended approach for configuring and tuning WAF for legacy enterprise Java applications.

Our Current Implementation

We initially enabled WAF in Detection mode, with diagnostic logs being sent to a Log Analytics Workspace.

We analyzed the AGWFirewallLogs using KQL queries to identify which managed rules were triggered during normal application operations.

During testing, we observed that several legitimate Agile PLM operations triggered OWASP CRS managed rules, including:

  • Login and session management

File uploads and downloads

Workflow and audit operations

User creation and role assignments

Application navigation, search, and XML-based requests

For example, some SQL Injection and XSS rules were triggered by legitimate application parameters containing XML, encoded strings, special characters, and other application-generated data.

To resolve these false positives, we created targeted WAF exclusions based on the logs, typically using:

Specific managed Rule IDs

Request Argument Names with the Equals operator

Request Cookie Names

Specific application parameters responsible for triggering false positives

This helped resolve several application issues while keeping the remaining managed rules enabled.

However, as we continued testing different application functionalities, additional false positives appeared, requiring more exclusions.

During production go-live, we encountered further false positives that had not been identified during testing. Consequently, we switched WAF back to Detection mode to avoid impacting production users while continuing to collect logs for further analysis.

My Questions

1. What is the recommended approach for implementing Azure Application Gateway WAF for legacy Java/WebLogic applications?

Should we primarily rely on Microsoft's managed rulesets (OWASP CRS / Microsoft DRS), or is it common practice to create custom WAF rules specifically for legacy application behavior?

2. Is our current WAF tuning approach recommended by Microsoft?

Our current process is:

Enable Detection mode.

Monitor WAF logs in Log Analytics.

Identify rules triggered by legitimate application requests.

Analyze the request parameters and matched data.

Create narrowly scoped exclusions for the affected managed rules.

Retest the application before enabling Prevention mode.

Is this the standard and recommended WAF tuning methodology for applications that generate frequent false positives?

3. How should we manage a growing number of WAF exclusions?

We have created multiple exclusions involving different request argument names, cookie names, and managed Rule IDs.

Is it normal for complex legacy applications to require a significant number of exclusions? At what point should we reconsider our approach rather than continuing to add exclusions?

4. Do WAF exclusions introduce security vulnerabilities?

This is our primary concern.

For example, if we exclude a specific request argument from a SQL Injection or XSS managed rule because it causes false positives, could an attacker deliberately use that same parameter to bypass WAF inspection?

How does Microsoft recommend balancing legitimate application functionality against the security risks introduced by exclusions?

5. Are there better alternatives to request argument-based exclusions?

Would Microsoft recommend any of the following approaches instead?

Header-based exclusions or request matching

URI/path-based WAF policies or exceptions

Custom WAF rules

Different managed ruleset versions or configurations

Separate WAF policies for different application endpoints

Which approach generally provides the best balance between security and application compatibility?

6. How do we determine when WAF is ready for Prevention mode?

For an application with many workflows and dynamic requests, it is difficult to test every possible operation before production.

What validation criteria, monitoring strategy, or phased rollout approach would Microsoft recommend before enabling Prevention mode?

What We Are Looking For

We want to ensure that our WAF implementation follows Microsoft-recommended security practices, rather than simply creating exclusions until the application stops generating errors.

Our objective is to maintain meaningful protection against SQL Injection, XSS, and other web attacks while ensuring that legitimate Oracle Agile PLM functionality continues to work.

I would particularly appreciate feedback from anyone who has implemented Azure Application Gateway WAF for Oracle Agile PLM, Oracle WebLogic, or similar legacy Java enterprise applications.

Any Microsoft documentation, architectural recommendations, or real-world implementation experiences would be greatly appreciated.

Thank you!

Azure Web Application Firewall
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-10-23T13:54:19.9566667+00:00

    Continue using managed rules as the security baseline, but refine the design by moving recurring endpoint-specific false positives into narrowly scoped per-URI policies or rule-scoped exceptions rather than accumulating global exclusions.

    Your Detection → log analysis → targeted exclusion → retest → Prevention process is Microsoft’s recommended methodology. False positives and application-specific tuning are expected, particularly with older applications. Detection mode should remain temporary because it records attacks but does not block them.^1^

    Use this order of preference:

    1. Managed DRS as the baseline. Do not replace SQLi, XSS, Java, and protocol protections with application-specific custom rules.
    2. Per-rule exclusion when one named argument, cookie, or header causes a confirmed false positive for one or a few rules.
    3. Per-URI policy or exception when the behavior belongs to a specific endpoint, such as file upload, XML integration, search, or workflow APIs.
    4. Rule action override/disablement only when the rule produces false positives across many inputs and its loss is understood.
    5. Custom Block or Log rules for application-specific restrictions such as trusted networks, methods, headers, geo-filtering, or known hostile patterns.
    6. Custom Allow rules only as a last resort, because a matching Allow rule stops subsequent managed-rule inspection.^2^

    Microsoft does not publish an Oracle Agile PLM-specific policy, so the appropriate configuration must be derived from observed Agile/WebLogic traffic.

    Tighten the existing exclusions

    For each current exclusion, record:

    • Listener, path, and operation that require it.
    • Ruleset version, rule group, and contributing rule ID.
    • Exact match variable and selector.
    • Sample transaction ID demonstrating the false positive.
    • Compensating application control and review owner.

    Prefer Equals over Contains, StartsWith, or EqualsAny, and scope the exclusion to the contributing rule—not the anomaly-score rules such as 949110 or 980130. An exclusion omits only the selected attribute while the rest of the request remains inspected.^3^

    Yes, an exclusion creates risk: an attacker can place a payload in the excluded field, and the affected rules will not inspect that field. Reduce that exposure by combining all applicable dimensions:

    • Exact parameter or cookie name.
    • Individual SQLi/XSS rule IDs.
    • A dedicated listener or URI policy.
    • Server-side validation, authorization, safe query parameterization, and output encoding.

    Review global exclusions first. A global field exclusion affects every managed rule and every location where that policy is associated.^4^

    A relevant limitation for Agile’s XML traffic is that XML request bodies are not supported by WAF exclusion selectors. If the false positive is inside raw XML, use endpoint scoping and a rule-scoped URI exception rather than assuming an argument-name exclusion can isolate the XML element.^3^

    Use endpoint-aware policies

    Application Gateway WAF v2 policies can be associated globally, per listener, or with a path-based rule. A per-URI policy overrides the broader listener or global policy.^5^

    A practical Agile split might be:

    • General UI and authentication: full managed rules with only exact, rule-scoped field exclusions.
    • Upload/download paths: separate policy for upload-specific limits and false positives.
    • XML/integration endpoints: separate path policy, with exceptions limited to particular rules.
    • Administrative/user-management paths: strict policy with minimal or no exclusions.

    WAF exceptions can match URI, remote IP, or request header and bypass only selected rules, rule groups, or rulesets. They require CRS 3.2, DRS 2.1, or later; keep them per-rule wherever possible.^6^

    Avoid a custom Allow rule for a normal public Agile endpoint: it bypasses DRS/CRS and Bot Protection completely for matching requests.^6^

    Ruleset strategy

    Check the active ruleset before further tuning. If it is CRS 3.x or DRS 2.1, plan a controlled move to DRS 2.2, which is the current recommended version and provides Java protections and fewer false positives. DRS 2.2 defaults to Paranoia Level 1; its PL2 rules are disabled unless explicitly enabled.^7^

    Treat the upgrade as a separate tuning cycle:

    1. Export the policy and exclusions as code.
    2. Reconcile removed or renamed rules.
    3. Validate newly introduced rules in Log mode.
    4. Test in nonproduction.
    5. Deploy and monitor before changing enforcement.

    Do not switch versions casually in the portal: assigning a new ruleset there resets rule-state, action, and rule-level exclusion customizations for the managed ruleset.^7^

    Prevention-mode readiness

    There is no fixed “zero matches” criterion. Enable Prevention when:

    • Every high-volume legitimate workflow has been exercised.
    • Each remaining match is classified as malicious, expected-to-block, or accepted residual risk.
    • Authentication, uploads, XML APIs, search, workflows, and administration have regression tests.
    • Exclusions are rule-scoped and documented.
    • Application owners can correlate WAF transaction IDs with WebLogic logs.
    • Alerts exist for blocked requests, managed-rule spikes, failed requests, and backend health.

    Roll out by the narrowest available scope: enable Prevention on lower-risk listeners or URI paths first, observe a complete business cycle, and then expand. Microsoft describes a typical initial tuning interval as approximately one to two weeks, but production seasonality and infrequent Agile workflows may require longer coverage.^8^

    Store the entire policy—including exclusions and overrides—in Bicep, Terraform, PowerShell, or CLI so changes are reviewable, repeatable, and preserved across ruleset upgrades.^1^


    References

    1. Best practices for Azure Web Application Firewall (WAF) on Azure Application Gateway
    2. Custom rules for Web Application Firewall v2 on Azure Application Gateway
    3. Web Application Firewall exclusion lists
    4. Troubleshoot Web Application Firewall (WAF) for Azure Application Gateway
    5. Azure Web Application Firewall (WAF) policy overview
    6. Azure Application Gateway WAF exceptions list
    7. Application Gateway WAF CRS and DRS rule groups and rules
    8. Troubleshoot WAF blocking legitimate requests (HTTP 403 Forbidden errors) in Azure Application Gateway
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.