Policy `Configure Arc-enabled SQL Server license type` can set free editions (Developer/Express/Evaluation) to Paid — Software Assurance attestation / compliance risk
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
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- azure, powershell, sql
- Lĩnh vực
- cloud, infrastructure
Hướng nghiên cứu
Trước tiên, hãy kiểm tra policy/azurepolicy.json và quy trình gán trong README. So sánh các giá trị mặc định của tham số và hành vi triển khai với ánh xạ edition được ghi lại; công việc được coi là hoàn tất khi mẫu không còn khuyến khích dùng Paid một cách đại trà cho các edition miễn phí và tài liệu hóa hành vi gán hoặc scoping được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The custom policy in this sample (policy/azurepolicy.json) only allows the targetLicenseType parameter to be Paid or PAYG and defaults to Paid. It has no LicenseOnly option and no edition awareness. When assigned broadly (the README's default flow assigns at management-group or subscription scope across all matching Arc-enabled SQL Server extensions), it will set the license type of free Developer, Express, and Evaluation instances to Paid.
Per the official licensing documentation, Paid means "License with Software Assurance", and selecting it is a customer attestation of active Software Assurance / a SQL Server subscription. Free editions are not eligible for Software Assurance, so marking them Paid produces a false attestation and a licensing-compliance breach. These editions must be LicenseOnly.
Evidence (Microsoft Learn)
From Manage licensing and billing of SQL Server enabled by Azure Arc — license type table:
| License type | Description | Value |
|---|---|---|
| License with Software Assurance | Bring your own Standard or Enterprise license with Software Assurance or a SQL Server subscription. | Paid |
| License only | You use a perpetual license for Standard or Enterprise edition, or you use the free Developer, Evaluation, or Express editions. | LicenseOnly |
Same page, Important considerations:
"By selecting a license with Software Assurance, you attest that you have Enterprise or Standard licenses with active Software Assurance or an active SQL Server subscription license, and that the device is in compliance with the Product Terms outsourcing restrictions."
The value LicenseOnly is a documented, first-class option in the auto-connect tag flow (ArcSQLServerExtensionDeployment = Paid / PAYG / PAYG-Recurring / LicenseOnly) — see Manage automatic connection — but this policy sample omits it.
Impact
- Assigning the policy with its default
Paidtarget (or across a mixed estate) silently setsLicenseType = Paidon free-edition instances. - That is a false Software Assurance attestation and a licensing-compliance exposure for the customer.
- Because the effect is
DeployIfNotExistswith remediation, existing free-edition instances get remediated toPaid.
Expected behaviour — the license type must follow the edition (and edition combination)
The correct mapping is edition-driven, and combinations matter. The rule is:
If a host has at least one Standard or Enterprise instance →
Paid.
If a host has only free editions (Developer / Express / Evaluation) →LicenseOnly.
PAYGapplies where the customer chooses pay-as-you-go hourly billing for a Standard/Enterprise instance.
| Edition / combination | Correct license type |
|---|---|
| Standard | Paid |
| Enterprise | Paid |
| Developer | LicenseOnly |
| Express | LicenseOnly |
| Evaluation | LicenseOnly |
| Enterprise + Express | Paid |
| Enterprise + Developer | Paid |
| Standard + Express | Paid |
| Standard + Developer | Paid |
The current policy cannot express this: it hard-sets a single targetLicenseType (default Paid) for every matched extension, so it can neither keep free-only hosts on LicenseOnly nor correctly keep mixed hosts on Paid — it just stamps one value everywhere.
Suggested change
Minimum viable fix (unblocks correct manual use):
- Add
LicenseOnlyto thetargetLicenseTypeallowed values. The existing deployment template already applies a plainLicenseTypesetting for non-PAYG values, soLicenseOnlyflows through with no template change. - Remove the
Paiddefault (or make the parameter required with no default) so an operator must deliberately choose. - Document the edition mapping table above in the README so operators scope assignments correctly (e.g. one assignment targeting Standard/Enterprise hosts →
Paid; another targeting free-only hosts →LicenseOnly).
Ideal fix (makes it self-correcting so we are neither in breach nor under-enabling):
- Make the policy edition/combination-aware so the value is derived automatically:
- key off the SQL Server instance edition (
Microsoft.AzureArcData/sqlServerInstancesedition/version), not just the HybridCompute extension; - evaluate per host, so any Standard/Enterprise instance present sets the host to
Paid, and only pure free-edition hosts resolve toLicenseOnly; - this guarantees the paid editions that should be enabled are enabled, while free-only hosts stay on
LicenseOnlyand out of a false SA attestation.
- key off the SQL Server instance edition (
Note: expressing the "any paid edition on the host" aggregation purely in Azure Policy is non-trivial (policy evaluates per resource and can't easily aggregate sibling instances of a different type). If a pure-policy expression isn't feasible, the sample should either (a) target
sqlServerInstancesedition directly, or (b) clearly document a scoped-assignment pattern per the table, rather than defaulting to a blanketPaid.
Notes
Raised after field validation on a customer Arc onboarding where enforcing Paid across the estate would have mis-attested SA on Developer / Express instances that should be LicenseOnly, while still needing Standard / Enterprise (including mixed hosts) to be correctly set to Paid.
- Ngôn ngữ chính
- PowerShell
- Star
- 11.2k
- Fork
- 9.1k
- Merge trung bình
- 2 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/sql-server-samples
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
microsoft/sql-server-samples#1499 ·
-
Link http://go.microsoft.com/fwlink/?LinkID=800630 for wide-world-importers-release is broken Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/sql-server-samples#1495 · 3 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
microsoft/sql-server-samples#1341 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
microsoft/sql-server-samples#276 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
microsoft/sql-server-samples#1497 ·
Tất cả issue của microsoft/sql-server-samples
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
level/task module/gcp type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
bug needs-triage service/elbv2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hashicorp/terraform-provider-aws#50100 · 1 bình luận ·