Skip to content

Commit

Permalink
Add Write Condition to Azure Role Assignment (#1106)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Stanton <ian@tembo.io>
  • Loading branch information
ianstanton authored Dec 23, 2024
1 parent e992d3c commit ec2df61
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions conductor/src/azure/uami_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,22 @@ pub async fn create_role_assignment(
)
OR
(
@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:name] StringEquals '{}'
@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:name] StringEquals '{azure_backup_container}'
AND
@Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringLike '{}/*'
@Resource[Microsoft.Storage/storageAccounts/blobServices/containers/blobs:path] StringLike '{namespace}/*'
)
)
",
azure_backup_container,
namespace
AND
(
(
!ActionMatches{{'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write'}}
)
OR
(
@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:name] StringEquals '{azure_backup_container}'
)
)
"
));

let storage_account_id = get_storage_account_id(
Expand Down

0 comments on commit ec2df61

Please sign in to comment.