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 小時 新手友好度 76/100
Graphify-Labs/graphify#4860 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
sveltejs/eslint-plugin-svelte#1615 ·
維護者通常 7 天內回覆
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors可能已有人在做 @as992949791 今天認領。 未關閉good first issue help wanted
難度 2/5 1-3 小時 新手友好度 85/100
reticlehq/reticle#2033 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆