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
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 / draft follow-up
The declarative deployment initially failed before the extension deploy phase because azd core attempted an anonymous local pull of the private source image:
Adding the following to the declarative agent service prevented the host-side source-image pull and allowed Foundry to pull the image through the project connection:
No remote build occurred in the successful run; the extension deployed the original image as a pre-built image. Before this PR is marked ready, we should either prevent the core pre-package pull automatically for registry-backed agent images or make this setting part of the documented declarative contract.
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