[BUG] Container Insights does not support the "Resource-level" access with underlying Log Analytics workspace
Describe the bug When enabling Container Insights, logs are ingested into a Log Analytics workspace. This workspace's access control mode is set to Use resource or workspace permissions. Despites of this, users that don't have direct workspace permissions cannot access Container Insights, which clearly states:
You do not have required permissions to access Container Insights for this cluster. Please check with your administrator regarding access to Azure Log Analytics workspace xxx
The users is being granted the Azure Kubernetes Service Cluster User Role. Any resource-level role does not work.
To Reproduce Steps to reproduce the behavior:
- Create a log analytics workspace with resource-level access mode
- Create a cluster with Azure AD authentication with Kubernetes RBAC (it seems that none of the options work anyway)
- Enable Container Insights
- Give users some permissions over the cluster but not in the underlying workspace
- Let a user access container insights ==> forbidden
Expected behavior Users should have a limited access to the underlying log analytics workspace through their resource-level permissions.
Screenshots
Environment (please complete the following information):
- Kubernetes version: 1.23.8
Can confirm this problem - we observed it as well. We had to implement a custom role and assign it to the LAW RG to make Container Insights work, but not expose every table in LAW
Hi @stephaneey @tvdvoorde , we have added a story for this. I'll message back with more details once it's rolled out. Thank you!
Action required from @Azure/aks-pm
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
This is currently being worked on, the current ETA we have for this work is end of next month (end of June 2023).
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Hi @stephaneey @tvdvoorde, the current eta for this to be publicly available is the end of August. Please reach out to [email protected] if you would like to try a private flight.
Hi @stephaneey @tvdvoorde , this feature has been rolled out! If you do not have resource-level query access, you will see a warning warner with a link to documentation.