Information Security 7 min read

Design and Implementation of a Cloud-Based Web Application Firewall at Ctrip

This article describes Ctrip's challenges with traditional hardware and cloud WAFs, presents a low‑cost, DNS‑based cloud WAF solution, and details its closed‑loop design, rule management, big‑data analytics, and machine‑learning techniques for accurate web security protection.

Ctrip Technology
Ctrip Technology
Ctrip Technology
Design and Implementation of a Cloud-Based Web Application Firewall at Ctrip

Facing high costs and inflexibility of hardware WAFs and limitations of commercial cloud WAFs, Ctrip's security team needed a low‑cost, low‑risk method to protect web services against threats such as malicious IPs, SQL injection, XSS, and zero‑day vulnerabilities.

The chosen solution is a cloud‑based Web Application Firewall (WAF) that is independent of backend services; deployment changes are limited to DNS redirection, providing a centralized platform without client modifications.

Key features include a centralized platform, DNS‑only integration, and shared detection information. The system follows a closed‑loop design: external and internal rule sources are dynamically loaded into a Storm‑based real‑time traffic processing framework for detection‑only testing, with offline analysis of alerts to refine rules.

Implementation uses Tengine and LuaJIT for high‑performance detection logic, exposing a RESTful API for management. Logs are streamed via Kafka, stored in Elasticsearch, and visualized in Kibana, while supervised machine‑learning models classify false‑positive logs.

Big‑data processing leverages Storm for real‑time traffic analysis and Spark Streaming with MLlib (SVM) for offline classification, enabling dynamic rule updates and automated responses such as one‑click enable/disable, bypass, and mode switching.

Future work focuses on improving efficiency, adding functionalities, and balancing performance with detection accuracy, including automation for unattended operation, auto‑whitelisting, and suspicious access identification.

big datamachine learningdevopsCloud SecurityWeb Application Firewall
Ctrip Technology
Written by

Ctrip Technology

Official Ctrip Technology account, sharing and discussing growth.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.