Category
Security, Identity, and Compliance
1. Introduction
Oracle Cloud Web Application Firewall is a managed Layer 7 (HTTP/HTTPS) security service that helps protect web applications and APIs from common attacks such as SQL injection (SQLi), cross-site scripting (XSS), malicious bots, and abusive traffic patterns.
In simple terms: you put Web Application Firewall in front of your application so it can inspect incoming web requests, block bad ones, and allow legitimate users through—without you having to run and patch your own WAF servers.
Technically, Web Application Firewall enforces a policy that can include managed protection rules (typically aligned with OWASP-style threats), custom access rules, rate controls, and threat intelligence–driven blocking. It integrates with Oracle Cloud infrastructure components (commonly load balancing and public-facing endpoints) and emits logs/metrics for operations.
The core problem it solves is reducing risk at the application edge: even well-written apps have vulnerabilities, and even well-configured networks can’t see application-layer attacks. Web Application Firewall adds application-aware inspection and enforcement where security groups, NACLs, and L4 firewalls cannot.
Naming note (important): Oracle previously offered Web Application Acceleration and Security (WAAS). In many Oracle discussions and older materials, WAAS appears as the earlier service name. Today’s service is Web Application Firewall. If you encounter WAAS references in APIs, Terraform resources, or older tutorials, verify in official docs how those map to the current Web Application Firewall service in your region/tenancy.
2. What is Web Application Firewall?
Official purpose
Oracle Cloud Web Application Firewall is designed to protect internet-facing web applications and APIs by inspecting HTTP/HTTPS traffic and applying security rules to detect and block malicious requests.
Core capabilities (what it typically does)
- Request inspection at Layer 7: URL, query strings, headers, cookies, and (subject to limits) request bodies.
- Managed protection rules for common web attacks (for example SQLi/XSS patterns).
- Custom access control: allow/deny based on IPs, geographies, request attributes, and other match conditions.
- Rate limiting / request throttling to reduce brute force attempts and abusive automation.
- Threat intelligence–based blocking (where supported) to deny known malicious sources.
- Logging and metrics for security operations, troubleshooting, and audits.
Because cloud services evolve, confirm the exact feature list for your region using the official documentation: – https://docs.oracle.com/en-us/iaas/Content/WAF/home.htm (Web Application Firewall docs entry point)
Major components (conceptual model)
While exact naming can vary slightly across UI/API versions, Web Application Firewall commonly includes: – WAF policy: the main configuration object (rules, protections, actions). – Protected target / protected resource: the application endpoint being protected (for example, a load balancer listener or a public hostname). – Rule sets: – Protection rules (managed signatures/logic) – Access rules (custom allow/deny) – Rate limiting rules – Logging/monitoring outputs: logs and metrics exported into Oracle Cloud observability services.
Service type
- Managed security service (you don’t deploy appliances/VMs).
- Part of Security, Identity, and Compliance in Oracle Cloud.
Scope (regional/global/account scoping)
Web Application Firewall is managed in the context of your Oracle Cloud tenancy and compartments. The precise regional vs. edge/global behavior can depend on the Web Application Firewall deployment type available in your tenancy (for example “regional” attachment to a load balancer vs. “edge” protection in front of a public hostname). Verify the deployment options available in your region in official docs and the Console UI.
How it fits into the Oracle Cloud ecosystem
Web Application Firewall commonly sits in front of: – Oracle Cloud Load Balancing (protecting HTTP(S) listeners) – Public application endpoints (depending on supported deployment models) – Logging/monitoring integrations via Oracle Cloud Observability services (Logging, Monitoring, Audit)
It complements (not replaces): – Network Security Groups (NSGs) / Security Lists (L3/L4 filtering) – OCI Network Firewall (network-layer controls) – Secure SDLC practices, scanning, and runtime security
3. Why use Web Application Firewall?
Business reasons
- Reduce the likelihood and impact of web attacks that cause outages, fraud, or data exposure.
- Shorten time-to-protection versus building and tuning a self-managed WAF stack.
- Provide evidence for security programs and audits (policies, logs, and controlled changes).
Technical reasons
- L7-aware controls: blocks attacks that slip through L3/L4 controls.
- Consistent enforcement across multiple apps and environments using standardized policies.
- Helps with “virtual patching” while development fixes are being prepared.
Operational reasons
- Managed service reduces patching, scaling, and high-availability engineering.
- Centralized logging and metrics help security operations investigate incidents.
- Policy-based controls support repeatable deployments across compartments.
Security/compliance reasons
- Supports common security requirements (least privilege, logging, change control).
- Helps align with OWASP Top 10 mitigation strategies (as part of a broader program).
- Improves defense-in-depth for regulated systems (verify compliance mapping in your program; WAF alone is not compliance).
Scalability/performance reasons
- Designed to scale with web traffic without you sizing WAF servers.
- Reduces origin load by blocking abusive traffic early.
When teams should choose Web Application Firewall
Choose Web Application Firewall when: – You have internet-facing web apps/APIs. – You need managed protection rules and controlled access at L7. – You want centralized policy enforcement and logging. – You need to quickly mitigate common attacks or suspicious traffic.
When teams should not choose Web Application Firewall
Avoid (or de-prioritize) Web Application Firewall when: – Your workload is not HTTP/HTTPS (for example SMTP, raw TCP services). – Your application is internal-only and never exposed to untrusted networks (you may still want WAF for zero-trust patterns, but cost/benefit differs). – You need deep, application-specific logic that a WAF can’t reliably model (you may need app-layer authorization changes). – You can’t tolerate potential false positives without a robust tuning and exception workflow.
4. Where is Web Application Firewall used?
Industries
- SaaS and software companies (multi-tenant app protection)
- Financial services and fintech (fraud reduction, attack mitigation)
- Retail/e-commerce (bot and scraping reduction, checkout protection)
- Healthcare (protect patient portals; compliance-driven logging)
- Public sector (public service portals; strict perimeter controls)
- Media and gaming (traffic spikes; abuse and credential stuffing mitigation)
Team types
- Platform engineering teams standardizing edge security
- DevOps/SRE teams improving reliability and incident response
- Security engineering and AppSec teams enforcing OWASP-aligned controls
- Network/security operations teams centralizing ingress policy
Workloads
- Web frontends (SPAs, server-rendered apps)
- API backends (REST/GraphQL)
- Authentication endpoints (login/SSO callbacks)
- Admin dashboards exposed to the internet (ideally restricted)
Architectures
- Microservices behind an internet-facing load balancer
- Multi-region active/active frontends (paired with DNS traffic management)
- Blue/green deployments (WAF policy reused across versions)
- Hybrid architectures (cloud front door protecting on-prem origins, if supported by your deployment model—verify)
Production vs dev/test usage
- Production: enforce blocking with tuned rule sets, strict logging, and change control.
- Dev/Test: run in “detect” or “monitor” mode (where supported) to understand false positives before enabling blocking.
5. Top Use Cases and Scenarios
Below are realistic scenarios for Oracle Cloud Web Application Firewall. For each, the goal is to show when the service fits and what it looks like in practice.
1) Block SQL injection against a legacy app
- Problem: A legacy app has known weak input validation; attackers probe query strings for SQLi.
- Why this service fits: Managed SQLi protections detect common injection patterns at the edge.
- Example scenario:
/products?id=10%20OR%201=1is blocked before it reaches the origin.
2) Reduce cross-site scripting attempts on public forms
- Problem: Public contact forms are being used to inject
<script>payloads. - Why this service fits: XSS protections and request validations help stop common payloads.
- Example scenario: Requests containing
<script>alert(1)</script>in form fields are blocked or logged.
3) Restrict access to admin paths
- Problem:
/adminendpoints are public and repeatedly brute-forced. - Why this service fits: Custom access rules can deny sensitive paths except for a corporate IP range.
- Example scenario: Only the VPN egress IP range can access
/admin/*; everyone else receives a deny action.
4) Rate limit login attempts (credential stuffing)
- Problem: Attackers try many username/password combinations quickly.
- Why this service fits: Rate limiting slows attackers and protects backend resources.
- Example scenario: More than 30 POSTs to
/loginper minute per client IP triggers a block/throttle action.
5) Block known-bad IPs using threat intelligence (when available)
- Problem: Security team sees repeated attacks from IPs associated with scanning/botnets.
- Why this service fits: Threat intelligence integration can automate blocking.
- Example scenario: Requests from high-risk IPs are denied by policy without manual IP list management.
6) Protect APIs from abusive clients and scrapers
- Problem: API usage spikes due to scraping; origin costs rise.
- Why this service fits: WAF can enforce request limits and rules by paths/methods.
- Example scenario: GET
/api/v1/catalogis rate-limited; abnormal traffic is dropped.
7) Enforce geography-based restrictions (where applicable)
- Problem: A service is only intended for specific countries/regions.
- Why this service fits: Geo-based rules help reduce unwanted traffic and scanning.
- Example scenario: Deny traffic from non-supported geographies; allow only approved countries.
8) Add a “security gate” during incident response
- Problem: A zero-day exploit is being actively scanned.
- Why this service fits: Rapidly deploy a protective rule/deny pattern while patching the app.
- Example scenario: Block requests matching suspicious payloads or vulnerable paths temporarily.
9) Standardize security controls across multiple apps
- Problem: Each team implements edge security differently; audit results are inconsistent.
- Why this service fits: Centralized policies and compartment-level governance improve consistency.
- Example scenario: A shared policy baseline is applied to all internet-facing apps.
10) Protect a B2B portal with strict allow lists
- Problem: Portal should only be accessible from partner IP ranges.
- Why this service fits: IP allow listing is straightforward and auditable.
- Example scenario: Allow only partner ranges; deny all other traffic.
11) Reduce L7 DDoS-like traffic patterns (application floods)
- Problem: The app receives high-volume HTTP floods that exhaust app threads.
- Why this service fits: Rate limiting and early denial reduce origin resource exhaustion.
- Example scenario: Burst traffic is throttled; health is maintained during a flood.
12) Improve security visibility with WAF logs
- Problem: You need better insight into what’s hitting your public endpoints.
- Why this service fits: WAF logs show request patterns, blocks, and rule triggers.
- Example scenario: SOC dashboards alert on spike in blocked requests for a given path.
6. Core Features
Because Oracle Cloud capabilities can vary by region and evolve, treat this as a practical checklist and verify in official docs for your tenancy’s exact options.
Managed protection rules (OWASP-aligned protections)
- What it does: Applies curated detection logic for common web attacks (SQLi, XSS, protocol violations, etc.).
- Why it matters: Stops common exploit patterns without writing custom regex rules.
- Practical benefit: Faster “baseline security” for new apps; reduced attack surface.
- Limitations/caveats: Can cause false positives; requires tuning and exceptions.
Custom access rules (allow/deny based on request attributes)
- What it does: Lets you define rules based on IP/CIDR, URI path, headers, methods, and other request elements (exact match options vary).
- Why it matters: Many real security requirements are business rules (“only these IPs can access /admin”).
- Practical benefit: Implements clear controls without changing application code.
- Limitations/caveats: Overly broad blocks can lock out legitimate traffic; always include break-glass access plans.
Rate limiting / request throttling
- What it does: Controls request rate per client identity (commonly IP) and per endpoint/path.
- Why it matters: Reduces credential stuffing, brute force, and scraper abuse.
- Practical benefit: Protects origin performance and downstream dependencies.
- Limitations/caveats: NAT/proxy users may share IPs; rate limiting by IP can affect legitimate shared networks.
Threat intelligence–based protections (where supported)
- What it does: Uses curated intelligence signals to block or challenge suspicious sources.
- Why it matters: Reduces manual blocklist management and reacts faster to known threats.
- Practical benefit: Immediate reduction in noise from scanners/botnets.
- Limitations/caveats: Intelligence coverage and actions vary; verify how it classifies sources and how to override.
Bot management / client classification (if available in your tenancy)
- What it does: Helps identify and manage automated traffic beyond simple rate limiting.
- Why it matters: Many attacks and cost drivers are automated.
- Practical benefit: Better control over scraping and non-human traffic.
- Limitations/caveats: Feature availability and behavior can vary—verify in official docs.
TLS/HTTPS handling (deployment-model dependent)
- What it does: Enables inspection of HTTPS traffic by integrating with where TLS is terminated (for example, at an edge endpoint or at a load balancer).
- Why it matters: Most modern apps are HTTPS-only; you need inspection on decrypted traffic.
- Practical benefit: Protects real-world workloads without forcing HTTP.
- Limitations/caveats: Exact TLS termination points and certificate handling depend on how you deploy WAF (regional vs edge). Verify configuration flow.
Logging and metrics
- What it does: Emits security-relevant logs and operational metrics (blocked requests, rule triggers, request counts).
- Why it matters: Security controls without visibility are hard to operate and audit.
- Practical benefit: Enables alerting, investigations, tuning, and compliance evidence.
- Limitations/caveats: Log ingestion/retention can add cost; ensure sensitive data handling and redaction strategy.
Policy lifecycle and change management
- What it does: Supports updating policies and applying changes to protected targets.
- Why it matters: WAF needs continuous tuning; safe changes reduce outages.
- Practical benefit: Enables progressive rollout (for example monitor → block).
- Limitations/caveats: Always test changes in lower environments; understand propagation delays (verify in docs).
7. Architecture and How It Works
High-level architecture
At a high level, Web Application Firewall sits between the public internet and your application origin. Requests flow through WAF, which evaluates them against policy rules. Based on rule outcomes, requests are: – Allowed to reach the origin – Blocked/denied – Potentially rate limited (behavior depends on configuration)
Request/data/control flow
- Control plane: You create and manage WAF policies in Oracle Cloud Console/API, scoped to compartments and regions as applicable.
- Data plane: HTTP(S) requests are inspected and enforced by WAF and then forwarded to your origin if allowed.
- Observability plane: Logs and metrics are emitted to Oracle Cloud observability services.
Common integrations in Oracle Cloud
Integrations depend on deployment model and your architecture, but commonly include: – OCI Load Balancing (public HTTP(S) entrypoint) – OCI Logging for WAF logs (verify exact log categories) – OCI Monitoring for metrics and alarms – OCI Identity and Access Management (IAM) for permissions and compartment governance – OCI Audit for tracking policy changes and administrative actions
Dependency services (typical)
- VCN/Subnets (for origins on OCI)
- Load balancer (regional L7 entry)
- DNS (if using hostname-based front-door patterns)
- Certificates/PKI (HTTPS)
Security/authentication model
- Authentication to manage WAF is via OCI IAM (users, groups, policies).
- WAF enforcement is not “user authentication”; it is request inspection and access control.
Networking model (typical)
- WAF is positioned on the ingress path.
- Origins remain private where possible; only the WAF-to-origin path should be allowed.
- If the origin is an OCI Load Balancer, you typically control backend access with NSGs/security lists.
Monitoring/logging/governance
- Send WAF logs to a centralized logging compartment.
- Alert on spikes in denied requests or rule triggers.
- Use tags for cost tracking and ownership.
- Use compartments to separate environments (dev/test/prod).
Simple architecture diagram
flowchart LR
U[Internet Users] --> WAF[Oracle Cloud Web Application Firewall]
WAF --> LB[OCI Load Balancer (HTTPS)]
LB --> APP[Web App (Compute/OKE/Functions)]
WAF --> LOG[OCI Logging/Monitoring]
Production-style architecture diagram
flowchart TB
subgraph Internet
U[Users/Bots]
end
subgraph OCI_Edge["Oracle Cloud (Ingress)"]
WAF[Web Application Firewall\nPolicy Enforcement]
DNS[DNS / Traffic Steering\n(optional)]
end
subgraph OCI_Region["OCI Region (App VCN)"]
LB[Public Load Balancer\nTLS Termination]
subgraph APP_TIER["Private Subnet: App Tier"]
APP1[App Instance/Pods #1]
APP2[App Instance/Pods #2]
end
subgraph DATA_TIER["Private Subnet: Data Tier"]
DB[(Database)]
CACHE[(Cache)]
end
OBS[Logging / Monitoring]
AUD[Audit]
end
U --> DNS --> WAF --> LB
LB --> APP1
LB --> APP2
APP1 --> DB
APP2 --> DB
APP1 --> CACHE
APP2 --> CACHE
WAF --> OBS
LB --> OBS
OCI_Region --> AUD
8. Prerequisites
Tenancy and account requirements
- An active Oracle Cloud tenancy with permissions to create networking, compute, load balancing, and Web Application Firewall resources.
- Access to an OCI region where Web Application Firewall is available. Availability can be region-specific—verify in official docs and in the Console service list.
Permissions / IAM roles
For a beginner lab, the simplest approach is: – Use a user in the Administrators group (broad permissions), or – Use a dedicated group with least-privilege policies for WAF and dependent services.
Because IAM policy resource types and verbs must match Oracle’s current definitions, use the official IAM documentation to confirm exact statements: – IAM overview: https://docs.oracle.com/en-us/iaas/Content/Identity/home.htm
Example (verify in official docs before use): – Allow a group to manage WAF resources in a compartment – Allow the same group to manage load balancers, networking, and logging in that compartment
If you’re in an enterprise tenancy, follow your organization’s change management and least-privilege standards.
Billing requirements
- Web Application Firewall is generally a paid service (usage-based). You may have Free Trial credits, but Always Free may not cover WAF usage. Verify your tenancy’s entitlements and the current price list.
Tools (optional but helpful)
- Oracle Cloud Console (required for this tutorial)
curllocally for testing- Optional: OCI CLI for general automation (not required here)
- OCI CLI docs: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm
Quotas/limits
- Service limits can apply (number of policies, protected targets, etc.). Check Limits, Quotas and Usage in the OCI Console and request increases if needed.
Prerequisite services for the hands-on lab
- VCN with public and private subnets
- Compute instance running a simple web server (NGINX)
- OCI Load Balancer (HTTP/HTTPS)
- Web Application Firewall policy attached to the load balancer (regional pattern)
9. Pricing / Cost
Oracle Cloud Web Application Firewall pricing is usage-based and may include multiple dimensions (for example, per protected endpoint/policy and/or per number of requests processed). Exact SKUs, meters, and rates can vary by region and can change over time.
Use these official sources to confirm current pricing: – Oracle Cloud pricing overview: https://www.oracle.com/cloud/pricing/ – Oracle Cloud price list (select Security category and locate Web Application Firewall): https://www.oracle.com/cloud/price-list/ – Oracle Cloud Cost Estimator: https://www.oracle.com/cloud/costestimator.html
Pricing dimensions (typical)
Common pricing meters for WAF services in the industry (and often used in OCI WAF-like services) include: – Number of protected applications/endpoints/policies – Number of requests inspected (often metered in millions of requests) – Optional advanced features (for example bot controls or additional rule sets), if offered
Because exact OCI meters can differ, verify the current meters in the official price list for “Web Application Firewall”.
Free tier (if applicable)
Oracle Cloud’s Free Tier is service-dependent. Web Application Firewall may not be included as Always Free. Treat it as paid unless your tenancy explicitly shows a free allocation. Verify in your tenancy and the pricing page.
Primary cost drivers
- High request volumes (especially from bots/scanners)
- Protecting many separate apps/domains/endpoints
- Retaining/forwarding high-volume logs
- Additional upstream services (load balancers, compute instances, bandwidth)
Hidden or indirect costs
- Load balancer hourly and bandwidth costs (if you use the regional LB integration).
- Logging ingestion and storage (depending on your logging configuration and retention).
- Outbound data transfer from origins (standard OCI egress rules apply).
- Time and process costs: tuning rules to avoid false positives.
Network/data transfer implications
- WAF itself inspects inbound requests, but your overall costs often correlate with:
- Request volume to WAF
- Forwarded traffic to origin
- Response egress from origin to clients
If WAF blocks requests, it can reduce origin load and egress, which can lower overall costs for downstream services.
How to optimize cost
- Turn on protections that block obvious bad traffic early (but tune to avoid blocking good traffic).
- Use rate limiting to reduce bot-driven request floods.
- Keep logging at the level you truly need; avoid logging full request bodies unless necessary and approved.
- Use compartments/tags to attribute WAF costs by app/team/environment.
- Consider central patterns (one well-tuned baseline policy per app class) instead of many bespoke policies.
Example low-cost starter estimate (no fabricated numbers)
A small dev/test setup cost typically includes: – 1 small origin (compute) + 1 load balancer + Web Application Firewall policy – Low traffic volume (human-only) – Basic logging
Because exact pricing varies, build a cost estimate using: – Your expected requests/month (including bots) – Number of protected endpoints – Logging volume and retention …and model it in the Cost Estimator.
Example production cost considerations (what changes)
In production, expect higher cost due to: – Multiple apps/environments (prod + staging) – Higher request volumes (including attack traffic) – Higher log volume and longer retention – HA/multi-region patterns (more protected endpoints)
10. Step-by-Step Hands-On Tutorial
This lab walks you through protecting a simple web app behind an OCI Load Balancer using Web Application Firewall. It’s designed to be executable, beginner-friendly, and realistic.
Cost note: This lab uses an OCI Load Balancer and Web Application Firewall, which may incur charges. Use a sandbox compartment, set budgets/alerts, and clean up resources afterward.
Objective
Deploy a basic web server behind an OCI Load Balancer and then configure Web Application Firewall to:
– Block a test attack pattern (SQLi/XSS-style)
– Block access to /admin
– Rate limit a specific path
– Produce logs for validation
Lab Overview
You will:
1. Create a VCN and subnets
2. Launch a Compute instance with NGINX
3. Create a public OCI Load Balancer pointing to the instance
4. Create a Web Application Firewall policy and attach it to the load balancer
5. Validate blocking and rate limiting with curl
6. Review logs/metrics
7. Clean up resources
Step 1: Create a compartment and tagging strategy (recommended)
Console actions
1. Open the OCI Console.
2. Create a compartment such as: lab-waf.
3. (Optional) Define tags (or at least plan them):
– Environment=Lab
– Owner=<yourname>
– CostCenter=SecurityLab
Expected outcome – A dedicated compartment exists to isolate resources and simplify cleanup.
Step 2: Create networking (VCN + subnets)
Console actions
1. Go to Networking → Virtual Cloud Networks.
2. Click Create VCN.
3. Choose VCN with Internet Connectivity (wizard).
4. Name: waf-lab-vcn.
5. Ensure you get:
– A public subnet (for the load balancer)
– A private subnet (for the compute instance)
– An Internet Gateway
– A NAT Gateway (optional but helpful)
– Route tables and security lists
Expected outcome – VCN created with at least one public and one private subnet.
Verification – Confirm the public subnet has a route to the Internet Gateway. – Confirm the private subnet has appropriate routing (NAT if needed).
Step 3: Launch a Compute instance with NGINX (origin)
You need an origin web server.
Console actions
1. Go to Compute → Instances → Create instance.
2. Name: waf-lab-origin-1.
3. Image: Oracle Linux (or Ubuntu) (pick a standard, supported image).
4. Shape: choose a small shape appropriate for a lab.
5. Networking:
– Place it in the private subnet (recommended).
– If you don’t have NAT for outbound updates, you may temporarily place it in a public subnet for simplicity (less secure).
6. Add your SSH public key.
7. Create.
Install NGINX SSH to the instance (via Bastion or public IP depending on your networking choice), then:
Oracle Linux:
sudo dnf -y install nginx
sudo systemctl enable --now nginx
Ubuntu:
sudo apt-get update
sudo apt-get -y install nginx
sudo systemctl enable --now nginx
Create a simple page and an /admin endpoint:
echo "Hello from OCI origin behind WAF" | sudo tee /usr/share/nginx/html/index.html
sudo mkdir -p /usr/share/nginx/html/admin
echo "admin area" | sudo tee /usr/share/nginx/html/admin/index.html
sudo systemctl restart nginx
Security list / NSG – Allow inbound TCP 80 from the load balancer subnet (recommended) or from the VCN CIDR for a quick lab. – Do not open the instance to the whole internet if you can avoid it.
Expected outcome
– NGINX is running and serves:
– GET / → “Hello from OCI origin behind WAF”
– GET /admin/ → “admin area”
Verification From a host that can reach the instance (bastion or within VCN):
curl -i http://<origin-private-ip>/
curl -i http://<origin-private-ip>/admin/
Step 4: Create a public OCI Load Balancer
Console actions
1. Go to Networking → Load Balancers → Create load balancer.
2. Choose a public load balancer (for internet-facing testing).
3. Place it in the public subnet.
4. Configure a backend set pointing to the origin instance:
– Backend protocol: HTTP
– Backend port: 80
5. Configure health check on / port 80.
6. Create a listener for HTTP on port 80.
Expected outcome – Load balancer is provisioned with a public IP. – Backend becomes Healthy.
Verification From your local machine:
curl -i http://<lb-public-ip>/
curl -i http://<lb-public-ip>/admin/
You should see the origin responses.
Step 5: Create a Web Application Firewall policy
Console actions
1. Go to Security (or Security, Identity, and Compliance) → Web Application Firewall.
2. Click Create WAF policy (wording may vary slightly).
3. Name: waf-lab-policy.
4. Select the compartment: lab-waf.
5. Choose a protection type/deployment model that supports protecting a load balancer (often called “regional” in some clouds; naming may vary). If you only see edge/hostname options, stop and verify the official docs and your region support.
Configure baseline protections
In the policy:
– Enable protection rules (managed rules).
– Set the action to Detect initially if you’re cautious, then switch to Block after validation.
– Add an access rule:
– Condition: path starts with /admin
– Action: deny/block
– Add a rate limiting rule (example):
– Match path: /
– Limit: a small threshold for testing (choose a number appropriate for lab)
– Action: block/throttle (depending on supported actions)
If the Console provides templates (OWASP, common protections), use them, but keep changes minimal for a first lab.
Expected outcome
– A WAF policy exists with managed protections + one explicit /admin deny rule + rate limiting rule.
Step 6: Attach the Web Application Firewall policy to the load balancer
Console actions 1. In the Web Application Firewall policy, find Protected targets / Attach to resource. 2. Select your Load Balancer and the listener (HTTP 80). 3. Confirm and attach.
Propagation can take time. Wait until the protected target shows Active (wording may differ).
Expected outcome – WAF is enforcing policy on requests entering the load balancer listener.
Step 7: Generate traffic and test blocking
7.1 Test normal traffic
curl -i http://<lb-public-ip>/
Expected outcome – HTTP 200 with your “Hello…” message.
7.2 Test /admin blocking
curl -i http://<lb-public-ip>/admin/
Expected outcome – A block/deny response (often 403). Exact status code and response body depend on the service.
If it is not blocked: – Ensure the access rule is enabled and ordered correctly. – Ensure the policy is attached to the correct listener.
7.3 Test a basic SQLi-like pattern
Try a query string that frequently triggers managed rules:
curl -i "http://<lb-public-ip>/?id=1%27%20OR%20%271%27%3D%271"
Expected outcome – If managed protections are in Block mode and the pattern matches, the request is denied. – If in Detect mode, the request may succeed but should generate a security log event.
Managed rule behavior differs by vendor and rule set. If nothing triggers, switch to a more explicit custom rule (next step) rather than assuming protections don’t work.
Step 8: (Optional but reliable) Add a custom rule to block a test header
Managed signatures can be nuanced. For deterministic validation, create a rule:
– If request header X-Lab-Attack: 1 then deny
Then test:
curl -i -H "X-Lab-Attack: 1" http://<lb-public-ip>/
Expected outcome – Denied request (useful to validate enforcement and attachment).
Step 9: Enable/inspect logs and metrics
Console actions 1. Go to Observability & Management → Logging. 2. Locate logs for WAF (log names/categories depend on service integration—verify in Console). 3. Ensure logs are enabled for the policy/target. 4. Generate a few blocked requests again. 5. Review log entries and confirm you can see: – Timestamp – Action taken (allow/deny) – Rule triggered (if provided) – Request attributes (redacted as appropriate)
Expected outcome
– You can correlate your curl tests to WAF events.
Validation
Use this checklist:
– [ ] GET / returns 200 through the load balancer
– [ ] GET /admin/ is blocked by WAF
– [ ] A managed-rule test or custom deterministic rule blocks traffic
– [ ] WAF logs show deny events for your test requests
– [ ] Backend remains healthy and serves normal traffic
Troubleshooting
Common issues and fixes:
-
Backend shows unhealthy – Confirm the instance security list/NSG allows traffic from the load balancer. – Confirm NGINX is running and listening on port 80:
bash sudo systemctl status nginx sudo ss -lntp | grep :80 -
WAF not blocking anything – Confirm the policy is attached to the correct load balancer and listener. – Wait for propagation (some changes take minutes). – Ensure rules are enabled and have the correct precedence/order. – Switch from Detect to Block (if you intended blocking).
-
False positives block legitimate requests – Start with Detect mode to observe what would be blocked. – Add narrowly scoped exceptions (specific paths, methods, or IP ranges). – Avoid global exclusions that defeat the purpose of WAF.
-
Can’t find WAF logs – Confirm logging is enabled for the WAF policy/target. – Check compartments and log groups. – Verify the correct region (logs are regional).
-
403 from load balancer vs 403 from WAF – Verify whether the LB listener rules or routing policies are causing the response. – Inspect WAF logs: if WAF blocked, it should show a deny action.
Cleanup
To avoid ongoing charges, delete resources in reverse order:
- Detach or delete Web Application Firewall protected target/policy
- Delete the OCI Load Balancer
- Terminate the compute instance
- Delete the VCN (or use the VCN wizard’s “delete all related resources” option if available)
- Delete logs/log groups created for the lab (if you don’t need them)
Verify no public IPs or load balancers remain in the compartment.
11. Best Practices
Architecture best practices
- Place Web Application Firewall at the primary ingress for all internet-facing HTTP(S) apps.
- Keep origins private when possible (private subnets; restrict backend access to load balancer/WAF paths).
- Use a standard baseline policy and extend it per app (avoid starting from scratch for every service).
- Plan for multi-region: use consistent policies and central logging.
IAM/security best practices
- Use compartments to separate environments (dev/stage/prod).
- Apply least privilege for WAF admins and operators.
- Require MFA for privileged users and enforce strong IAM policies.
- Use OCI Audit to monitor administrative changes.
Cost best practices
- Rate limit abusive paths to reduce downstream compute and database costs.
- Reduce logging verbosity where possible; set retention intentionally.
- Tag WAF resources with owner and cost center.
Performance best practices
- Avoid overly complex custom regex rules that are hard to maintain.
- Prefer managed rule sets where possible; tune exceptions rather than disabling protections broadly.
- Test policy changes under expected traffic patterns.
Reliability best practices
- Roll out changes gradually: Detect → Block, or canary policies if your org supports it.
- Keep a break-glass procedure to quickly revert policies during outages.
- Monitor backend health and WAF deny spikes together.
Operations best practices
- Create dashboards/alarms for:
- Sudden increase in denied requests
- High request rates on sensitive paths (
/login,/checkout,/api) - Backend 5xx spikes (may indicate false positives or attack pressure)
- Use runbooks for:
- False positive triage
- Emergency deny rules (incident response)
- Temporary allow listing (partner onboarding)
Governance/tagging/naming best practices
- Naming convention example:
waf-<env>-<app>-policywaf-<env>-<app>-target- Tagging:
Environment,Application,Owner,CostCenter,DataSensitivity
12. Security Considerations
Identity and access model
- Web Application Firewall is managed via OCI IAM.
- Restrict “manage” permissions to a small group.
- Separate roles:
- Policy authors (security engineering)
- Deployers (platform team)
- Viewers/auditors (read-only)
Encryption
- Use HTTPS end-to-end:
- Client → WAF/front door: HTTPS
- WAF → load balancer/origin: HTTPS where supported and practical
- Ensure certificates are rotated and managed securely (OCI Certificates service may help—verify best fit for your org).
Network exposure
- Avoid direct public access to origins.
- Restrict backend security rules to only allow traffic from the load balancer subnets/NSGs as appropriate.
- Keep management endpoints (SSH, admin panels) behind VPN/Bastion and/or strict WAF allow lists.
Secrets handling
- Do not embed API keys or secrets in WAF rules or custom headers used for control.
- Avoid logging sensitive data (PII, auth tokens) in request logs.
Audit/logging
- Enable OCI Audit and centralize logs.
- Ensure log retention meets your security policy.
- Consider exporting WAF logs to your SIEM (integration path varies—verify in your logging architecture).
Compliance considerations
- WAF helps support controls like monitoring, access restriction, and threat mitigation.
- It does not replace:
- Secure coding
- Vulnerability management
- Penetration testing
- Identity governance
- Map WAF controls to your frameworks (PCI DSS, ISO 27001, SOC 2) as part of a complete control set.
Common security mistakes
- Running WAF in detect-only forever in production.
- Disabling whole rule sets instead of adding narrow exceptions.
- Leaving origins publicly reachable “just in case”.
- Not monitoring WAF blocks (missing active attacks or false positive outages).
- Logging too much sensitive data.
Secure deployment recommendations
- Start in detect mode, review logs, tune, then move to block mode.
- Lock down origin access.
- Add explicit rules for critical assets:
/login,/admin,/api/auth/*. - Combine WAF with strong authentication and authorization.
13. Limitations and Gotchas
Treat these as common patterns; verify OCI-specific limits in official docs for your region/tenancy.
Known limitations (typical for WAF services)
- Protects HTTP/HTTPS; not meant for non-web protocols.
- Managed protections can produce false positives, especially on APIs with unusual payloads.
- Some inspection may be limited by request body size or content types.
- Encrypted traffic must be decrypted at some point for inspection; deployment model matters.
Quotas and service limits
- Maximum number of policies/targets/rules/logging configurations may apply.
- Limits vary by region and can be increased by request.
Regional constraints
- Not every OCI region may support every WAF deployment model.
- Logging features may differ by region.
Pricing surprises
- Attack traffic increases inspected request volume and can raise WAF costs.
- Logging high-volume request data can significantly increase logging costs.
- A public load balancer plus WAF can be more expensive than expected for hobby traffic—use budgets.
Compatibility issues
- Some applications use unusual encodings or large payloads that trigger rules.
- API clients behind NAT can appear as a single IP, affecting rate limits.
Operational gotchas
- Rule ordering matters: an allow rule might override a block (or vice versa) depending on policy evaluation order.
- Policy updates may take time to propagate.
- Without careful tuning, you can accidentally block health checks or legitimate bots (for example payment provider callbacks).
Migration challenges
- Moving from older WAAS materials to Web Application Firewall can be confusing:
- Resource names and UI paths may differ
- APIs/Terraform resources might still use legacy naming in places
- Always validate against current docs for your tenancy
14. Comparison with Alternatives
Web Application Firewall is one layer in a broader edge security and application protection strategy.
Alternatives within Oracle Cloud
- OCI Network Firewall: focuses on network-layer controls (L3/L4 and some advanced inspection depending on configuration). It is not a replacement for a dedicated L7 WAF policy for HTTP threat patterns.
- NSGs/Security Lists: basic allow/deny at network level; can’t detect SQLi/XSS.
- API Gateway security features: useful for API authentication/authorization and rate limiting, but not the same as a full WAF rule set.
Alternatives in other clouds
- AWS: AWS WAF + Shield (different integration model)
- Azure: Azure Web Application Firewall (Application Gateway/Front Door)
- Google Cloud: Cloud Armor (edge protection; different capabilities)
Open-source / self-managed alternatives
- ModSecurity + OWASP CRS on NGINX/Apache
- Commercial appliances/virtual appliances
These can be powerful but require operational effort (patching, scaling, HA, tuning).
Comparison table
| Option | Best For | Strengths | Weaknesses | When to Choose |
|---|---|---|---|---|
| Oracle Cloud Web Application Firewall | OCI-hosted web apps/APIs needing managed L7 protection | Managed rules, centralized policies, OCI integrations, reduced ops | Cost under attack traffic; tuning required; OCI-specific | You want managed WAF integrated into Oracle Cloud |
| OCI Network Firewall | Network segmentation and centralized network security controls | Strong network controls, consistent enforcement | Not a full substitute for L7 WAF protections | You need network firewalling plus WAF (defense in depth) |
| NSGs / Security Lists | Basic ingress/egress controls | Simple, low cost | No application-layer attack detection | You only need L3/L4 filtering |
| Self-managed ModSecurity | Full control and custom behaviors | Highly customizable | High ops burden; scaling/patching; tuning complexity | You need deep customization and accept ops overhead |
| Cloudflare WAF (third-party) | Cross-cloud/global edge | Strong edge network, many features | External dependency; data path changes | You need vendor-neutral edge front door |
| AWS WAF / Azure WAF / Cloud Armor | Workloads hosted primarily in those clouds | Native integration with their ecosystems | Not OCI-native | Your primary platform is that cloud |
15. Real-World Example
Enterprise example: Public citizen portal with strict governance
- Problem: A government-style citizen portal experiences constant scanning, occasional L7 floods, and must meet strong audit/logging requirements.
- Proposed architecture:
- Internet → Web Application Firewall → OCI Load Balancer → App tier (private subnets) → Database
- Central logging into a dedicated security compartment
- IAM separation: security team manages WAF policy; platform team manages LB and compute
- Why Web Application Firewall was chosen:
- Managed OWASP-aligned protections reduce risk quickly
- Centralized policy and logs support audits
- Reduced operational overhead compared to self-hosted WAF appliances
- Expected outcomes:
- Reduced successful exploit attempts
- Faster incident response with clear deny logs
- More stable portal performance during attack spikes
Startup/small-team example: SaaS login + API protection
- Problem: A small SaaS sees credential stuffing on
/loginand scraping of public APIs. Backend costs rise due to abusive traffic. - Proposed architecture:
- Internet → Web Application Firewall → Load Balancer → Containerized app/API
- Rate limiting on
/loginand high-cost API endpoints - Basic managed protections enabled with tuned exceptions
- Why Web Application Firewall was chosen:
- Faster than building custom edge protections
- Reduces bot-driven traffic, lowering compute/database load
- Helps meet early customer security expectations (SOC 2 readiness)
- Expected outcomes:
- Lower error rates and fewer outages
- Reduced attack noise reaching the application
- Predictable operations with centralized policy control
16. FAQ
-
Is Oracle Cloud Web Application Firewall the same as WAAS?
WAAS is an older Oracle service name (“Web Application Acceleration and Security”). Today, the primary service is Web Application Firewall. Some older references, APIs, or IaC resources may still mention WAAS—verify in official docs how it maps in your environment. -
What layers does Web Application Firewall protect?
It’s primarily a Layer 7 (HTTP/HTTPS) protection service. It complements L3/L4 controls like NSGs and network firewalls. -
Does Web Application Firewall replace secure coding?
No. WAF reduces risk and blocks many common exploit patterns, but it does not fix application vulnerabilities or logic flaws. -
Can I run it in detection-only mode first?
Many WAF services support detect/monitor vs block modes for managed protections. If available, start with detection, tune, then move to blocking. Verify in your WAF policy options. -
What should I protect first?
Start with your highest-risk endpoints: login, admin paths, public APIs, checkout/payment flows, and any app with sensitive data. -
Will it add latency?
Any inspection layer can add some latency. In practice it’s typically small, but you should measure with real traffic patterns and enable only what you need. -
Can it block by country/region?
Some WAF offerings include geo-based rules. If your policy UI includes geo match conditions, you can use them. Verify availability in your tenancy/region. -
How do I avoid locking out legitimate users?
Use detection mode first, review logs, create narrow exceptions, and implement a safe rollback plan. Avoid broad deny rules unless necessary. -
Does it protect against DDoS?
WAF helps with certain application-layer floods (via rate limiting and early blocking). For volumetric DDoS, rely on Oracle’s network-level protections and architecture patterns. -
Can I protect multiple apps with one policy?
This depends on how Oracle Cloud structures “policy” and “protected targets.” Some models allow reusing policies across targets, others require per-target configuration. Verify in the Console and docs. -
Can I use Web Application Firewall without a load balancer?
Some deployment models protect a public hostname/origin directly (edge-style). Availability depends on your region and service options—verify. -
What logging should I enable?
Enable enough to investigate incidents and tune rules (deny events, rule triggers, request metadata). Avoid logging sensitive payloads or tokens. -
How do I integrate WAF logs with a SIEM?
Common patterns include exporting OCI logs via supported connectors/streams or forwarding from a centralized logging pipeline. The exact method depends on your observability stack—verify OCI logging export options. -
How do rate limits interact with NATed clients?
If many users share one IP (corporate NAT, mobile carrier NAT), IP-based rate limits can block legitimate traffic. Use higher thresholds or more specific conditions. -
Can I exempt health checks from being blocked?
Yes—typically by adding allow rules for health check paths/IPs or ensuring managed protections don’t block them. Validate after every policy change. -
What’s the best way to roll out changes safely?
Use staging environments, start in detection, use narrow scopes, and schedule changes with monitoring in place. Keep a rollback plan.
17. Top Online Resources to Learn Web Application Firewall
| Resource Type | Name | Why It Is Useful |
|---|---|---|
| Official documentation | Web Application Firewall docs (Oracle) — https://docs.oracle.com/en-us/iaas/Content/WAF/home.htm | Primary, current reference for features, concepts, and setup |
| Official documentation | OCI IAM docs — https://docs.oracle.com/en-us/iaas/Content/Identity/home.htm | Required to implement least privilege and secure operations |
| Official documentation | OCI Load Balancing docs — https://docs.oracle.com/en-us/iaas/Content/Balance/home.htm | Common integration point for regional WAF patterns |
| Official documentation | OCI Logging docs — https://docs.oracle.com/en-us/iaas/Content/Logging/home.htm | How to enable and operate WAF logs |
| Official documentation | OCI Monitoring docs — https://docs.oracle.com/en-us/iaas/Content/Monitoring/home.htm | Create alarms/dashboards for WAF and app health |
| Official pricing | Oracle Cloud Price List — https://www.oracle.com/cloud/price-list/ | Authoritative source of current WAF meters and rates |
| Official calculator | Oracle Cloud Cost Estimator — https://www.oracle.com/cloud/costestimator.html | Model expected request volume and architecture cost |
| Architecture center | Oracle Architecture Center — https://docs.oracle.com/en/solutions/ | Find reference architectures; search for WAF/edge security patterns |
| Release updates | OCI Updates — https://www.oracle.com/cloud/oci-updates/ | Track new WAF features/regions as they roll out |
| Tutorials/labs | Oracle Cloud “Learn” content — https://docs.oracle.com/en/learn/ | Guided OCI tutorials (search for WAF and related labs) |
| Samples | Oracle Learning Library (GitHub) — https://github.com/oracle/learning-library | Hands-on labs and patterns (verify WAF-specific content availability) |
| CLI tooling | OCI CLI docs — https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm | Useful for automation and repeatable lab environments |
18. Training and Certification Providers
| Institute | Suitable Audience | Likely Learning Focus | Mode | Website URL |
|---|---|---|---|---|
| DevOpsSchool.com | DevOps engineers, SREs, platform teams | DevOps/cloud operations with security integrations | check website | https://www.devopsschool.com/ |
| ScmGalaxy.com | Beginners to intermediate engineers | DevOps fundamentals, CI/CD, cloud basics | check website | https://www.scmgalaxy.com/ |
| CLoudOpsNow.in | Cloud operations teams | Cloud ops practices, monitoring, reliability | check website | https://www.cloudopsnow.in/ |
| SreSchool.com | SREs and reliability-focused teams | SRE practices, incident response, observability | check website | https://www.sreschool.com/ |
| AiOpsSchool.com | Ops teams exploring AIOps | AIOps concepts, automation, monitoring analytics | check website | https://www.aiopsschool.com/ |
19. Top Trainers
| Platform/Site | Likely Specialization | Suitable Audience | Website URL |
|---|---|---|---|
| RajeshKumar.xyz | DevOps/cloud training content (verify offerings) | Individuals and teams seeking guided learning | https://rajeshkumar.xyz/ |
| devopstrainer.in | DevOps training programs (verify offerings) | Beginners to intermediate DevOps practitioners | https://www.devopstrainer.in/ |
| devopsfreelancer.com | Freelance DevOps guidance (verify offerings) | Teams needing short-term coaching/support | https://www.devopsfreelancer.com/ |
| devopssupport.in | Operational support and training resources (verify offerings) | Ops teams needing practical troubleshooting help | https://www.devopssupport.in/ |
20. Top Consulting Companies
| Company | Likely Service Area | Where They May Help | Consulting Use Case Examples | Website URL |
|---|---|---|---|---|
| cotocus.com | Cloud/DevOps consulting (verify portfolio) | Architecture, automation, platform modernization | WAF rollout planning, landing zone integration, logging pipeline design | https://cotocus.com/ |
| DevOpsSchool.com | DevOps and cloud consulting/training | DevSecOps adoption, CI/CD, operational readiness | WAF policy-as-code approach, environment separation, incident runbooks | https://www.devopsschool.com/ |
| DEVOPSCONSULTING.IN | DevOps consulting services (verify offerings) | DevOps transformations and cloud operations | WAF + load balancer reference setup, monitoring and alerting baseline | https://www.devopsconsulting.in/ |
21. Career and Learning Roadmap
What to learn before Web Application Firewall
- Web fundamentals: HTTP methods, headers, cookies, status codes
- TLS basics: certificates, termination, HTTPS routing
- OCI networking: VCNs, subnets, route tables, IGW/NAT, NSGs
- OCI IAM: compartments, groups, policies, least privilege
- Load balancing basics: listeners, backend sets, health checks
What to learn after Web Application Firewall
- Secure SDLC and AppSec testing (SAST/DAST, dependency scanning)
- Threat modeling and OWASP ASVS
- Centralized logging/SIEM integration and detection engineering
- Advanced edge patterns: multi-region failover, DNS steering, zero-trust access
- Incident response playbooks for web attack scenarios
Job roles that use it
- Cloud Security Engineer
- DevSecOps Engineer
- SRE / Platform Engineer
- Cloud Solutions Architect
- Security Operations (SOC) Analyst (as a log consumer)
Certification path (Oracle Cloud)
Oracle certification offerings change over time and by track. For the most accurate path: – Check Oracle University and OCI certification pages (verify current cert names and objectives). – Focus areas that pair well with WAF: OCI networking, security, architecture, and operations.
Project ideas for practice
- Build a multi-service demo (frontend + API) and apply separate WAF rules per path.
- Create a tuning workflow: detect → log review → exception → block.
- Simulate credential stuffing with a test tool and tune rate limits safely.
- Centralize WAF logs into a single compartment and build alerts on deny spikes.
- Implement “break-glass” rollback: versioned policies and a documented revert procedure.
22. Glossary
- WAF (Web Application Firewall): A security control that inspects HTTP/HTTPS traffic and blocks malicious requests.
- Layer 7 (L7): The application layer in the OSI model; for web, this is HTTP/HTTPS.
- Policy: The set of WAF configurations (rules, protections, actions) applied to traffic.
- Managed rules / protection rules: Vendor-provided rule sets designed to detect common attack patterns.
- Access rule: A custom allow/deny rule based on request attributes (IP, path, method, headers, etc.).
- Rate limiting: Restricting request volume over time to reduce abuse and brute force attempts.
- False positive: Legitimate traffic incorrectly blocked by security rules.
- Origin: The backend application/service that receives traffic after it passes WAF.
- Compartment (OCI): A logical boundary for organizing and controlling access to OCI resources.
- NSG (Network Security Group): OCI construct for virtual firewall rules applied to VNICs/resources.
- Health check: A periodic request used by a load balancer to determine backend availability.
- Detect mode: A mode where suspected attacks are logged but not blocked (if supported).
- Block/Deny: An enforcement action where the request is stopped and not forwarded to the origin.
- OCI Audit: Service that records API calls and changes for governance and security tracking.
23. Summary
Oracle Cloud Web Application Firewall is a managed, policy-driven Layer 7 security service in the Security, Identity, and Compliance category that helps protect web applications and APIs from common threats like SQLi, XSS, abusive bots, and request floods.
It fits best in front of internet-facing OCI applications—commonly integrated with OCI Load Balancing—and complements network controls (NSGs, network firewalls) by adding application-aware inspection and enforcement. The key operational success factors are disciplined policy rollout (detect → tune → block), strong logging/monitoring, and least-privilege IAM.
From a cost standpoint, the biggest drivers are request volume (including attack traffic) and logging retention/ingestion. Use the official price list and cost estimator to model costs, and reduce unnecessary origin traffic with rate limiting and early blocking.
Next step: implement this lab in a sandbox compartment, validate logging/alerts, then design a production rollout plan with staged enforcement and clear rollback procedures using the official Web Application Firewall documentation: https://docs.oracle.com/en-us/iaas/Content/WAF/home.htm