SeanFeldman / ServiceBus.AttachmentPlugin

Microsoft Azure Service Bus attachment plugin
MIT License
69 stars 19 forks source link

Add Managed Identity support #181

Open SeanFeldman opened 4 years ago

SeanFeldman commented 4 years ago

Managed Identity for Storage Blobs v12 SDKs.

For Storage v11 SDK (attachment plugin v6), StorageCredentials with TokenCredentials can be passed into configuration to authenticate using Managed Identity.

CasperWSchmidt commented 4 years ago

Hi Sean

Any news on this? I will be happy to help, but I guess I need a bit more information about how to do this :)

SeanFeldman commented 4 years ago

@CasperWSchmidt, no I did not have a chance to look into that as I was busy with looking into #205 to remove the dependency on the Storage emulator, #198 which is a breaking API change and will require a new major release, and #201 which will be similar to #198 but not even ready yet.

For this plugin to function, Managed Identity would only be needed for the Storage v11 SDK as that's the only thing that requires permissions to execute.

For Storage SDK v11, you can already do that by passing a variant of StorageCredentials that takes TokenCredential as a parameter` into the configuration. It should probably be added to the documentation, similar to what how it's done here. Would you like to take a stab at that?

CasperWSchmidt commented 4 years ago

Perhaps the upgrade to v12 mentioned in #198 should be handled before this? As far as I can see here and here it is quite easy with the new Azure Identity integration.

SeanFeldman commented 4 years ago

Keep in mind that it would need not just the code change for the internals but also APIs review, documentation extension as Storage v11 and v12 are not the same. I'm working on things a little here and there but just didn't have enough time to wrap it up. I'm always happy to accept PRs 😃