Repository navigation
Conversation
sponge225
force-pushed
the
sponge/remove-dev-auth-mode
branch
2 times, most recently
from
October 20, 2026 12:06
a09e23b to
cebbe3a
Compare
sponge225
force-pushed
the
sponge/remove-dev-auth-mode
branch
from
October 21, 2026 06:56
cebbe3a to
c0065dd
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
本 PR 移除 OpenViking 生产运行时中的
dev认证模式,并把默认认证路径收敛到显式认证。此前,当
server.auth_mode和server.root_api_key都未配置时,Server 会自动进入dev模式。在该模式下,请求不需要提供有效凭证,并会被解析为默认的ROOT/default/default身份。该行为容易把“监听在本机”误当作认证边界;一旦服务被代理、端口被转发,或浏览器可以跨源访问本地接口,无凭证调用方就可能获得过高权限。本次修改的核心目标是删除这条无凭证认证路径:
auth_mode = "dev"不再是合法运行模式;auth_mode时,Server 默认选择api_key;api_key和trusted模式都要求配置server.root_api_key;trusted + root_api_key + account/user;api_key;这是一个 breaking change。依赖旧 Dev / keyless 模式的配置需要迁移。
Human Involvement
Related Issue
Type of Change
Changes Made
1. 删除 Server 端 Dev 认证模式
openviking/server/auth/plugins/dev.py;auth_mode时,默认使用api_key;auth_mode = "dev"时启动失败,并提示使用openviking-server init迁移;dev不允许重新注册为自定义认证模式。2. 调整本地初始化与迁移流程
openviking-server init现在按部署方式生成显式认证配置:trusted模式配置,并写入 root key;api_key模式配置,并要求配置 root key;api_key,避免 Gateway 运行在 Trusted 模式下。旧配置不会在更新 VLM 或 Embedding 时被静默迁移。认证配置缺失或仍使用 Dev 时,启动错误会提示运行
openviking-server init并选择Update server & auth。3. 更新 CLI、Gateway、VikingBot 和 Web Studio 的认证语义
ov config改为先读取/health,并在服务端需要认证时要求 API key;default/defaultROOT;4. 插件安装器不再生成 keyless 配置
http://127.0.0.1:1933的无 keyovcli.conf;5. 更新文档、示例和测试
DevAuthPlugin的依赖;Current Scope Note
本 PR 曾包含一组更大的后续修复,但为避免清理工作膨胀,相关提交已通过
Revert over-scoped auth setup changes回退。当前 PR 正文只描述远端分支c04652a57仍实际包含的修改。因此,本文不再声明以下事项已经完成:
account/user时的完整 fail-fast 修复;server.root_api_key的统一 strip / fail-fast;examples/ov.conf.example固定示例 root key 的最终安全化处理;这些内容如果继续处理,应作为后续更小、更聚焦的修复提交进入本 PR 或单独 PR。
Testing
Local verification performed during this PR
历史执行结果包括:
116 passed, 0 failed;274 passed, 0 failed;169 passed, 0 failed,production build 成功;Current CI status
回退并推送当前范围后,GitHub Actions 已重新运行。更新本文时,已观察到多项构建、文档、Hermes 和 quick local platform checks 通过;部分集成、依赖和插件检查仍以 GitHub 最新状态为准。
Checklist
Screenshots (if applicable)
不适用。本 PR 主要调整认证流程、配置向导和权限边界,行为由自动化测试覆盖。
Additional Notes
兼容性影响
以下旧配置将不再启动:
{ "server": { "auth_mode": "dev" } }未配置
auth_mode和root_api_key的旧本地配置,也需要迁移到显式认证模式。迁移方式
本地直连开发
运行:
选择
Update server & auth和 Local 模式,生成 Trusted 配置。客户端使用同一部署 key,并显式配置account/user。Embedded Gateway 或共享部署
使用
api_key模式:ov config,使用 User Management 创建或选择普通用户;保持不变的安全边界
/mcp;