Azure-Samples / media-services-v3-dotnet

The projects in this repository show how to implement different Azure Media Services scenarios using the v3 version.
MIT License
58 stars 52 forks source link

Azure Media Service Submit JobInputHttp from a private blob storage container #53

Closed diegonzls closed 1 year ago

diegonzls commented 2 years ago

I want to submit a JobInputHttp from a private azure blob storage container but I keep getting an access denied error when Media Services tries to fetch the file.

My Azure Media Service account has a User Manage Identity which I have also assigned to the private blob storage account.

Same User Assigned Manage Identity for both Azure-Media-Service And the private Storage account.

The whole thing works properly when I add a SAS key to the private blob storage URL when submitting the Job but I would like to avoid doing that.

Is this supposed to work or do I always need to pass a SAS key in the JobInputHttp Url ?

diegonzls commented 2 years ago

I am looking to do the same thing that was possible using Media Service API V2 Extensions as described in the Create an Asset from a blob section of the README file.

johndeu commented 2 years ago

@diegonzls - JobInputHTTP is meant to be used with any open Web Server. So it is not designed specifically to be used with a private blob storage account. You would have to use the SAS URL when using that input method.

You can still create an Asset from a blob in the V3 API. See the Asset entity.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.media.models.asset?view=azure-dotnet

It is allowed to set the Container on create. I can add a sample for that if needed. The limitation here is still that the file must be in the top level of a container. We don't support hierarchical storage folders.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.media.models.asset.container?view=azure-dotnet#Microsoft_Azure_Management_Media_Models_Asset_Container

johndeu commented 1 year ago

Closing this issue. Answered above.