feat(storage-azure): add support for managed identities#13627
Open
pbr1111 wants to merge 2 commits intopayloadcms:mainfrom
Open
feat(storage-azure): add support for managed identities#13627pbr1111 wants to merge 2 commits intopayloadcms:mainfrom
pbr1111 wants to merge 2 commits intopayloadcms:mainfrom
Conversation
96654eb to
37548c8
Compare
|
This looks really useful and more secure than using the connection string. Any idea what happened to this @pbr1111? Just waiting for review? |
|
This similar PR from April got closed #12004 |
37548c8 to
94bce07
Compare
Author
Yes, I'm currently awaiting review |
|
hi @denolfe! Just checking if there are any updates on this PR. This feature would be really useful. |
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.
What?
Add support for Azure managed identities authentication to the
@payloadcms/storage-azureplugin by introducing a newcredentialsoption that acceptsTokenCredentialobjects from@azure/identity.Why?
Currently, the Azure Storage plugin only supports connection string authentication, which has security limitations:
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?
Added new optional
credentialsproperty toAzureStorageOptionstype:credentials?: TokenCredentialUpdated authentication logic in
getStorageClientutility to support both authentication methods:connectionStringis provided, use connection string authentication (existing behavior)credentialsis provided, use identity-based authentication with the base URLMaintained backward compatibility - existing configurations using connectionString continue to work unchanged