Dynatrace has a permission model for Grail. This applies to all telemetry data, such as metrics, events, spans, and logs.
We recommend setting up permissions along organizational lines and deployment scopes. Suitable concepts include host groups, Kubernetes clusters, and Kubernetes namespaces. These attributes are typically available for all telemetry data ingested via Dynatrace collection methods like OneAgent, OpenTelemetry, Kubernetes operator, etc. Hence, these attributes can be used to enable record-level permissions.
For Kubernetes-based deployments, make sure Dynatrace Operator has metadata enrichment enabled.
If you only require a basic permission concept, setting up bucket-level permissions is the best option. You can then route your data to the correct bucket in OpenPipeline by matching one of the mentioned deployment-relevant primary Grail fields.
For more control in Dynatrace, you can set up policy boundaries with more granular restrictions on a data level. By default, you can use the following attributes:
dt.host_group.idhost.namek8s.cluster.namek8s.namespace.nameDynatrace provides a comprehensive permission model for Grail that applies to all telemetry data-including metrics, logs, spans, and events.
Dynatrace allows you to tweak your ingested business events data by adding a dt.security_context attribute to specific business events records. This enables you to set additional options, for example, permissions for individual records. See, Permissions in Grail.
You can set those permissions for individual records on specific attribute values or automatically enriched entities in a business event (hosts, process groups, process group instances) when OneAgent captures data.
For basic use cases, it's best to have the permission boundaries following the deployment of your organization lines around hosts and process groups, or other attributes that can define such boundaries, such as the geographical location of the data.
To create a security context adjustment to your ingested business events data, you need to create rules that:
dt.security_context attribute added to them.
Notebooks and create a DQL query using a business events processing function. For example:
fetch bizevents| filter matchesValue(geo.city.name, "Brussels")
dt.security_context attribute. Once satisfied with the query result, copy the business events processing function of the DQL query: matchesValue(geo.city.name, "Brussels").dt.security_context attribute.
The value of the dt.security_context attribute can be a literal value that you provide, or you can specify the name of another attribute of which the value will be used as the value of dt.security_context.You can define the security context at the source via OneAgent, OpenTelemetry, or Kubernetes labels or annotations. This allows you to use your existing labels and tags to facilitate permissions in Dynatrace.
recommended optional
Business event security context is based on rules that contain a matcher and the dt.security_context attribute definition, and they're set as a processor in OpenPipeline. The matcher narrows down the available business event records for executing this specific rule, while the value source type specifies the value of the dt.security_context attribute.
For more information, read about OpenPipeline processors.
Go to
Settings > Process and contextualize > OpenPipeline > Business events.
Go to the Pipelines tab and select an existing pipeline or create a new one with an existing dynamic route that would apply on the incoming business event.
Select the Permission tab to view business events processing security processors that are in effect on that pipeline, reorder the existing processors, and create new processors. Processors are executed in the order in which they're listed, from top to bottom. This order is critical because the first user-defined processor that matches is executed. A business events security processor consists of the following:
To add a new security context processor, go to the Permission tab and select Processor > Set security context within the chosen pipeline.
Add a matching condition to your processor by pasting the business events processing function from your DQL query.
Choose the Security context value and provide the Security context field value:
dt.security_context attribute.dt.security_context attribute.Your business events records contain attribute geo.city.name with a value of Brussels. Only users in the team_EU user group should have access to them and you want to create a business events security context rule that:
Brussels as a value of the geo.city.name attribute.dt.security_context attribute with the team_EU value to all filtered business events records.To create a new rule
Go to
Notebooks and execute a DQL query using a business events processing function:
fetch bizevents| filter matchesValue(geo.city.name, "Brussels")
Copy the business events processing function of the DQL query: matchesValue(geo.city.name, "Brussels").
Go to
Settings > Process and contextualize > OpenPipeline and navigate to the pipeline where you want to add the processor.
Select the Permission tab, and select Processor > Set security context.
Define your new processor:
team_EU - BrusselsmatchesValue(geo.city.name, "Brussels")team_EUSelect Save.
Previous Dynatrace optional
If you haven’t upgraded to Grail and OpenPipeline yet, follow this section for classic processing.
Business event security context is based on rules that contain a matcher and the dt.security_context attribute definition.
dt.security_context attribute.Go to Settings > Business Observability > Security context to view business events processing security rules that are in effect, reorder the existing rules, and create new rules. Rules are executed in the order in which they're listed, from top to bottom. This order is critical because the first user-defined rule that matches is executed.
Expand Details to examine a rule definition. A business events processing security rule consists of the following:
To add a business events security context rule:
dt.security_context attribute.dt.security_context attribute.Your business events records contain the attribute geo.city.name with the value Brussels. Only users in the team_EU user group should have access to them and you want to create a business events security context rule that:
Brussels as a value of the geo.city.name attribute.dt.security_context attribute with the team_EU value to all filtered business events records.Go to the Logs and events page and execute a DQL query using a business events processing function:
fetch bizevents| filter matchesValue(geo.city.name, "Brussels")
Copy the business events processing function of the DQL query: matchesValue(geo.city.name, "Brussels").
Go to Settings > Business Analytics > Security context and select Add rule on the Business event security context page.
Define your new rule:
team_EU - BrusselsmatchesValue(geo.city.name, "Brussels")team_EUSelect Save changes.
optional
Once new business events data arrives, it's processed by business event security context rules or a processor (depending on the availability of OpenPipeline). A new dt.security_context attribute is added with a value of team_EU. You can go to
Notebooks and check that new business events records are processed by your team_EU - Brussels business events security context rule. Use the DQL to view all business events records containing the team_EU value in the dt.security_context attribute:
fetch bizevents| filter matchesValue(dt.security_context, "team_EU")
Based on this attribute, you can now create security-related user and group policies. See, Permissions in Grail.