Identity authentication
Put a sign-in step in front of protected sites with gateway users and one-time codes, access approval, LDAP, single sign-on through OIDC, GitHub, CAS, DingTalk and WeCom, and per-site scope and session settings.
Business and API security > Identity authentication (身份认证) is a sign-in gateway in front of protected sites. Visitors to a site with identity authentication sign in first and are forwarded to the upstream only afterwards; the upstream can read the signed-in identity from request headers. For signing in to the console itself, see Accounts and permissions.
The page has seven tabs: gateway users, access approval, user source, identity providers, single sign-on, sites and sign-in log. The top shows the gateway's status, such as not deployed, configuration being applied, configuration not applied, restarting or not responding.
Prerequisites
- The site has an HTTPS port, redirects HTTP to HTTPS and does not use a wildcard domain.
- In a multi-node deployment, nodes must reach ports 9445 and 9446 on the control plane host. If they cannot, protected paths return 502 (connection refused or not established within 5 seconds) or 504 (no response within 15 seconds), and nothing is passed to the upstream.
- While the control plane is down, sites with identity authentication return 502.
User source
| Source | Description |
|---|---|
| Built-in users (内置用户) | Default. Create them under Gateway users (网关用户) with user name, display name, email and groups. The initial password and the one-time code QR code are shown once. Passwords can be reset, one-time codes set or removed, and users disabled |
| LDAP | Type: Active Directory, OpenLDAP (RFC2307bis), FreeIPA, LLDAP, GLAuth or custom. Enter the address, base DN, bind account and password, and the additional DNs and filters for users and groups, then Test connection and Save and switch (保存并切换). Needs a Standard or higher licence |
Single sign-on
Add providers under Identity providers (身份提供方). The page shows the callback URL to register with the provider:
| Type | Description |
|---|---|
| OIDC | Keycloak, Azure AD, Okta, Authing, and the OIDC endpoints of Feishu or DingTalk, among others. Enter the issuer, client ID and secret, scopes and claim mapping; UserInfo can be merged and signing out can also sign out of the provider |
| GitHub / GitHub Enterprise | Can be limited to allowed organisations |
| CAS 2.0 / 3.0 | |
| DingTalk | QR sign-in or in-app sign-in, with optional organisation membership check |
| WeCom | QR sign-in or in-app authorisation, with optional organisation membership check |
SAML is not supported. Provider addresses must use HTTPS, except internal addresses, which may use HTTP. In offline mode only internal addresses can be reached, so the public cloud services of DingTalk and WeCom work only with RSTWAF_ONLINE_FEATURES=on; dedicated or privately deployed instances on internal addresses work offline.
The Single sign-on (单点登录) tab sets the SSO centre used for cross-domain sign-on (an HTTPS site domain) and the session idle and maximum lifetimes, and lists active sessions, which you can end.
Turn it on for a site
Under Sites and nodes, open the Identity authentication tab in the site details:
| Setting | Description | Default |
|---|---|---|
| Sign-in protection | On or off | |
| Scope | Whole site or selected protected paths | |
| Exempt paths | Paths that need no sign-in | |
| Sign-in method | Gateway account (password plus one-time code, or password only) or single sign-on (choose a provider) | |
| Allowed users / groups | Only listed users or groups get access | |
| Identity headers | Header names for user name, groups, display name and email passed to the upstream | |
| Bind session to client IP | A change of client IP requires signing in again | |
| Idle timeout | 1 to 1440 minutes | 60 |
| Maximum session lifetime | Up to 43200 minutes | 720 |
| Access approval | New users need administrator approval on first access |
With access approval on, pending requests appear under Access approval (访问审批), where they can be approved, rejected or revoked.
Sign-in log
Query by site, user name, IP, sign-in method, event (sign-in, one-time code, sign-out, revoke) and result (success, failure, denied), and export. Entries are kept for 180 days.
Limits
- The Kubernetes Helm chart does not include the identity gateway.
- The gateway's session and one-time code secrets are kept in
.env. RotatingRSTWAF_AUTHGW_STORAGE_KEYmakes enrolled one-time codes unreadable, and they must be enrolled again in the console.
API security
API discovery, risk items, OpenAPI validation, GraphQL policy, sensitive data and cross-border data flows, broken authorisation detection, plus API authentication, gRPC, WebSocket and LLM / MCP endpoint protection.
System settings
The General, Online updates, Branding and Configuration import and export pages in Settings.