Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Publish fails on workspace products with the built-in administrators group

未关闭
#328 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
azure, typescript
领域
backend, cli

调研方向

Start by tracing the publish path that reads products/*/groups.json and issues the ProductGroup link PUT, then compare it with cleanupProductGroups() and the existing versus new product paths described in the issue. Reproduce with a workspace product containing the built-in administrators group and inspect the target association after publishing. Done means publish succeeds with documented workspace collaborator permissions while preserving the relevant source and target state.

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

描述

type:bug
Command that triggered the bug

apiops publish

Expected behavior

apiops publish should handle a workspace product's service-scoped administrators group association without failing the publish or requiring permissions beyond the documented workspace collaborator roles.

The supported behavior should preserve the relevant source/target state. We have not verified whether APIM attaches this group to target workspace products automatically, so simply skipping the PUT may or may not preserve the association.

Actual behavior

Workspace products can have the built-in administrators group recorded in groups.json after apiops extract.

When publishing to a target workspace, the CLI attempts to PUT this ProductGroup link. With our publishing identity's permissions, this fails:

HTTP 403: LinkedAuthorizationFailed — client has 'groupLinks/write' on
workspaces/.../products/{product}/groupLinks/administrators but does not have
'Microsoft.ApiManagement/service/groups/write' on the linked scope .../groups/administrators

Microsoft recommends a service-scoped workspace companion role alongside the workspace role. However, neither API Management Service Workspace API Developer nor API Management Service Workspace API Product Manager grants Microsoft.ApiManagement/service/groups/write, the permission demanded by this error. This appears to require permissions beyond the documented workspace collaborator roles.

In our tests, this is a hard ERROR and causes exit code 1, even when every other resource publishes successfully. Extraction is unaffected.

The failure also occurs when republishing an existing product. v1.0.5's cleanupProductGroups() does not address that case because it only runs when !productExisted.

Our current workaround strips administrators entries from products/*/groups.json before publishing. This avoids the error, but we have not verified whether it preserves the association on the target.

apiops CLI version

1.0.5

Environment details
  • Execution environment: Azure DevOps, Linux agent
  • Node.js: v22.23.3
  • Shell: Bash
  • Azure CLI: 2.90.0
  • Publish task: AzureCLI@2, task version 2.279.1
  • Authentication: service principal
  • APIM scope: workspace-scoped products
  • Publish modes: reproduced with both incremental and full publishing
CI/CD environment

Azure DevOps

Is this bug blocking you?

None

主要语言
TypeScript
星标
34
派生
13
平均合并
3 天 6 小时
30 天内合并 PR
7

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

Azure/apiops-cli 的其他 Issue

查看 Azure/apiops-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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