The resource group enhancements described in this topic are in preview status. The enhanced resource groups do not currently support alert rules or filtering on the alerts console page. Alert routing requires the use of legacy resource groups, as described in Legacy Resource Groups.
Resource groups give you precise control over user permissions and data access in Lacework. You can compose resource groups based on resource characteristics, such as cloud type, region, tags, and more, letting you grant resource access to only the teams that need it.
Within each Lacework account, Lacework creates a default resource group for each resource type that already has an integration. A default resource group contains all assets of that type. Default resource groups cannot be deleted or edited.
When creating a resource group, you define the conditions that associate resources with a group. Resource groups support compound, nested conditions that are joined by AND or OR logical conjunctions, giving you fine-grained control over resource group composition. You can create resource groups based on properties of the resources such as their region, tags, and the cloud-specific organizational units to which they belong, such as organization (for AWS and GCP), account, folder, subscription, and more.
Lacework Console users can interact with resource groups in the following ways:
- When viewing cloud compliance and host vulnerability dashboards, users can filter the view based on resource groups. Depending on how you've created resource groups, this enables to view compliance or vulnerability data only for a region, for example, or based on a resource tag. See Controlling User Access by Resource Group for more information.
- For user access control, resource groups ensure that users can view data only for the resources to which they are entitled. See View Filtering by Resource Group for more information.
- In the Resource Explorer, users can get a high-level view of their entire resource landscape, and view risks, utilization, user access, and much more, by resource group.
- In the Container vulnerabilities page, users can filter by Container and Kubernetes resource groups.
This topic describes how to create and manage resource groups in the Lacework Console. For information on creating resource groups programmatically, see Using the Resource Groups API.
To use resource groups in alert rule routing, see legacy resource groups information in the legacy Resource Group documentation.
About Resource Group Conditions
A condition defines resource group membership criteria based on resource properties such as account ID, tags, region, and more. Resource groups are evaluated dynamically, for instance, when a user access the Cloud Compliance console. Therefore, any cloud integration resources you have added after a resource group is created that meets its conditions will be associated with that group.
A resource group condition is made up of a field, operator, and a value to be compared. The fields that are available for use in conditions vary depending on the resource group types. Operators include starts with, ends with, includes, and equals. The following example checks for resources in the us-west-2 region:
The condition builder may limit options based on the field type. For example, the only operator available when building a condition for a resource group name is equals. Resource tag options additionally include the ability to create conditions based on tags as key-value pairs.
Resource Condition Groups
Resource group conditions can contain nested conditions. A condition group is one or more conditions joined by AND or OR conjunctions. If the parent condition is true for a resource, any nested conditions are evaluated.
In the following example, resources in the us-west-2 region that have
env tags with values starting with either
staging- are associated with the resource group:
A condition can have any number of condition groups. However, condition group depth is limited to three levels. At three levels, the Add group button is disabled. Note that this limitation applies to nested resource groups as well; a resource group cannot include another resource group if it and the included resource group exceeds three levels.
View Resource Groups
You can view, create, or modify resource groups from the Resource Group settings page. To access the page, as a user with at least read permissions for resource groups, navigate to Settings > Configuration > Resource groups.
Click a resource group to view details for that group, including its description and condition parameters.
The Lacework Console lists existing resource groups. There you can edit, remove, or change the status of a resource group. You can also search for resource group by name and modify the columns shown by default.
Create Resource Groups
Before creating resource groups, it's worth considering how the Lacework users in your organization will want to use them. Since you can organize resource groups by resource tags or region, consider the types of groupings that users would want to filter by and or assign permissions by. For example, you may choose to create resource groups by region or along security requirement boundaries, with groups for internal resources and others for high-value production resources.
You can replicate any logical organizational scheme that you've implemented through resource tags in your cloud environments with resource groups in Lacework.
To create a resource group, follow the steps below:
Go to Settings > Configuration > Resource groups (preview only).
Click the Resource groups (preview only) tab.
Click + Add New.
Choose the Resource group type from these options:
- Oracle Cloud Infrastructure
- Amazon Web Services
- Microsoft Azure
- Google Cloud Platform
After you choose the resource group type, Lacework retrieves the properties for that type upon which you can build conditions for the group.
For Kubernetes and Container resource groups, the container images that appear for users are those that were active at the time of the most recent scan within the time frame. Kubernetes resource groups currently supports Amazon EKS only.
If you decide to change the resource group type after starting the condition configuration, click Clear query to start over.
Enter a name for the resource group. The name must be unique for resource groups in this Lacework instance.
Optionally, add a description for the resource group.
Add the conditions that define the group as follows:
- Select a data field on which to set a condition. The exact fields that appear in the menu depends on the resource group type you selected.
- Choose the operator, equals, starts with, and so on.
- Enter a value against which the condition is evaluated. Depending on your resource group type and field, this field may be populated with available options, such as AWS account IDs.
- Add another condition, choosing whether both conditions must be met (AND) or just one (OR) for the condition to be satisfied. In the case of multiple conditions, Lacework evaluates the conditions sequentially. Note that there can be only one condition type within a condition group.
- Optionally, add a nested condition by creating a group. Nested conditions are evaluated if their parent conditions are satisfied. In the following example, resource tags are evaluated for resources that belong to the us-west-2 region, for example:
- At any time, you can preview the data set matched by the configured conditions by clicking the Preview button. The preview lets you spot check your conditions by displaying a subset of the resources that match your current conditions based on resource data from the last two days.
Click Save to have the save the resource group and make it available in RBAC configuration settings and resource views.
While resource collection occurs at regular intervals, the conditions associated with resource groups are evaluated at the time of use, such as when the compliance view is accessed in the Lacework Console. This means that any change to the resource groups conditions take immediate effect, and against the resources collected up to the latest resource group collection cycle.
Troubleshooting Resource Group Creation
If your resource group conditions do not return data as expected, whether when viewed using the preview feature or as a result of resource collection, ensure that you are using the latest Terraform modules and have applied the latest required permissions. If this error occurs for GCP, see Terraform upgrade information; for Azure permissions, see Create an Azure App for Integration. You may also need to update to the latest Lacework Agent version.
Modifying a Resource Group
You can edit or delete a resource group from the Resource Groups page by clicking the ellipses (...) and choosing the action you want to perform from the list.
Note that you cannot edit or delete a resource group that is used in the condition in another resource group. You must remove the nested resource group first.
Controlling User Access by Resource Group
To limit user access in the Lacework Console by resource group, assign the resource group to a user group to which the user belongs. By default, users cannot access any resources unless they have been assigned a group with resource group access.
Users can belong to more than one user group. The actual resource groups that a user has access to are cumulative among those resource groups. That is, a user who belongs to User Group 1, which has access only to dev resource, and User Group 2, which has access to all production resources, will have access to all resources, both dev and production.
You can assign resource groups while creating or editing the user group. When creating a new user group, assign resource group access to the group in the second new group configuration steps.
You can add resource group access to an existing group by opening the details view of the user group, and clicking the edit icon. Use the the Resource groups field to add or remove resource groups, as shown:
In the User groups page, the name of resource groups that have been mapped to user groups appear in the Data Access column.
Note that if a user had access to a resource in a given time frame, they will be able to see the resource within that time frame even if that access is taken away later.
View Filtering by Resource Group
View filtering allows Lacework Console users to focus on the vulnerability or compliance data relevant to their interests.
Note that resources are unavailable if the resource groups condition do not apply to the resource type for a given view. For example, you can't filter by a container-based resource group on the Cloud Compliance page, since container resource groups are based on Image IDs and the Cloud Compliance view is based on Resource IDs.
Also, organization, tenant, or folder information is not available at the machine level for agent or agentless installations.
Legacy Resource Groups
Legacy resource groups are used in alert routing.
After a resource type is integrated with Lacework, you can create a resource group for that type.
- Navigate to Settings > Configuration.
- Select the first Resource groups tab.
- Click + Add New.
- Select the group type from the list and click Next.
- Name the resource group and optionally add a description.
- Complete the fields for the resource type.
The Machine group type supports the * wildcard when you manually enter machine tags.
- Click Save.
A new resource group displays in the table.
Organization-level resource groups can contain only Lacework accounts.