Publish fails on workspace products with the built-in administrators group
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- azure, typescript
调研方向
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 内容生成。
描述
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
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/apiops-cli 的其他 Issue
-
extract fails when a policy uses set-backend-service backend-id="{{namedValue}}"可能已有人在做 @dannyward630 于 3 天前认领。 未关闭type:bug
难度 2/5 1-3 小时 新手友好度 78/100
Azure/apiops-cli#331 ·
维护者通常 3 天内回复
-
stale type:question
难度 2/5 1-3 小时 新手友好度 76/100
Azure/apiops-cli#277 · 1 条评论 ·
维护者通常 3 天内回复
-
stale type:documentation
难度 1/5 1 小时以内 新手友好度 94/100
Azure/apiops-cli#250 · 1 条评论 ·
维护者通常 3 天内回复
-
Documentation P2 stale
难度 2/5 1-3 小时 新手友好度 70/100
Azure/apiops-cli#24 · 2 条评论 ·
维护者通常 3 天内回复
-
type:bug
难度 3/5 1-2 天 新手友好度 53/100
Azure/apiops-cli#330 ·
维护者通常 3 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:web p3
难度 2/5 1-3 小时 新手友好度 72/100
Lets-Parley/Parley#912 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
wealthfolio/wealthfolio#2376 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
be-BOP-io-SA/be-BOP#2817 ·
维护者通常 5 天内回复
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 84/100
sno-ai/sno-station#149 · 1 条评论 ·
维护者通常 1 天内回复