Aller au contenu principal

Overview

CasWAF is an open-source Web Application Firewall (WAF) software developed by Go and React.

CasWAF features

  1. Front-end and back-end separate architecture, developed by Golang, CasWAF provides web-based managing UI and supports multiple languages(Chinese, English).

  2. Databases. CasWAF supports mainstream databases: MySQL, PostgreSQL, SQL Server, etc.

  3. Casdoor SSO. CasWAF uses Casdoor as the Identity Provider (IdP) for OAuth login.

  4. Reverse proxy. CasWAF supports reverse proxy, which can be used as a reverse proxy server to protect the backend server.

  5. OAuth proxy. CasWAF supports OAuth login, which can be integrated with the existing OAuth system such as Casdoor.

  6. Firewall. CasWAF uses Coraza as the firewall engine, which can protect the website from many common attack categories. Supports customized WAF rules.

How it works

CasWAF has both reverse proxy and OAuth proxy functionalities. If you haven't configured OAuth for your website, it will function solely as a reverse proxy server.

Reverse proxy

CasWAF appears externally as a reverse proxy server, providing an additional layer of security for your web servers and applications.

It sits between the users and web servers, acting as an intermediary, receiving requests from users, and forwarding them to the target web servers.

OAuth proxy

CasWAF OAuth proxy acts as an Identity Provider (IdP) and collaborates with your application to perform authentication and authorization through the OAuth protocol.

When a user attempts to access a resource that requires authentication, CasWAF will redirect the user to the real Identity Provider (IdP).

Subsequently, the OAuth proxy will guide the user to the configured Identity Provider (e.g., Google, Facebook, or an internal authentication service within the company) for authentication.

In CasWAF, we use Casdoor as the Identity Provider (IdP). More information of Casdoor SSO can be found here.

Online Demo

Here is an online demo:

Global admin login:

  • Username: admin
  • Password: 123

Architecture

Caswaf contains 2 parts:

NameDescriptionLanguageSource code
FrontendWeb frontend UI for CasWAFJavascript + Reacthttps://github.com/casbin/caswaf/tree/master/web
BackendRESTful API backend for CAsWAFGolang + Beego + MySQLhttps://github.com/casbin/caswaf