Skip to content

Commit 4504831

Browse files
committed
docs: update documentation about webauthn passkey
1 parent 2f51b56 commit 4504831

File tree

11 files changed

+734
-299
lines changed

11 files changed

+734
-299
lines changed

docs/.vitepress/config/en.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4141
{text: 'Logrotate', link: '/guide/config-logrotate'},
4242
{text: 'Cluster', link: '/guide/config-cluster'},
4343
{text: 'Auth', link: '/guide/config-auth'},
44-
{text: 'Crypto', link: '/guide/config-crypto'}
44+
{text: 'Crypto', link: '/guide/config-crypto'},
45+
{text: 'Webauthn', link: '/guide/config-webauthn'}
4546
]
4647
},
4748
{

docs/.vitepress/config/zh_CN.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4646
{text: 'Logrotate', link: '/zh_CN/guide/config-logrotate'},
4747
{text: '集群', link: '/zh_CN/guide/config-cluster'},
4848
{text: '认证', link: '/zh_CN/guide/config-auth'},
49-
{text: '加密', link: '/zh_CN/guide/config-crypto'}
49+
{text: '加密', link: '/zh_CN/guide/config-crypto'},
50+
{text: 'Webauthn', link: '/zh_CN/guide/config-webauthn'},
5051
]
5152
},
5253
{

docs/.vitepress/config/zh_TW.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4545
{text: 'Logrotate', link: '/zh_TW/guide/config-logrotate'},
4646
{text: '集群', link: '/zh_TW/guide/config-cluster'},
4747
{text: '認證', link: '/zh_TW/guide/config-auth'},
48-
{text: '加密', link: '/zh_TW/guide/config-crypto'}
48+
{text: '加密', link: '/zh_TW/guide/config-crypto'},
49+
{text: 'Webauthn', link: '/zh_TW/guide/config-webauthn'},
4950
]
5051
},
5152
{

docs/guide/config-webauthn.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Webauthn
2+
Webauthn is a web standard for secure authentication. It allows users to log in to websites using biometrics, mobile devices, and FIDO security keys.
3+
Webauthn is a passwordless authentication method that provides a secure and easy-to-use alternative to passwords.
4+
5+
Since `v2.0.0-beta.34`, Nginx UI has supported Webauthn passkey as a login and 2FA method.
6+
7+
## Passkey
8+
Passkeys are webauthn credentials that validate your identity using touch, facial recognition, a device password, or a PIN. They can be used as a password replacement or as a 2FA method.
9+
10+
## Configurations
11+
To ensure security, Webauthn configuration cannot be added through the UI.
12+
13+
Please manually configure the following in the app.ini configuration file and restart Nginx UI.
14+
15+
### RPDisplayName
16+
- Type: `string`
17+
18+
This option is used to set the display name of the relying party (RP) when registering a new credential.
19+
20+
### RPID
21+
- Type: `string`
22+
23+
This option is used to set the ID of the relying party (RP) when registering a new credential.
24+
25+
### RPOrigins
26+
- Type: `[]string`
27+
28+
This option is used to set the origins of the relying party (RP) when registering a new credential.
29+
30+
31+
Afterward, refresh this page and click add passkey again.
32+
33+
Due to the security policies of some browsers, you cannot use passkeys on non-HTTPS websites, except when running on `localhost`.
34+
35+
## Detail
36+
1. **Automatic 2FA with Passkey:**
37+
When you log in using a passkey, all subsequent actions requiring 2FA will automatically use the passkey. This means you won’t need to manually click “Authenticate with a passkey” in the 2FA dialog box.
38+
2. **Passkey Deletion:**
39+
If you log in using a passkey and then navigate to Settings > Authentication and delete the current passkey, the passkey will no longer be used for subsequent 2FA challenges during the current session. If Time-based One-Time Password (TOTP) is configured, it will be used instead; if not, 2FA will not be triggered.
40+
3. **Adding a New Passkey:**
41+
If you log in without using a passkey and then add a new passkey via Settings > Authentication, the newly added passkey will be prioritized for all subsequent 2FA actions during the current session.

docs/guide/env.md

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Environment Variables
2+
23
Applicable for version v2.0.0-beta.23 and above.
34

45
## Server
@@ -25,50 +26,58 @@ Applicable for version v2.0.0-beta.23 and above.
2526

2627
## Nginx
2728

28-
| Configuration Setting | Environment Variable |
29-
| ----------------------------- | ------------------------------------- |
30-
| AccessLogPath | NGINX_UI_NGINX_ACCESS_LOG_PATH |
31-
| ErrorLogPath | NGINX_UI_NGINX_ERROR_LOG_PATH |
32-
| ConfigDir | NGINX_UI_NGINX_CONFIG_DIR |
33-
| PIDPath | NGINX_UI_NGINX_PID_PATH |
34-
| TestConfigCmd | NGINX_UI_NGINX_TEST_CONFIG_CMD |
35-
| ReloadCmd | NGINX_UI_NGINX_RELOAD_CMD |
36-
| RestartCmd | NGINX_UI_NGINX_RESTART_CMD |
29+
| Configuration Setting | Environment Variable |
30+
|-----------------------|--------------------------------|
31+
| AccessLogPath | NGINX_UI_NGINX_ACCESS_LOG_PATH |
32+
| ErrorLogPath | NGINX_UI_NGINX_ERROR_LOG_PATH |
33+
| ConfigDir | NGINX_UI_NGINX_CONFIG_DIR |
34+
| PIDPath | NGINX_UI_NGINX_PID_PATH |
35+
| TestConfigCmd | NGINX_UI_NGINX_TEST_CONFIG_CMD |
36+
| ReloadCmd | NGINX_UI_NGINX_RELOAD_CMD |
37+
| RestartCmd | NGINX_UI_NGINX_RESTART_CMD |
3738

3839
## OpenAI
3940

40-
| Configuration Setting | Environment Variable |
41-
| ----------------------------- | ------------------------------------- |
42-
| Model | NGINX_UI_OPENAI_MODEL |
43-
| BaseUrl | NGINX_UI_OPENAI_BASE_URL |
44-
| Proxy | NGINX_UI_OPENAI_PROXY |
45-
| Token | NGINX_UI_OPENAI_TOKEN |
41+
| Configuration Setting | Environment Variable |
42+
|-----------------------|--------------------------|
43+
| Model | NGINX_UI_OPENAI_MODEL |
44+
| BaseUrl | NGINX_UI_OPENAI_BASE_URL |
45+
| Proxy | NGINX_UI_OPENAI_PROXY |
46+
| Token | NGINX_UI_OPENAI_TOKEN |
4647

4748
## Casdoor
4849

49-
| Configuration Setting | Environment Variable |
50-
| ----------------------------- | ------------------------------------- |
51-
| Endpoint | NGINX_UI_CASDOOR_ENDPOINT |
52-
| ClientId | NGINX_UI_CASDOOR_CLIENT_ID |
53-
| ClientSecret | NGINX_UI_CASDOOR_CLIENT_SECRET |
54-
| Certificate | NGINX_UI_CASDOOR_CERTIFICATE |
55-
| Organization | NGINX_UI_CASDOOR_ORGANIZATION |
56-
| Application | NGINX_UI_CASDOOR_APPLICATION |
57-
| RedirectUri | NGINX_UI_CASDOOR_REDIRECT_URI |
50+
| Configuration Setting | Environment Variable |
51+
|-----------------------|--------------------------------|
52+
| Endpoint | NGINX_UI_CASDOOR_ENDPOINT |
53+
| ClientId | NGINX_UI_CASDOOR_CLIENT_ID |
54+
| ClientSecret | NGINX_UI_CASDOOR_CLIENT_SECRET |
55+
| Certificate | NGINX_UI_CASDOOR_CERTIFICATE |
56+
| Organization | NGINX_UI_CASDOOR_ORGANIZATION |
57+
| Application | NGINX_UI_CASDOOR_APPLICATION |
58+
| RedirectUri | NGINX_UI_CASDOOR_REDIRECT_URI |
5859

5960
## Logrotate
6061

61-
| Configuration Setting | Environment Variable |
62-
| ----------------------------- | ------------------------------------- |
63-
| Enabled | NGINX_UI_LOGROTATE_ENABLED |
64-
| CMD | NGINX_UI_LOGROTATE_CMD |
65-
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
62+
| Configuration Setting | Environment Variable |
63+
|-----------------------|-----------------------------|
64+
| Enabled | NGINX_UI_LOGROTATE_ENABLED |
65+
| CMD | NGINX_UI_LOGROTATE_CMD |
66+
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
6667

6768
## Auth
6869

69-
| Configuration Setting | Environment Variable |
70-
|-----------------------|-----------------------------|
71-
| IPWhiteList | NGINX_UI_AUTH_IPWhiteList |
70+
| Configuration Setting | Environment Variable |
71+
|-----------------------|---------------------------|
72+
| IPWhiteList | NGINX_UI_AUTH_IPWhiteList |
73+
74+
## Webauthn
75+
76+
| Configuration Setting | Environment Variable |
77+
|-----------------------|-----------------------------------|
78+
| RPDisplayName | NGINX_UI_WEBAUTHN_RP_DISPLAY_NAME |
79+
| RPID | NGINX_UI_WEBAUTHN_RPID |
80+
| RPOrigins | NGINX_UI_WEBAUTHN_RP_ORIGINS |
7281

7382
## Predefined User
7483

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"docs:preview": "vitepress preview"
88
},
99
"dependencies": {
10-
"vitepress": "^1.3.1",
11-
"vue": "^3.4.33"
10+
"vitepress": "^1.3.4",
11+
"vue": "^3.5.6"
1212
},
1313
"devDependencies": {
14-
"@types/node": "^20.14.11",
14+
"@types/node": "^20.16.5",
1515
"less": "^4.2.0"
1616
},
1717
"license": "AGPL-3.0",

0 commit comments

Comments
 (0)