I have multiple json files in Azure blob container that contains users profile info and I have an Angular application that calls Azure blob container and fetch all those json files. Each json file has it's own url e.g https://{accountName}/profiles/{filename}. I am caching these urls rather than generating every single url on each refresh. Now the issue is the container data has public access level and anyone that has this url can access the files.
One way is to use SAS (shared access signature) token and expires the url after specific interval of time but in my case this will have huge impact on performance. Because I have to generate token for all files again and again. And also I can't expose secret access key in my Angular app, so I have to write an api that will do the job.
Is there any other way? My Angular app is deployed as a docker container on kubernetes cluster (AKS)
I found this link https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-requests-to-azure-storage but nothing seems very helpful in my case.
Because I have to generate token for all files again and again.
- Not necessarily. You can generate SAS Token for the container and use that token for all files in that container. – Gaurav Mantri