Skip to content

feat(storage-azure): add support for managed identities#13627

Open
pbr1111 wants to merge 2 commits intopayloadcms:mainfrom
pbr1111:feature/add-token-credentials
Open

feat(storage-azure): add support for managed identities#13627
pbr1111 wants to merge 2 commits intopayloadcms:mainfrom
pbr1111:feature/add-token-credentials

Conversation

@pbr1111
Copy link
Copy Markdown

@pbr1111 pbr1111 commented Aug 28, 2025

What?

Add support for Azure managed identities authentication to the @payloadcms/storage-azure plugin by introducing a new credentials option that accepts TokenCredential objects from @azure/identity.

Why?

Currently, the Azure Storage plugin only supports connection string authentication, which has security limitations:

  • Connection strings contain sensitive access keys that need to be stored as environment variables
  • They don't leverage Azure's native identity and access management capabilities
  • In production environments, User-managed identities are often preferred for better security and easier credential management

This enhancement allows users to authenticate using Azure's identity-based authentication methods, providing a more secure and flexible authentication approach and it is the recommended way to instantiate a BlobServiceClient according to Microsoft's documentation.

How?

  1. Added new optional credentials property to AzureStorageOptions type:

    credentials?: TokenCredential
  2. Updated authentication logic in getStorageClient utility to support both authentication methods:

    • If connectionString is provided, use connection string authentication (existing behavior)
    • If credentials is provided, use identity-based authentication with the base URL
  3. Maintained backward compatibility - existing configurations using connectionString continue to work unchanged

@pbr1111 pbr1111 requested a review from denolfe as a code owner August 28, 2025 18:31
@github-actions github-actions Bot added the stale label Sep 28, 2025
@pbr1111 pbr1111 force-pushed the feature/add-token-credentials branch from 96654eb to 37548c8 Compare October 8, 2025 06:53
@github-actions github-actions Bot removed the stale label Oct 12, 2025
@github-actions github-actions Bot added the stale label Nov 16, 2025
@github-actions github-actions Bot removed the stale label Jan 22, 2026
@pablocoberly
Copy link
Copy Markdown

This looks really useful and more secure than using the connection string. Any idea what happened to this @pbr1111? Just waiting for review?

@pablocoberly
Copy link
Copy Markdown

This similar PR from April got closed #12004

@pbr1111 pbr1111 force-pushed the feature/add-token-credentials branch from 37548c8 to 94bce07 Compare February 19, 2026 18:23
@pbr1111
Copy link
Copy Markdown
Author

pbr1111 commented Feb 19, 2026

This looks really useful and more secure than using the connection string. Any idea what happened to this @pbr1111? Just waiting for review?

Yes, I'm currently awaiting review

@github-actions github-actions Bot added the stale label Mar 25, 2026
@denolfe denolfe added the v3 label Apr 23, 2026
@github-actions github-actions Bot removed the stale label Apr 24, 2026
@valeriocomo
Copy link
Copy Markdown

hi @denolfe! Just checking if there are any updates on this PR. This feature would be really useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants