`void platform install --app-access public` fails when Cloudflare reports Access is disabled

未关闭 适合新手
#835 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

从 packages/void/src/cli/platform-app-access.ts 的第 175-241 行开始,安装程序在这里通过 GET /accounts/{account_id}/access/organizations 检查 Default-Deny,并将 403s 送入 App Access token 流程。跟踪 --app-access public 和 --no-access-protection 如何到达该检查,然后将 Cloudflare 的 access.api.error.not_enabled 响应视为公开设置,而其他 403s 保留现有路径。更新覆盖 Access disabled 的 CLI 测试。当复现过程在无 token 提示的情况下完成,且其他认证失败仍会提示时,即完成。

由索引模型根据 Issue 内容生成。

描述

Affected version
Void CLI 1.9.1

Steps to reproduce
  1. Start a fresh install in a Cloudflare account where Access is disabled. Set CLOUDFLARE_API_TOKEN to an installer token with the usual install permissions and account-level Access: Organizations, Identity Providers, and Groups Read. Leave VOID_PLATFORM_APP_ACCESS_TOKEN and appAccess.tokenEnv unset.

  2. Use a platform login method that does not rely on Cloudflare Access. Run the following in a non-interactive shell with the rest of your installation settings. --no-access-protection disables Access protection for the platform itself, so the reproduction reaches the separate check for deployed apps.

    void platform install --app-access public --no-access-protection --yes
    
Actual behavior

The install stops while checking whether the account enforces Access Default-Deny.

platform: App access requires VOID_PLATFORM_APP_ACCESS_TOKEN or appAccess.tokenEnv in --auth-config, scoped to the hosting account.

A separate request to GET /accounts/{account_id}/access/organizations with the account-level read permission returned HTTP 403 with access.api.error.not_enabled: Access is not enabled. The 1.9.1 installer sends that response through the same credential flow as other 403 responses. In an interactive install, that flow prompts for an App Access API token. Void CLI 1.9.1 source

Expected behavior

When --app-access public is selected and Cloudflare explicitly reports that Access is disabled, the installer should continue with public app setup without requesting a separate App Access token or creating Access policies. Other authorization failures and accounts with Default-Deny enabled should continue through the existing checks.

主要语言
TypeScript
星标
684
派生
83
平均合并
15 小时 22 分钟
30 天内合并 PR
219

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

voidzero-dev/void 的其他 Issue

查看 voidzero-dev/void 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。