Dynatrace allows you to tweak your ingested log data by adding a dt.security_context attribute to specific log records. This enables you to set additional options, for example, permissions for individual records. See, Permissions in Grail.
To create a security context adjustment to your ingested log data, you need to create rules that:
dt.security_context attribute added to them.fetch logs| filter matchesValue(log.source, "dsfm")
dt.security_context attribute. Once satisfied with the query result, copy the log processing function of the DQL query: matchesValue(log.source, "dsfm").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.Log Security Context is based on rules that contain a matcher and the dt.security_context attribute definition.
dt.security_context attribute.Go to Settings > Log Monitoring > Security context to view log 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 log processing security rule consists of the following:
To add a log security context rule:
dt.security_context attribute.dt.security_context attribute.Your log records contain attribute log.source with a value of dsfm. Only certain users or user groups should have access to them and you want to create a log security context rule that:
dsfm as a value of the log.source attribute.dt.security_context attribute with the sec-lvl-7 value to all filtered log records.Go to Logs and events page and execute a DQL query using a log processing function:
fetch logs| filter matchesValue(log.source, "dsfm")
Copy the log processing function of the DQL query: matchesValue(log.source, "dsfm").
Go to Settings > Log Monitoring > Security context and select Add rule on the Log Security Context page.
For the Rule name enter: Level 7 - dsfm.
For the Matcher enter: matchesValue(log.source, "dsfm").
For the Select value source type select Literal.
For the Value enter: sec-lvl-7.
Select Save changes.
Once new log data arrives, it is processed by log security context rules and a new dt.security_context attribute is added with a value of sec-lvl-7. You can go to Logs and events page and check that new log records are processed by your Level 7 - dsfm log security context rule. Use the DQL to view all log records containing sec-lvl-7 value in dt.security_context attribute:
fetch logs| filter matchesValue(dt.security_context, "sec-lvl-7")
Based on this attribute, you can now create security-related user and group policies. See, Permissions in Grail.