Firewall, WAF & API Gateway
Perimeter and gateway controls filter traffic and enforce policy before requests reach your services. They add defense in depth; they do not replace application-level security.
Three Layers, Three Purposes
Network firewalls, web application firewalls, and API gateways are often confused. Each works at a different level and solves a different problem.
Network Firewall
- Controls network traffic using configured rules (addresses, ports, protocols).
- Restricts unauthorized connections between networks and services.
Web Application Firewall (WAF)
- Inspects HTTP requests to help detect and block malicious traffic.
- Can mitigate common attack patterns such as injection and XSS payloads.
API Gateway
- Routes API requests to the right backend services.
- Supports authentication integration, rate limiting, request restrictions, and policy enforcement.
| Network Firewall | WAF | API Gateway | |
|---|---|---|---|
| Works with | IP addresses, ports, protocols | HTTP requests and responses | API routes, clients, and policies |
| Main goal | Allow or block connections | Filter malicious web traffic | Route and govern API traffic |
| Cannot decide | Whether an HTTP request is malicious | Whether a user owns a record | Whether a user owns a record |
Reference Architecture
- ClientBrowser, mobile app, or partner system.
- Firewall / WAFBlocks disallowed connections and malicious HTTP patterns.
- API GatewayTLS, routing, token checks, rate and size limits.
- Backend APIsBusiness logic and object/function-level authorization.
- Data ServicesDatabases and storage reachable only from backend services.
- Public
- Edge filtering
- Gateway
- Private network
A WAF or API gateway does not replace application-level authorization. They can check that a token is valid and filter known attack patterns, but only the application knows whether a user is allowed to access a particular record. Backend services must still enforce their own permission checks.
Controls We Review
TLS and Secure Communication
Encrypt traffic in transit with current TLS versions and strong cipher suites, valid certificates, and HSTS. Consider encrypting internal service-to-service traffic too.
Request Size and Rate Limits
Cap body size, header size, upload size, and request rate per client so a single caller cannot exhaust resources.
Logging and Monitoring
Log blocked requests, authentication failures, and rate-limit events, without recording tokens, passwords, or personal data. Alert on unusual patterns.
Backend Access Restrictions
Backend services should accept traffic only from the gateway or approved internal sources, so the gateway cannot be bypassed.
Secure Configuration and Rule Reviews
Review firewall rules, WAF rule sets, and gateway routes regularly. Remove unused routes and overly broad rules, and test changes before rollout.
Gateway Policies
Apply authentication, CORS, allowed methods, and schema checks consistently across routes, including older API versions that are still exposed.
Practical Experience
FEGO's development team has worked through findings from third-party VAPT assessments of fintech mobile apps, web portals, and APIs: analyzing each report, planning fixes, and implementing them. The examples below are generalized and describe the kinds of issues we have worked on. They are not a statement about the current security of any application.
TLS configuration
Disabling weak TLS versions and cipher suites so traffic is protected with current encryption.
Web server software
Keeping web server software up to date and removing version details from responses.
Security headers
Configuring response headers that tell browsers to apply extra protections.
CORS policies
Limiting which origins may call an application's APIs from a browser.
Request limits
Applying rate and size limits at the application or gateway layer to reduce automated abuse.
This experience comes from application and server configuration findings. It does not mean FEGO deployed or operated a firewall, WAF, or API gateway for the systems involved.
Remediation and Validation
Remediation approach
- Review each finding and reproduce it safely in a test environment
- Prioritize by severity and business impact
- Agree the fix using standard references such as CWE and OWASP
- Plan the frontend, backend, and testing work for each fix
- Fix the root cause on the server, not only in the client
Validation and reporting
- Verify each fix in internal testing before release
- Track the status of every finding, from open to fixed
- Flag fixes that need a business decision or further checks
- Support retesting by the assessor or client; a finding is closed only when retesting confirms the fix
- Document what changed and any remaining risk
Explore Security Services
Strengthen Your Application Security
Let's discuss your security requirements and identify the right approach for your applications and APIs.