Resource Tokens
Explore how to generate and use Cosmos DB resource tokens to grant controlled access to specific containers, partitions, or documents. Understand token creation, permission assignment, and expiration management to secure third-party and untrusted service interactions with your database.
We'll cover the following...
Introduction
Usually, we interact with Cosmos DB from trustworthy services. We use primary/secondary keys or RBAC for more specific authorization policies.
However, there might be cases where we want to grant access to our databases to third parties, browsers, mobile apps, CLIs, and more. In these scenarios, we can’t use the access keys because we can’t be sure the keys are stored and secured correctly. Nor can we use RBAC, because those services are not part of our Azure infrastructure.
To solve this problem, Cosmos DB supports resource tokens. These tokens can grant:
Full access to a resource ...