Skip to main content

Core Concepts

As CasWAF's administrator, you should get familiar with at least 2 core concepts: Site, Cert.

Site

In CasWAF, Site is representing the real applications or websites you wish to protect. Each Site is associated with specific domain names or IP addresses, and you can configure multiple Sites according to different needs to ensure comprehensive security protection for all your applications.

The Site class definition is shown as follows:

type Site struct {
Owner string `xorm:"varchar(100) notnull pk" json:"owner"`
Name string `xorm:"varchar(100) notnull pk" json:"name"`
CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
DisplayName string `xorm:"varchar(100)" json:"displayName"`

Domain string `xorm:"varchar(100)" json:"domain"`
Host string `xorm:"varchar(100)" json:"host"`
SslMode string `xorm:"varchar(100)" json:"sslMode"`
SslCert string `xorm:"varchar(100)" json:"sslCert"`
PublicIp string `xorm:"varchar(100)" json:"publicIp"`
Node string `xorm:"varchar(100)" json:"node"`
IsSelf bool `json:"isSelf"`

CasdoorApplication string `xorm:"varchar(100)" json:"casdoorApplication"`

SslCertObj *Cert `xorm:"-" json:"sslCertObj"`
ApplicationObj *casdoor.Application `xorm:"-" json:"applicationObj"`
}

Cert

In CasWAF, Cert is representing the certificates used for HTTPS authentication. By configuring Cert, CasWAF can establish secure encrypted connections between itself and the clients, ensuring the confidentiality and integrity of data and preventing information leakage and tampering attacks.

The Cert class definition is shown as follows:

type Cert struct {
Owner string `xorm:"varchar(100) notnull pk" json:"owner"`
Name string `xorm:"varchar(100) notnull pk" json:"name"`
CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
DisplayName string `xorm:"varchar(100)" json:"displayName"`

Type string `xorm:"varchar(100)" json:"type"`
CryptoAlgorithm string `xorm:"varchar(100)" json:"cryptoAlgorithm"`
ExpireTime string `xorm:"varchar(100)" json:"expireTime"`

Certificate string `xorm:"mediumtext" json:"certificate"`
PrivateKey string `xorm:"mediumtext" json:"privateKey"`
}