Skip to content

fix(security): 拆除 API Key create/revoke 确认层,恢复 LocalAdmin - #7

Merged
DNTOF merged 1 commit into
preview/v2.6.0-DevOnlyfrom
cursor/strip-apikey-confirm-e312
Sep 24, 2026
Merged

DNTOF merged 1 commit into
preview/v2.6.0-DevOnlyfrom
cursor/strip-apikey-confirm-e312

Conversation

@DNTOF

@DNTOF DNTOF commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Owner 实机测试确认:sldataapi apikey create|revoke 的 y/N / 全屏 / 新 cmd 确认 UX 破坏了 LocalAdmin。端点层防御已经足够,整层拆除确认。

本 PR 基于当前 preview/v2.6.0-DevOnly tip(acbed13)重做,不是合并 #6。#6 对着错误基线 cursor/confirm-new-cmd-window-3ee0(新 cmd 窗口通道);当前 tip 上残留的是整屏接管实现(ConfirmPanel / ConfirmSession / ConsoleTakeover / OperatorConfirmService)。

保留

  • Auth/RemoteCommandGuard:远程 /control/console/command(HTTP + WS call 同源 ControlController.Handle)硬拒绝 sldataapi / slda
  • Kerckhoffs API Key 鉴权 / apikey.config / sldataapi apikey 命令面本身

删除

  • create/revoke 上的 OperatorConfirmService.Confirm 调用(命令立即执行)
  • 确认专用实现:OperatorConfirmService、ConfirmPanel、ConfirmSession、ConsoleTakeover
  • 配置键 api_key_confirm_timeout_seconds / ApiKeyConfirmTimeoutSeconds
  • 仅覆盖确认面板的单元测试,以及 README / SECURITY / Config 中的确认窗口描述
  • RemoteCommandGuard.IsAffirmative(仅给 y/N 行模式用)

当前 tip 上本来就没有 confirmtest / ConfirmWindowChannel / ConfirmWindowProtocol,无需再删。

本地控制台 create|revoke 立即执行;远程仍然 403。未包含 WebDAV 或更新检查间隔改动。

LocalAdmin create|revoke now runs immediately. Remote /control/console/command
(HTTP + WS) still hard-rejects sldataapi/slda via RemoteCommandGuard.

Co-authored-by: DNT_OF <allowcache@gmail.com>
@DNTOF
DNTOF marked this pull request as ready for review September 24, 2026 09:11
@DNTOF
DNTOF merged commit 552efba into preview/v2.6.0-DevOnly Sep 24, 2026
@DNTOF
DNTOF deleted the cursor/strip-apikey-confirm-e312 branch September 24, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants