Control: Cosmos DB account 'Access Control' should be configured to use Azure Active Directory (AAD) and Role-Based Access Control (RBAC)
Description
Azure Cosmos DB accounts should use Azure Active Directory (AAD) Client Authentication and Role-Based Access Control (RBAC) for access control.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.cosmosdb_account_uses_aad_and_rbacSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.cosmosdb_account_uses_aad_and_rbac --shareSQL
This control uses a named query:
select  a.id as resource,  case    when disable_local_auth then 'ok'    else 'alarm'  end as status,  case    when disable_local_auth then a.name || ' is using AAD and RBAC.'    else a.name || ' is not using AAD and RBAC.'  end as reason    , a.resource_group as resource_group  , sub.display_name as subscriptionfrom  azure_cosmosdb_account as a  left join azure_subscription as sub on sub.subscription_id = a.subscription_id;