Repository navigation
[ManagedCleanroom] Support CGS as secure key release authority for CPK datasets - #10545
Conversation
…K datasets
Aligns the managedcleanroom frontend commands with the 2026-03-01-preview
frontend spec changes that add CGS (Clean Room Governance Service) as a
secure key release (SKR) authority alongside MAA.
* dataset publish: add --kek-authority-type (CGS, MAA) and
--kek-authority-endpoint; send kek.authority. Deprecate --kek-maa-url as
a hidden alias of --kek-authority-endpoint. For MAA, the legacy maaUrl is
still sent for backward compatibility with older frontends.
* skr-policy: --dataset-id is now optional; when omitted, returns the
collaboration-level CGS SKR policy from the new
/collaborations/{id}/analytics/skrpolicy endpoint.
* analytics_frontend_api (sync + async): add
analytics_contract_skr_policy_get and the authority object in the
dek/kek JSON templates (substantive delta only).
* Tests, help, HISTORY.rst and version bump 1.0.0b10 -> 1.0.0b11.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thank you for your contribution imddanish! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
🟡 Changes recommended
The new KEK authority parameters are omitted from the mutual-exclusion check, allowing them to be silently ignored when combined with --body and potentially retaining an unintended authority.
1 open issue
What changed in this PR
Adds CGS secure key release support for customer-provided-key datasets in the Managed Cleanroom extension, while preserving existing MAA CLI usage. Merge remains dependent on deployment of the service-side change.
Changes:
- Adds KEK authority options, validation, and backward-compatible MAA payloads.
- Adds collaboration-level SKR policy retrieval through synchronous and asynchronous clients.
- Updates help, unit tests, and release metadata for
1.0.0b11.
| File | Description |
|---|---|
src/managedcleanroom/setup.py |
Bumps the extension version to 1.0.0b11. |
src/managedcleanroom/HISTORY.rst |
Records CGS support and CLI changes. |
src/managedcleanroom/azext_managedcleanroom/tests/latest/test_frontend_dataset.py |
Tests authority payloads and validation. |
src/managedcleanroom/azext_managedcleanroom/tests/latest/test_frontend_collaboration.py |
Tests collaboration-level SKR policy routing. |
src/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/operations/_operations.py |
Adds synchronous SKR retrieval and updates payload documentation. |
src/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/aio/operations/_operations.py |
Adds asynchronous SKR retrieval and updates payload documentation. |
src/managedcleanroom/azext_managedcleanroom/_params.py |
Registers authority options and the deprecated MAA alias. |
src/managedcleanroom/azext_managedcleanroom/_help.py |
Documents policy scopes and CGS/MAA publishing examples. |
src/managedcleanroom/azext_managedcleanroom/_frontend_custom.py |
Builds authority payloads and routes SKR policy requests. |
Review effort: Balanced
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Anant (anantshankar17)
left a comment
There was a problem hiding this comment.
Remaining issues:
- Parameter-based dataset publishing requires and sends identity.issuerUrl, which the current frontend rejects.
- New examples use unsupported AzureStorageAccount / ReadWrite values; these should be Azure_BlobStorage and read or write.
- Combining --body with new authority flags silently ignores those flags instead of rejecting the combination.
…nroom-cgs-skr-authority
* Stop requiring and sending identity.issuerUrl: the frontend rejects it ([ValidateIsNull] on DatasetIdentity.IssuerUrl). --identity-issuer-url is now a hidden, deprecated flag that is ignored with a warning pointing to `az managedcleanroom frontend oidc set-issuer-url`. * Reject --body combined with any parameter-mode flag, including the new --kek-authority-type/--kek-authority-endpoint and the DEK/KEK, --schema-format, --allowed-fields and --subdirectory flags, instead of silently ignoring them. * Require --allowed-fields: the frontend requires datasetAccessPolicy.allowedFields. Empty entries are dropped and at least one field name must be supplied. * Restrict --access-mode to read/write and fix help examples and docs to use valid values: Azure_BlobStorage storage type, read/write access mode, csv/json/parquet schema format. * Tests: update publish tests and add coverage for every --body conflict, issuerUrl not being sent, the deprecation warning, and allowed-fields validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Thanks Anant (@anantshankar17), all three are Fixed in the latest commit, plus one related issue I found while verifying against the frontend:
|
|
Yong Zhang (@yonzhan) please help complete this PR soon. |
|
mansoor sarfraz (@msarfraz) / Yong Zhang (@yonzhan): can one of you please help complete this ? We are still waiting for it. |
|
[Release] Update index.json for extension [ managedcleanroom-1.0.0b11 ] : https://dev.azure.com/msazure/One/_build/results?buildId=190838561&view=results |

🤖 PR Validation — ❌ Action needed
❌Azure CLI Extensions Breaking Change Test
This PR adds warning or check suppressions. Fix the underlying warning where possible and justify each remaining suppression in a code comment or the PR description.
8 added suppressions
src/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/aio/operations/_operations.pypipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-accesssrc/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/aio/operations/_operations.py{}) # type: ignoresrc/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/aio/operations/_operations.pyreturn cast(JSON, deserialized) # type: ignoresrc/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/operations/_operations.pydef build_collaboration_analytics_contract_skr_policy_get_request( # pylint: disable=name-too-longsrc/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/operations/_operations.py_url: str = _url.format(**path_format_arguments) # type: ignoresrc/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/operations/_operations.pypipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-accesssrc/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/operations/_operations.py{}) # type: ignoresrc/managedcleanroom/azext_managedcleanroom/analytics_frontend_api/operations/_operations.pyreturn cast(JSON, deserialized) # type: ignoreNote
The service-side change in Azure Clean Rooms (frontend
2026-03-01-previewadds CGS as an SKR authority) is merged. This PR can be merged once approved.Related command
az managedcleanroom frontend analytics dataset publishaz managedcleanroom frontend analytics skr-policyDescription
The Azure Clean Rooms frontend (
2026-03-01-preview) now supports the Clean Room Governance Service (CGS) as a secure key release (SKR) authority alongside Microsoft Azure Attestation (MAA) for customer-provided-key (CPK) datasets. This PR updates the extension to match:authorityobject:{"type": "CGS"}or{"type": "MAA", "endpoint": "<maa-url>"}. The previousmaaUrlfield is deprecated by the service but still accepted.GET /collaborations/{collaborationId}/analytics/skrpolicy, returns the CGS SKR policy. The dataset-level.../datasets/{datasetId}/skrpolicyendpoint is deprecated by the service and kept for MAA-backed datasets.Previously,
dataset publishin CPK mode always required--kek-maa-url, so CGS-backed datasets could not be published from the CLI.Changes
_params.py--kek-authority-type(CGS,MAA) and--kek-authority-endpointtodataset publish.--kek-maa-urlbecomes a hidden, deprecated alias of--kek-authority-endpoint. It uses the samec.deprecate(..., hide=True)pattern as--job-id.--dataset-idonskr-policyis now optional._frontend_custom.pyskr-policy: without--dataset-id, calls the new collaboration-level CGS endpoint. With it, behaves as before.dataset publish(CPK): buildskek.authority.--kek-maa-url) means MAA, so existing scripts keep working.maaUrlis still sent alongsideauthorityso frontends without the new field keep working. The new service ignores it whenauthorityis present.analytics_frontend_api/operations/_operations.py+aio/operations/_operations.py: addsanalytics_contract_skr_policy_get(sync + async) and theauthorityobject to thedek/kekJSON templates. As in [ManagedCleanroom] Add --subdirectory parameter for dataset publish #9852, only the actual changes from the updatedfrontend.yamlare included, to avoid unrelated churn from a full regeneration._help.py: updatedskr-policyhelp with collaboration-level and dataset examples.dataset publishnow documents the new parameters and has separate CGS and MAA CPK examples.tests/latest/test_frontend_dataset.py,test_frontend_collaboration.py: 7 new tests:skr-policyExisting CPK and
skr-policytests are updated.HISTORY.rst: added1.0.0b11changelog entry.setup.py: bumped extension version1.0.0b10→1.0.0b11.Review feedback (latest commit)
These fixes are all in
az managedcleanroom frontend analytics dataset publishand were checked against the current frontend models:identity.issuerUrl: the frontend now rejects it ([ValidateIsNull]onDatasetIdentity.IssuerUrl). The CLI no longer requires or sends it.--identity-issuer-urlstays as a hidden, deprecated flag that is ignored with a warning pointing toaz managedcleanroom frontend oidc set-issuer-url.Azure_BlobStoragefor the storage type,read/writefor access mode, andcsv/json/parquetfor schema format.--access-modeonly acceptsread/write(case-insensitive).--bodyconflicts: every flag that only applies without--bodyis now in the conflict check, including the new authority flags and the DEK/KEK,--schema-format,--allowed-fieldsand--subdirectoryflags. Combining any of them with--bodyis an error instead of being silently ignored.allowedFields: the frontend requiresdatasetAccessPolicy.allowedFields, so--allowed-fieldsis now required. Empty entries are dropped, and at least one field is needed.Backward compatibility
--kek-maa-urlkeeps working and now prints a deprecation warning.skr-policy -c <id> -d <dataset>is unchanged.--identity-issuer-urlkeeps being accepted, but is ignored with a deprecation warning, because the frontend rejectsissuerUrl.--allowed-fieldsis now required, and--access-modeonly acceptsread/write. The frontend already rejected requests without these, so this only moves the error to the CLI.2026-03-01-preview).Breaking change report
kek_maa_url: the tool compares internal parameter names.--kek-maa-urlis still accepted as a deprecated alias of--kek-authority-endpoint, the same pattern as--job-id→--run-id, so existing commands keep working with a deprecation warning.protected-access,name-too-long,type: ignore) repeated for the newanalytics_contract_skr_policy_getoperation, matching every other operation inanalytics_frontend_api.Validation
azdev style managedcleanroom: Pylint and Flake8 passedazdev linter managedcleanroom: no violationspython scripts/ci/test_index.py -q: OKazcommands against a local mock frontend:skr-policyforms hit the right URLs--kek-maa-urlpublish requests send the expectedkekbodiesDatasetDetailsschemaGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdev required)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0 required)About CLI version requirement
CLI Version Requiredand have you updatedazext_metadata.jsonin your extension to refer to a new CLI core version?About Extension Publish
setup.py?HISTORY.rst?src/index.jsonis auto-updated post-merge — not modified in this PR.