Skip to content

Add managed identity support for Azure Batch container registries#7316

Open
adamrtalbot wants to merge 3 commits into
masterfrom
azure-registry-managed-identity
Open

Add managed identity support for Azure Batch container registries#7316
adamrtalbot wants to merge 3 commits into
masterfrom
azure-registry-managed-identity

Conversation

@adamrtalbot

Copy link
Copy Markdown
Collaborator

Overview

Adds support for authenticating to private container registries (e.g. Azure Container Registry) using a user-assigned managed identity, as an alternative to userName/password.

azure {
    registry {
        server = 'myregistry.azurecr.io'
        managedIdentityResourceId = '/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<name>'
    }
}

Details

  • New azure.registry.managedIdentityResourceId config option. Value is the full ARM resource ID of the user-assigned identity (what the Batch SDK's BatchNodeIdentityReference.setResourceId expects), not a client-id GUID.
  • Env fallback AZURE_REGISTRY_MANAGED_RESOURCE_ID; config value wins over env.
  • When set, the managed identity takes precedence over userName/password.
  • Wires the identity into the pool container config via ContainerRegistryReference.setIdentityReference(...).

Limitation

The managed identity must already be attached to the pool nodes. Nextflow's data-plane pool creation (BatchPoolCreateContent) has no identity setter, so this requires a pre-existing pool (or an identity attached out-of-band). Documented in the guide and reference.

Tests

  • AzRegistryOptsTest: config/env/precedence for the resource id, full isConfigured() matrix.
  • AzBatchServiceTest: poolVmConfig cases for the username/password path and the managed-identity-wins path.

Generated by Claude Code

Allow authenticating to a private container registry with a user-assigned
managed identity via azure.registry.managedIdentityResourceId (or the
AZURE_REGISTRY_MANAGED_RESOURCE_ID environment variable), as an alternative
to userName/password. When set, the managed identity takes precedence.

Generated by Claude Code

Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
@adamrtalbot adamrtalbot requested a review from a team as a code owner July 9, 2026 14:00
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs ready!

Name Link
🔨 Latest commit e4ccff2
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs/deploys/6a54b3f7b3caa100080786fd
😎 Deploy Preview https://deploy-preview-7316--nextflow-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@christopher-hakkaart christopher-hakkaart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style suggestions.

Comment thread docs/reference/config.mdx Outdated
Comment thread docs/reference/config.mdx Outdated
Comment thread docs/azure.mdx Outdated
Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io>
Signed-off-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants