-
Notifications
You must be signed in to change notification settings - Fork 121
docs(auth): document passkey deployment #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alexj11324
wants to merge
1
commit into
OpenListTeam:main
Choose a base branch
from
alexj11324:codex/passkey-auth-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+91
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| --- | ||
| title: | ||
| en: Passkeys | ||
| zh-CN: 通行密钥 | ||
| categories: | ||
| - guide | ||
| - advanced | ||
| top: 109 | ||
| --- | ||
|
|
||
| ## Enable and manage passkeys { lang="en" } | ||
|
|
||
| ## 启用和管理通行密钥 { lang="zh-CN" } | ||
|
|
||
| ::: en | ||
|
|
||
| An administrator must enable the global `webauthn_login_enabled` setting before users | ||
| can register or sign in with passkeys. Each signed-in user can then open their profile to register, name, | ||
| rename, review, or revoke credentials. Password, LDAP, SSO, and recovery methods remain | ||
| available. | ||
|
|
||
| Disabling the setting hides passkey login and management in the supported UI and rejects | ||
| new registration and login ceremonies. It does not delete stored credentials. Re-enabling | ||
| the setting makes them available again. | ||
|
|
||
| Credentials created by earlier OpenList versions remain valid. They appear with a | ||
| generated name and unknown creation metadata until renamed; `last_used_at` is populated | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
| after a successful assertion. No database migration or credential re-registration is | ||
| required. | ||
|
|
||
| ::: | ||
|
|
||
| ::: zh-CN | ||
|
|
||
| 管理员必须先启用全局设置 `webauthn_login_enabled`,用户才能注册通行密钥或使用通行密钥登录。 | ||
| 登录后的用户可以在个人资料中注册、命名、重命名、查看或撤销凭据。密码、LDAP、SSO | ||
| 和恢复方式仍然可用。 | ||
|
|
||
| 关闭该设置后,受支持的界面会隐藏通行密钥登录和管理功能,并拒绝新的注册和登录流程, | ||
| 但不会删除已保存的凭据。重新启用后,这些凭据会再次可用。 | ||
|
|
||
| 旧版 OpenList 创建的 WebAuthn 凭据仍然有效。它们会显示自动生成的名称,创建时间显示为 | ||
| 未知,用户可以手动重命名;成功完成一次验证后会写入 `last_used_at`。无需执行数据库迁移, | ||
| 也无需重新注册凭据。 | ||
|
|
||
| ::: | ||
|
|
||
| ## Deployment requirements { lang="en" } | ||
|
|
||
| ## 部署要求 { lang="zh-CN" } | ||
|
|
||
| ::: en | ||
|
|
||
| - Production deployments must set `site_url` to the canonical absolute HTTPS URL that | ||
| users open, for example `https://files.example.com`. | ||
| - WebAuthn validates the exact public origin (scheme, host, and port) and uses the | ||
| configured hostname as the RP ID. A different domain, HTTP outside localhost, or a | ||
| mismatched port is rejected. | ||
| - A reverse proxy must preserve the public `Host` and `X-Forwarded-Proto: https` values. | ||
| Do not rewrite passkey requests to a different externally visible origin. | ||
| - Challenges are server-side, one-time, and expire after five minutes. They are stored | ||
| in process memory; restarting OpenList invalidates only pending ceremonies, not saved | ||
| credentials. | ||
| - Run a single OpenList process when passkeys are enabled. A multi-replica deployment | ||
| requires a shared challenge store with atomic consume semantics before enabling | ||
| passkeys. | ||
| - User verification is required. OpenList does not silently fall back to a weaker | ||
| ceremony if the authenticator cannot verify the user. | ||
|
|
||
| After changing `site_url` or proxy routing, complete a new registration and sign-in from | ||
| the public URL to verify the final origin. | ||
|
|
||
| ::: | ||
|
|
||
| ::: zh-CN | ||
|
|
||
| - 生产环境必须把 `site_url` 设置为用户实际访问的规范 HTTPS 绝对地址,例如 | ||
| `https://files.example.com`。 | ||
| - WebAuthn 会严格验证公开来源(协议、主机和端口),并使用配置地址的主机名作为 RP ID。 | ||
| 域名不同、在 localhost 之外使用 HTTP,或端口不匹配时都会拒绝验证。 | ||
| - 反向代理必须保留公开的 `Host` 和 `X-Forwarded-Proto: https`。不要把通行密钥请求 | ||
| 改写为另一个对外可见的来源。 | ||
| - 质询保存在服务端、只能使用一次,并在五分钟后过期。质询存放在进程内存中;重启 | ||
| OpenList 只会使正在进行的流程失效,不会删除已保存的凭据。 | ||
| - 启用通行密钥时应只运行一个 OpenList 进程。多副本部署必须先提供支持原子消费的共享 | ||
| 质询存储,然后才能启用通行密钥。 | ||
| - 必须完成用户验证。如果验证器无法验证用户,OpenList 不会静默降级到安全性更弱的流程。 | ||
|
|
||
| 修改 `site_url` 或代理路由后,请从公开地址重新完成一次注册和登录,以验证最终来源。 | ||
|
|
||
| ::: | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The front-end display name should be used instead of the code name.
应使用前端显示名称而非代码名称。