Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#328 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
azure, typescript
Lĩnh vực
backend, cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
34
Fork
13
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/apiops-cli

Tất cả issue của Azure/apiops-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.