jakeFeldman / strapi-provider-upload-azure-storage

Strapi Provider Upload Azure Storage
MIT License
75 stars 42 forks source link

feat: adds azure identity capability #84

Closed fardarter closed 8 months ago

fardarter commented 9 months ago

This PR adds the ability to use an Azure Managed Identity for authentication.

Addresses issue: https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/issues/71

Can be tested by: a) using a local authorised logged in user b) deploying a working Strapi instance to an app service and using the system assigned identity permissions c) assigning a working app service a user assigned managed identity and passing the identity id to the clientId configuration parameter.

RBAC role of Storage Blob Data Contributor over either the target account or the target container should be sufficient for upload.

jakeFeldman commented 9 months ago

Hello @fardarter thank you for the PR. Do you mind adding a description to the PR. Thanks

fardarter commented 9 months ago

Hello @fardarter thank you for the PR. Do you mind adding a description to the PR. Thanks

Is this for release notes? Do you need a specific approach/format?

fardarter commented 8 months ago

Hello @fardarter thank you for the PR. Do you mind adding a description to the PR. Thanks

Is this for release notes? Do you need a specific approach/format?

@jakeFeldman Just following up here. I'm keen to get this in so happy to adjust to your needs.

jakeFeldman commented 8 months ago

@fardarter Thanks for the follow up. Yes, having a detailed description with the changes, how to test, etc.. would be good for the release notes and posterity.

fardarter commented 8 months ago

@fardarter Thanks for the follow up. Yes, having a detailed description with the changes, how to test, etc.. would be good for the release notes and posterity.

Have updated and will follow up on the other. I'm testing at the moment with a patch-package version of a dist I'm building locally with this code in all the scenarios listed. I can let you know if I run into any bugs today but I don't anticipate any.

fardarter commented 8 months ago

@fardarter Thanks for the follow up. Yes, having a detailed description with the changes, how to test, etc.. would be good for the release notes and posterity.

Have updated and will follow up on the other. I'm testing at the moment with a patch-package version of a dist I'm building locally with this code in all the scenarios listed. I can let you know if I run into any bugs today but I don't anticipate any.

@jakeFeldman Have had successful deployments yesterday with clientId and plain msi for days before that.

fardarter commented 8 months ago

Thanks for the PR. This looks good. Let me know, if you're interested in helping maintain the plugin. I would appreciate the help.

Thanks for the merge. Looking forward to seeing it in a new release.

Honestly don't know what I'd be signing up for. I'm open to chatting about it.

I'm also maybe not the best candidate as I'm mainly an ops person. I stop interfacing with Strapi once it's deployed and I can use identities to access the things I need (trying to run secretless infra). I don't know much about the actual plugin interop.

jakeFeldman commented 8 months ago

Hey @fardarter, I just published version v3.4.0-beta. You can test it by adding the beta tag to your install script.

yarn add strapi-provider-upload-azure-storage@beta

If you want to test the version and make sure that both authTypes are working I can publish v3.4.0.

No worries wrt to maintenance. The amount of work is low/minimal, I just don't use Azure much these days.

fardarter commented 8 months ago

Hey @fardarter, I just published version v3.4.0-beta. You can test it by adding the beta tag to your install script.

yarn add strapi-provider-upload-azure-storage@beta

If you want to test the version and make sure that both authTypes are working I can publish v3.4.0.

No worries wrt to maintenance. The amount of work is low/minimal, I just don't use Azure much these days.

Thanks, I'll do it for 'msi'. I don't use secrets, which is why I wanted the DefaultCredentials code.

Do you mainly just need someone to triage issues?

fardarter commented 8 months ago

Hey @fardarter, I just published version v3.4.0-beta. You can test it by adding the beta tag to your install script.

yarn add strapi-provider-upload-azure-storage@beta

If you want to test the version and make sure that both authTypes are working I can publish v3.4.0.

No worries wrt to maintenance. The amount of work is low/minimal, I just don't use Azure much these days.

Working with beta package for msi flow.

jakeFeldman commented 8 months ago

Great to hear. Version 3.4.0 is available now. Thanks again for the PR