You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat (infra): [sec] support multiple principals when creating role assignments (#77)
* create new module to support multiple rbac principals
* Revert "create new module to support multiple rbac principals"
This reverts commit 29d76d7.
* Address PR Feedback: extract cosmos db operator role assignment to a module
* Address PR Feedback: extract agent storage account role assignments to a module
* Address PR Feedback: extract ai search role assignments to a module
* Address PR Feedback: extract cosmos db sql role assignments to a module
* Address PR Feedback: add conditionality when conditions strings are empty
* Address PR Feedback: dont use aifoundry as existing resource but pass project id as arg instead
condition: '((!(ActionMatches{\'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/read\'}) AND !(ActionMatches{\'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/filter/action\'}) AND !(ActionMatches{\'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write\'}) ) OR (@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:name] StringStartsWithIgnoreCase \'${workspaceIdAsGuid}\'))'
This template creates a role assignment for a managed identity to access indexes in AI Search.
3
+
4
+
To ensure that each deployment has a unique role assignment ID, you can use the guid() function with a seed value that is based in part on the
5
+
managed identity's principal ID. However, because Azure Resource Manager requires each resource's name to be available at the beginning of the deployment,
6
+
you can't use this approach in the same Bicep file that defines the managed identity. This sample uses a Bicep module to work around this issue.
7
+
*/
8
+
@description('The Id of the role definition.')
9
+
paramroleDefinitionIdstring
10
+
11
+
@description('The principalId property of the managed identity.')
12
+
paramprincipalIdstring
13
+
14
+
@description('The existing Azure AI Foundry Project Id.')
15
+
@minLength(2)
16
+
paramexistingAiFoundryProjectIdstring
17
+
18
+
@description('The existing Azure AI Search account that is going to be used as the Azure AI Foundry Agent vector store (dependency).')
This template creates a role assignment for a managed identity to access dbs in Cosmos Db.
3
+
4
+
To ensure that each deployment has a unique role assignment ID, you can use the guid() function with a seed value that is based in part on the
5
+
managed identity's principal ID. However, because Azure Resource Manager requires each resource's name to be available at the beginning of the deployment,
6
+
you can't use this approach in the same Bicep file that defines the managed identity. This sample uses a Bicep module to work around this issue.
7
+
*/
8
+
@description('The Id of the role definition.')
9
+
paramroleDefinitionIdstring
10
+
11
+
@description('The principalId property of the managed identity.')
12
+
paramprincipalIdstring
13
+
14
+
@description('The existing Azure AI Foundry Project Id.')
15
+
@minLength(2)
16
+
paramexistingAiFoundryProjectIdstring
17
+
18
+
@description('The name of the existing Cosmos Db resource.')
This template creates a sql role assignment for a managed identity to access dbs and containers in Cosmos Db.
3
+
4
+
To ensure that each deployment has a unique role assignment ID, you can use the guid() function with a seed value that is based in part on the
5
+
managed identity's principal ID. However, because Azure Resource Manager requires each resource's name to be available at the beginning of the deployment,
6
+
you can't use this approach in the same Bicep file that defines the managed identity. This sample uses a Bicep module to work around this issue.
7
+
*/
8
+
@description('The Id of the role definition.')
9
+
paramroleDefinitionIdstring
10
+
11
+
@description('The principalId property of the managed identity.')
12
+
paramprincipalIdstring
13
+
14
+
@description('The existing Azure AI Foundry Project Id.')
15
+
@minLength(2)
16
+
paramexistingAiFoundryProjectIdstring
17
+
18
+
@description('The name of the existing Cosmos Db resource.')
19
+
paramexistingCosmosDbAccountNamestring
20
+
21
+
@description('The Cosmos Db name of the sql role assignment.')
22
+
paramexistingCosmosDbNamestring
23
+
24
+
@description('The Cosmos Db csontainer type name of the sql role assignment.')
25
+
paramexistingCosmosCollectionTypeNamestring
26
+
27
+
@description('The Id of the Scope of the sql role assignment.')
This template creates a role assignment for a managed identity to access blobs in Storage Account.
3
+
4
+
To ensure that each deployment has a unique role assignment ID, you can use the guid() function with a seed value that is based in part on the
5
+
managed identity's principal ID. However, because Azure Resource Manager requires each resource's name to be available at the beginning of the deployment,
6
+
you can't use this approach in the same Bicep file that defines the managed identity. This sample uses a Bicep module to work around this issue.
7
+
*/
8
+
@description('The Id of the role definition.')
9
+
paramroleDefinitionIdstring
10
+
11
+
@description('The principalId property of the managed identity.')
12
+
paramprincipalIdstring
13
+
14
+
@description('The existing Azure AI Foundry Project Id.')
15
+
@minLength(2)
16
+
paramexistingAiFoundryProjectIdstring
17
+
18
+
@description('The existing Azure Storage account that is going to be used as the Azure AI Foundry Agent blob store (dependency).')
19
+
@minLength(3)
20
+
paramexistingStorageAccountNamestring
21
+
22
+
@description('The Azure Storage account role assignment conditions version.')
23
+
paramconditionVersionstring = ''
24
+
25
+
@description('The Azure Storage account role assignment conditions.')
0 commit comments