Repository navigation
Report blocked OCI auth lookup kinds and reasons - #1361
Merged
Christof Marti (chrmarti) merged 4 commits intoNov 20, 2026
Merged
Conversation
Record whether a token realm that OCI auth hardening would block was hit by an image, Feature or Template lookup, and why it would be blocked (httpRealm, differentPort, parentDomain or differentHost). Include the diagnostics in failed `up` results too. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test helper’s broad return type causes existing generateFeaturesConfig calls to fail TypeScript checking and must be narrowed to preserve the 'feature' literal.
1 open issue
What changed in this PR
This PR expands OCI authentication diagnostics to help consumers assess the compatibility impact of enabling auth hardening by default, without changing authentication behavior. It also prepares release 0.91.0.
Changes:
- Record sorted, unique lookup kinds and blocking reasons across Image, Feature, and Template requests.
- Include OCI authentication diagnostics in failed
devcontainer upresults. - Extend diagnostic tests and update release metadata, including the
--docker-argchangelog entry from #1304.
| File | Description |
|---|---|
| src/test/testUtils.ts | Set the default test lookup kind to Feature. |
| src/test/httpOCIRegistry.test.ts | Test reason classification and diagnostic accumulation. |
| src/test/cli.up.test.ts | Assert diagnostics appear in failed up results. |
| src/spec-node/utils.ts | Mark image registry lookups. |
| src/spec-node/upgradeCommand.ts | Mark Feature upgrade lookups. |
| src/spec-node/templatesCLI/publish.ts | Mark Template publishing lookups. |
| src/spec-node/templatesCLI/metadata.ts | Mark Template metadata lookups. |
| src/spec-node/templatesCLI/apply.ts | Mark Template download lookups. |
| src/spec-node/featureUtils.ts | Mark Feature configuration lookups. |
| src/spec-node/featuresCLI/resolveDependencies.ts | Mark Feature dependency lookups. |
| src/spec-node/featuresCLI/publish.ts | Mark Feature publishing lookups. |
| src/spec-node/featuresCLI/info.ts | Mark Feature information lookups. |
| src/spec-node/devContainersSpecCLI.ts | Preserve diagnostics on provisioning errors and classify outdated checks. |
| src/spec-node/devContainers.ts | Accept and reuse provisioning diagnostics. |
| src/spec-node/containerFeatures.ts | Mark Feature lookups during image extension. |
| src/spec-configuration/httpOCIRegistry.ts | Classify blocked realms and accumulate diagnostic categories. |
| src/spec-configuration/containerFeaturesConfiguration.ts | Require the Feature lookup kind. |
| src/spec-configuration/containerCollectionsOCI.ts | Require a lookup kind in shared OCI parameters. |
| src/spec-common/ociAuth.ts | Define and initialize diagnostic kinds and reasons. |
| package.json | Bump the version to 0.91.0. |
| CHANGELOG.md | Document diagnostics and global Docker argument support. |
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ubuntu-latest moved to Ubuntu 26.04, where Compose 5.1 builds need Bake filesystem entitlements (#1320), the Docker-in-Docker Feature's daemon does not start, Podman builds cannot write to /tmp and Docker 29.0.0 has no package. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Christof Marti (chrmarti)
marked this pull request as ready for review
November 20, 2026 14:51
Abdurrahmaan Iqbal (abdurriq)
approved these changes
Nov 20, 2026
Christof Marti (chrmarti)
deleted the
chrmarti/oci-auth-diagnostic-details
branch
November 20, 2026 18:26
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Adds detail to the OCI auth hardening shadow diagnostics, so consumers can measure the compatibility impact of turning on
--oci-auth-hardeningby default:authLookupBlockedKinds: the lookups that hit a token realm hardening would block:image,featureortemplate.authLookupBlockedReasons: why that realm would be blocked:httpRealm,differentPort,parentDomainordifferentHost.devcontainer upnow also includesociAuthDiagnosticsin its error result, not only on success.Also prepares 0.91.0: version bump and changelog, including #1304.
Also includes the CI fix from #1362 (Linux test jobs on Ubuntu 24.04) so this PR's checks can pass. That commit becomes a no-op once #1362 merges.
Session Context
Key decisions from the development session:
docker pull, so the image still works. Feature and Template lookups fail outright. The impact of hardening therefore depends on the kind.httpRealm,differentPort,parentDomain,differentHost.differentPort: same hostname, different port (for example, a self-hosted GitLab registry on port 5050 with its token endpoint on 443).parentDomain: for example, registryregistry.gitlab.examplewith token endpointgitlab.example.httpRealmwon't be allowed, anddifferentHostneeds an explicit--allow-cross-origin-auth-hostmapping.parentDomainis a heuristic: It's a suffix match on a dot boundary without a public suffix list. It's only used for diagnostics, never for a trust decision.ociAuthLookupKind: It's a required field onCommonParams(and'feature'onContainerFeatureInternalParams), so the compiler flags any new place that builds these parameters without saying what it looks up.upruns:doProvisioncreates the diagnostics object and passes it in throughProvisionOptions, so the error result can include it. For example, a Feature that fails to download still reports why.--oci-auth-hardening.Changes
OCIAuthDiagnosticsgetsauthLookupBlockedKindsandauthLookupBlockedReasons: sorted, unique lists.requestEnsureAuthenticatedrecords the kind and reason, and logs once per new kind or reason.ociAuthLookupKindwhere their parameters are built.upresults includeociAuthDiagnostics.uperror result.Validation
src/test/httpOCIRegistry.test.ts: 54 passing.upwith a Feature from a local registry, which challenges with a token realm on a different port, fails and returns"authLookupBlockedKinds":["feature"],"authLookupBlockedReasons":["differentPort"]in its error result.