Skip to content

ncrtc/demo-az-apim-storage

Repository files navigation

Using API Managment as a frontend for blob storage

This project shows how to use API Managment to expose private blobs from Azure storage via HTTP. The solution uses API managment as a frontend and uses the storage account REST API as a backend.

alt text

Blob storage

Create a storage account and create a container with your content. The storage API should be configured for private access via an access key.

API Management

Using an policy expression we can configure API managment to create an authorization token by using the storage account access key. This key can be uses to access the storage account blobs.

1. Create and API Management Instance

2. Create an API

Configure API:

alt text

3. Use an API policy to access storage account as a backend.

Select a reference policy base on the API Managment SKU:

In some scenaios a x-ms-privatelink-id header added to the backend call. In this case the following policy will apply: https://github.com/ncrtc/demo-az-apim-storage/blob/master/policy-x-ms-privatelink-id.xml

In the selected policy replace the three placeholders:

  • YOUR_STORAGE_ACCOUNT_NAME_HERE
  • YOUR_STORAGE_CONTAINER_NAME_HERE
  • YOUR_STORAGE_ACCESS_KEY_HERE

Reference

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published