Skip to content

anishi1222/CosmosDB_RBAC_Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CosmosDB RBAC Demo

This sample is used in the following blog entries to elaborate interaction with RBAC configured Cosmos DB.

How to use

Functions

  • Create Azure function app before deployment.
  • Modify pom-ro.xml and pom-rw.xml following your environment.
  • Build read-only app and read-write app.
mvn clean package azure-functions:deploy -f pom-ro.xml
mvn clean package azure-functions:deploy -f pom-rw.xml
  • Enable system assigned identity in each Function app.

Cosmos DB

ROprincipalId='<Principal ID for ReadOnly app>'
az cosmosdb sql role assignment create -a $accountName -g $resourceGroupName -s "/" -p $ROprincipalId -d $builtInReadOnlyRoleDefinitionId

RWprincipalId='<Principal ID for ReadWrite app>'
az cosmosdb sql role assignment create -a $accountName -g $resourceGroupName -s "/" -p $RWprincipalId -d $builtInReadWriteRoleDefinitionId

About

Interact with RBAC configured Cosmos DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages