Sign-in and third-party sign-in
Console account sign-in, one-time codes and sign-in security settings, setting up Feishu or Lark QR sign-in, and the single exception for offline deployments.
The console uses its own accounts, created under Settings > Account management. Sign-in supports one-time codes (TOTP), and Feishu or Lark QR sign-in can be added.
This page covers signing in to the console only. Visitors signing in to protected sites (built-in users, LDAP, OIDC, GitHub, CAS, DingTalk, WeCom) are handled by the identity gateway; see Identity authentication.
Account sign-in
- The initial password must be changed at first sign-in. Passwords created or reset by an administrator are shown only once.
- Password policy, sign-in lockout, session timeouts and the console IP allow list are set under Settings > Security; see Accounts and permissions.
- Each account can turn on one-time codes under Account and security. With
RSTWAF_REQUIRE_TOTP=onin.env, every account must enrol.
Feishu QR sign-in
Administrators can sign in to the console by scanning a QR code with Feishu or Lark. The Feishu identity must first be linked to a console account, unless automatic account creation is on.
Prerequisites
- The Modify system settings permission.
- A custom app on the Feishu Open Platform, or a privately deployed Feishu.
- The control plane can reach the Feishu open API. In offline deployments, tick Allow internet access to Feishu (允许访问公网飞书), or use internal addresses of a private deployment.
- A master key (generated automatically at installation).
Steps
- On the Feishu Open Platform, get the App ID and App Secret from Custom app > Credentials & basic info.
- In the console, under Settings > Third-party sign-in (第三方登录), turn on the Enable (启用) switch in the Feishu QR sign-in (飞书扫码登录) section, enter the App ID and App Secret, and select Test connection (测试连接). The App Secret is write-only: it is never shown again after saving and is stored encrypted with the master key.
- Enter the Console address (控制台访问地址), for example
https://waf.example.com. Copy the Callback URL (回调地址) shown on the page into App > Security settings > Redirect URLs on the Feishu Open Platform. The two must match exactly. - Set the options under Advanced as needed, then save.
- Under Settings > Account management, link each console account to Feishu. The link is completed the first time the account scans.
The sign-in page then shows Sign in with Feishu QR code (or Sign in with Lark QR code) below the password form.
Advanced options
| Option | Description | Default |
|---|---|---|
| Platform | Feishu (feishu.cn) or Lark | Feishu |
| Allow internet access to Feishu | In offline deployments, lets only this feature reach the official Feishu or Lark open API; every other outbound connection stays closed. Changes are recorded in the audit log | Off |
| Private deployment addresses | Sign-in and open API addresses of a private Feishu; internal addresses work in offline mode | |
| Match by | Feishu user_id (recommended; unique within the organisation and not editable by employees), email or mobile number. Email and mobile numbers in the directory are imported by administrators and not verified, so also restrict the tenant when using them | Feishu user_id |
| Create accounts automatically | Creates a console account the first time an unlinked Feishu user signs in. Needs a default role, which cannot be super administrator | Off |
| Treat Feishu sign-in as two-step verification | When off, accounts with one-time codes still enter their code after scanning (recommended) | Off |
| Allowed tenants (tenant_key) | One per line; empty means no restriction. Always fill this in for store apps or multi-tenant use | No restriction |
The sign-in page itself loads no Feishu scripts or images; the button takes the whole page to the Feishu authorisation page for scanning. The control plane sends Feishu only the authorisation code and app credentials to read the signed-in identity, and never sends events, sites or configuration.
Other identity sources
Console sign-in currently supports only its own accounts and Feishu or Lark QR sign-in. OIDC, SAML and LDAP are not supported for the console. If the console sits behind an HTTPS reverse proxy, set RSTWAF_COOKIE_SECURE=1 and RSTWAF_CONSOLE_TRUSTED_PROXIES; see Configuration reference.
Kubernetes
Deploy to Kubernetes with the Helm chart in the package, covering components, offline image import, installation and first sign-in, gateway integration, upgrade and uninstall, and limits.
Upgrade and backup
Upgrade by hand with upgrade.sh, drain before upgrading, roll back automatically on failure, use online updates and offline import, understand automatic rule updates and the false-positive safety valve, and protect the control plane with upgrade backups, cold standby and hot standby.