Question

Difficulty: MediumLog Analytics Workspaces and KQL Queries

An administrator is configuring access control for a Log Analytics workspace named Workspace1. The workspace collects diagnostic and performance logs from multiple Azure Virtual Machines deployed across different resource groups.

You need to ensure that application owners can run KQL queries to view log data only for their respective virtual machines. The application owners must not be able to view logs for virtual machines they do not own.

Which two actions should you perform? (Select TWO.)

  1. Configure the access control mode of Workspace1 to Use resource or workspace permissions.Answer
  2. Assign the Reader role to the application owners on their respective virtual machines.Answer
  3. C
    Configure the access control mode of Workspace1 to Require workspace permissions.
  4. D
    Assign the Log Analytics Reader role to the application owners on Workspace1.

Answer

Configure the access control mode of Workspace1 to 'Use resource or workspace permissions' and assign the 'Reader' role to the application owners on their respective virtual machines.
To restrict users to viewing logs only for the virtual machines they own, the workspace must be configured for resource-context access. This is done by selecting the 'Use resource or workspace permissions' access control mode. Additionally, users must be granted read access to the specific resources, which can be accomplished by assigning the Reader role at the scope of their respective virtual machines.

Step-by-Step Solution

1
Determine the required access control mode for the Log Analytics workspace to support resource-specific queries.
The workspace access control mode must be set to 'Use resource or workspace permissions' (resource-context access).
This mode allows users to view logs for resources they have read access to, without needing access to the workspace itself.
2
Define the target scope and role for the application owners to authorize access to their logs.
Assign the Reader role to the users on the scope of their respective virtual machines.
Resource-context authorization validates the user's permissions on the actual Azure resource before returning its logs from the workspace.

Key Concept

Log Analytics Workspace Access Control Modes (resource-context vs workspace-context)
Estimated Time:2m 0s
Rate this question