CasWAF
Operations

Configuration

CasWAF reads conf/app.conf from its working directory when it starts; restart it after a change. Sites, certificates, rules and nodes are not in this file: they are in the database and are changed in the console.

Server

KeyDefaultMeaning
appnamecaswafName of the program
httpport17000Port of the console and the API
runmodedevBeego's run mode
SessionOn, copyrequestbodytrueBeego settings that CasWAF needs; leave them on
redisEndpointemptyKeep console sessions in Redis (host:port) instead of files in tmp/
languageenLanguage of the names CasWAF gives its own Windows shortcuts

Database

KeyDefaultMeaning
driverNamemysqlmysql, postgres, mssql or sqlite
dataSourceNameroot:123@tcp(localhost:3306)/Connection string, without the database name
dbNamecaswafDatabase name; also the name CasWAF registers itself under for autostart
tableNamePrefixemptyPrefix for the table names
showSqlfalsePrint every SQL statement

The database must exist unless CasWAF is started with -createDatabase=true. The tables are created and updated on every start.

Gateway

KeyDefaultMeaning
gatewayEnabledtrueRun the gateway; false runs only the console and API
gatewayHttpPort80Plain HTTP port
gatewayHttpsPort443HTTPS port
trustedProxiesprivate rangesProxies whose X-Forwarded-For is believed; see Client IP behind a proxy

Casdoor

KeyMeaning
casdoorEndpointCasdoor's address
clientId, clientSecretCasWAF's application in Casdoor
casdoorOrganization, casdoorApplicationIts organization and name
isDemoModetrue refuses every change through the API

See Sign in with Casdoor; the console's own sign-in settings are in web/src/Conf.js.

Certificates

KeyMeaning
acmeEmail, acmePrivateKeyThe Let's Encrypt account; see Let's Encrypt
httpProxyA SOCKS5 proxy, host:port, for looking up domain expiry dates; skipped when it cannot be reached

Deployment of Casbin's own applications

appDir, appMap, dbRegionId, dbAccessKeyId, dbAccessKeySecret, dbInstanceId, dbHost, dbUser, dbPass, clientIdPrefix and clientSecretPrefix belong to the code that deploys Casbin's own applications onto gateway nodes; see the roadmap. Of these, only appDir matters otherwise: self-update builds CasWAF's new program under <appDir>/_bin/.

Environment variables

These keys can be overridden by an environment variable of the same name, which is handy in containers: driverName, dataSourceName, dbName, tableNamePrefix, showSql, trustedProxies, isDemoMode, httpport and appname. The rest are read from the file only.

VariableEffect
RUNNING_IN_DOCKER=trueReplace localhost in dataSourceName with the Docker host

Settings in the database

The Settings page holds the settings that can change while CasWAF runs. Today that is Record retention days; see Request records.

Edit on GitHub

On this page