youtube image
From YouTube: Using resource tokens with Azure Cosmos DB

Description

You can authorize your applications to connect to Cosmos DB using master keys or resource tokens. Depending on the level of control that is needed, your application may need to use one or even both of these approaches.

In this episode, Chris Anderson (@crandycodes) comes on to show us how to request and make use of resource tokens in Cosmos DB. Along the way, he also shows us some other interesting features in Azure App Service such as EasyAuth and Run-From-Zip deployment.

01:23 - Cosmos DB Token provider code
04:20 - Future proofing with .NET Standard
06:50 - Exploring the token provider implementation
10:44 - Cosmos DB keys versus resource tokens
12:02 - Demo Acquiring token
14:53 - Deploying using run-from-zip
21:50 - Setting up EasyAuth

Take a look at the links below that point to code samples, documentation and the official announcements for the features:

Token Provider sample on GitHub: https://github.com/christopheranderson/tokenprovider
Securing access to Azure Cosmos DB data: https://docs.microsoft.com/en-us/azure/cosmos-db/secure-access-to-data?WT.mc_id=ondotnet-channel9-cephilli
Run-From-Zip announcement on GitHub: https://github.com/Azure/app-service-announcements/issues/84
Authentication and authorization in Azure App Service: https://docs.microsoft.com/en-us/azure/app-service/app-service-authentication-overview?WT.mc_id=ondotnet-channel9-cephilli
Create a Free Account (Azure): https://aka.ms/azft-net