You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add OCI registry discovery and RegistryList resource - #1828
Enable dsc resource list to discover DSC resources published in OCI registries without installing their implementations. This implements the discovery portion of the resource packaging RFC (#1826), using the JSON-RPC extension and reverse-secret support from #1827.
Approach
Add Microsoft.Registry.OpenContainerInitiative/Discover and the separate Microsoft.Registry.OpenContainerInitiative/RegistryList settings resource.
Enumerate registry catalogs and tags, select platform-compatible resource versions, and download digest-pinned JSON manifests with SHA-256 and size verification. Enforce the 8 MiB metadata limit while streaming tag-addressed indexes and digest-addressed platform manifests, including responses without Content-Length. Implementation ZIPs are not downloaded; uninstalled remote resources cannot be invoked, but embedded schemas remain available.
Import ordinary and adapted remote resource manifests as metadata using recognized schema URIs. Preserve adapted capabilities, required adapter, content, and schema without evaluating remote conditions, executing schema commands, resolving executable paths, or trusting remote installation paths. Embedded adapted schemas remain readable without invoking an adapter. Action and manifest-list payloads remain unsupported for remote metadata.
Warn and skip invalid discovery records without discarding valid results before or after them. Isolate metadata, integrity, repository, and pagination failures: retain previously enumerated repositories and tags, continue other repositories and registries, and emit sanitized diagnostics.
Use oci-client plus bounded HTTP metadata reads, since the published oras crate lacks the required enumeration APIs. Support anonymous bearer-token negotiation and retrieve configured bearer credentials through reverse JSON-RPC secret.get; persist only secret references.
Merge settings by friendly name with machine policy taking precedence over user preferences and machine preferences. Support atomic replacement, currentUser/allUsers scope, administrator-only machine writes, and a specific error for the reserved name local in any casing. Explicit test compares the complete selected list so removing authentication or secretVault triggers replacement.
Expose registry provenance in resource-list JSON and in a Registry table column immediately after RequireAdapter. Preserve the first type/version identity so installed local resources take precedence consistently for listing and invocation. Export RegistryList with top-level _name: "OCI Registries" so DSC assigns that configuration instance name.
Include release packaging, Windows executable version metadata, reference documentation, and updated discovery/resource-list schemas. Update extension-discovery expectations for the additional built-in extension.
Settings filenames intentionally preserve the requested Microsoft.Registry.OpenContainerInitaitive.settings.json spelling; machine policy uses the corresponding .policy.json filename.
Validation
On Windows ARM64, using the repository-root build.ps1:
Targeted DSC and OCI builds with Clippy.
15 OCI Rust unit tests and 49 JSON-RPC discovery/table/schema Pester tests passed. Existing local adapted-resource and extension-discovery suites passed 28 tests, with one console-dependent test skipped.
Earlier RegistryList validation passed 16 Pester tests. The previously failing extension-discovery and executable-version test files also passed locally.
Isolated anonymous end-to-end dsc resource list against orasdscartifacts.azurecr.io returned all eight resources, including adapted Microsoft.Windows/Personalization with its required adapter. Its embedded schema was retrieved successfully without invoking the adapter. Unavailable registries configured before and after the healthy registry produced warnings without hiding its results.
Regression coverage verifies bounded reads before EOF for tag and digest manifests, exact-limit acceptance, healthy versions retained around malformed entries, partial catalog/tag pagination and repository failure isolation, metadata-only adapted import with existing or missing remote paths, safe schema access, local duplicate precedence, removal of optional credential references, and rejection of uninstalled remote invocation.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Downloaded registry manifests are not restricted to ordinary resources, allowing action schema commands to execute during listing and adapted-resource paths to bypass availability checks.
Adds OCI registry discovery to DSC’s extension system, implementing the discovery portion of #1826 using the JSON-RPC and reverse-secret support from #1827. Resources can be listed without downloading their implementation packages.
Changes:
Adds registry enumeration, platform selection, digest verification, and secret-backed authentication.
Introduces RegistryList for user preferences, machine preferences, and machine policy.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Manifest downloads can consume unbounded memory before the size limit is enforced, and malformed metadata can abort registry-wide discovery, discarding otherwise valid entries.
Continue discovery after malformed registry metadata
resources/oci_registry/src/oci.rs:441
A corrupt JSON layer or malformed index/platform descriptor aborts discovery for the entire registry, discarding valid manifests already collected and skipping later tags. Catch metadata and integrity failures within the tag loop, emit sanitized warnings, and continue so healthy entries from the same registry remain discoverable.
Fix extension discovery expectations and add Windows executable version metadata.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Import adapted content without trusting remote paths, expose embedded schemas, and isolate invalid records and catalog or repository pagination failures.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Active defects let remote metadata override installed resources or disappear from adapter-filtered lists, while registry set can report success without validating missing registry input.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Discovery can select an uninstalled remote candidate over an eligible installed resource, and schema retrieval unnecessarily executes installed adapters’ list commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable
dsc resource listto discover DSC resources published in OCI registries without installing their implementations. This implements the discovery portion of the resource packaging RFC (#1826), using the JSON-RPC extension and reverse-secret support from #1827.Approach
Microsoft.Registry.OpenContainerInitiative/Discoverand the separateMicrosoft.Registry.OpenContainerInitiative/RegistryListsettings resource.oci-clientplus bounded HTTP metadata reads, since the publishedorascrate lacks the required enumeration APIs. Support anonymous bearer-token negotiation and retrieve configured bearer credentials through reverse JSON-RPCsecret.get; persist only secret references.currentUser/allUsersscope, administrator-only machine writes, and a specific error for the reserved namelocalin any casing. Explicittestcompares the complete selected list so removingauthenticationorsecretVaulttriggers replacement.Registrytable column immediately afterRequireAdapter. Preserve the first type/version identity so installed local resources take precedence consistently for listing and invocation. Export RegistryList with top-level_name: "OCI Registries"so DSC assigns that configuration instance name.Settings filenames intentionally preserve the requested
Microsoft.Registry.OpenContainerInitaitive.settings.jsonspelling; machine policy uses the corresponding.policy.jsonfilename.Validation
On Windows ARM64, using the repository-root
build.ps1:dsc resource listagainstorasdscartifacts.azurecr.ioreturned all eight resources, including adaptedMicrosoft.Windows/Personalizationwith its required adapter. Its embedded schema was retrieved successfully without invoking the adapter. Unavailable registries configured before and after the healthy registry produced warnings without hiding its results.