feat(agents): support private non-ACR registry connections - #9586
Draft
Wei Meng (m5i-work) wants to merge 1 commit into
Draft
feat(agents): support private non-ACR registry connections#9586Wei Meng (m5i-work) wants to merge 1 commit into
Wei Meng (m5i-work) wants to merge 1 commit into
Conversation
Adds registry-neutral hosted-agent authoring, non-interactive init support, Foundry connection validation, and registry_connection_id REST mapping.\n\nFixes Azure#9582
|
Azure Pipelines: Successfully started running 1 pipeline(s). 6 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
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
registryConnectionIdauthoring for hosted container agentsdefinition.container_configuration.registry_connection_idazd ai agent init --registry-connection <name-or-id>supportazure.ai.connectiondependencies throughusesazure.yamland legacy agent-definition round tripsThe implementation is registry-neutral: it does not inspect registry vendors, hostnames, token-exchange semantics, or vendor-specific credential fields.
Fixes #9582
Important
This extension PR depends on the core image-passthrough capability tracked by #9587 and implemented in draft PR #9588. The extension follow-up will replace its current
remoteBuildworkaround withdocker.imagePassthroughafter the core SDK change is available.Tested scenarios
A real E2E was run in
westus2using a private JFrog Docker repository, a brownfield Foundry project, and JFrog OIDC token exchange bound to the Foundry project managed identity. Anonymous manifest access returned401before deployment, confirming that the image was private.1. Existing connection through non-interactive init
Command:
Key generated
azure.yamloutput:The existing external connection was not added to
uses.Key deployed-agent output:
{ "version": "1", "status": "active", "definition": { "container_configuration": { "image": "<private-jfrog-host>/<repository>/echo-agent:<tag>", "registry_connection_id": "private-registry-init" }, "protocol_versions": [ { "protocol": "invocations", "version": "1.0.0" } ] } }Key invocation output:
The Foundry session logstream showed container startup,
GET /readinessreturning200, and both invocation requests returning200.2. Declarative brownfield project and sibling connection
Configuration:
Commands:
Key provisioning output:
The provisioned project connection reported:
{ "name": "private-registry-declarative", "properties": { "category": "CustomKeys", "authType": "CustomKeys", "metadata": { "type": "registry_connection", "mode": "oauth_token_exchange" } } }Key deployment and invocation output:
The deployed definition contained
container_configuration.registry_connection_id: private-registry-declarative, and the Foundry session logstream showed readiness and invocation HTTP200responses.E2E finding and core dependency
The exact declarative configuration exposed an existing core lifecycle gap before the extension deploy phase:
Core Docker framework Package runs before extension service-target Package. With a top-level
imageand no local build artifact, core treats the image as an external source image and pulls and tags it locally before the extension can classify it as a deployment-by-reference artifact.The agents extension currently relies on:
to suppress core local Build and Package for prebuilt images. Extension Publish then short-circuits, so an ACR Tasks build does not run. This is an existing, semantically incorrect workaround:
remoteBuildmeans an ACR Tasks build, not passthrough of an already-published image.The successful declarative E2E used that existing workaround to complete deployment and invocation, but it is not the intended final contract. The core gap is tracked by #9587, and draft PR #9588 adds the separate
docker.imagePassthroughsignal.Before this PR is marked ready:
docker.imagePassthrough: truefor prebuilt-image init;remoteBuildworkaround.Trace capture
The E2E retained sanitized local artifacts for CLI demo preparation:
azure.yamlfilesNo Application Insights connection was configured for this temporary project, so runtime traces came from Foundry hosted-session logstreams rather than App Insights. The artifact bundle passed a scan against the JFrog username and administrator token.
All temporary Foundry, Entra, JFrog, session, and image resources were deleted after the run; the test resource group was empty afterward.
Automated validation
Focused coverage includes:
usesvalidationcredentials.keys.body.*pass-through