sensitive_data block in atatus.yml covers every log the agent ships: log files configured in conf.d, Kubernetes and Docker container logs, Windows event logs, syslog, and AWS S3 logs. You do not need to change each log source.
Agent-side masking or the Sensitive Data Classifier
Atatus can mask sensitive data in two places. They work well together:
A common setup is to mask on the host what must never leave your network, and use the Sensitive Data Classifier for account-wide rules, search tags, and alerting.
Enable masking
1
Turn on log collection
Masking applies to the logs the agent collects, so log collection must be on. In
/etc/atatus-infra-agent/atatus.yml, set:2
Add the sensitive_data block
Add this block to the same file. It turns on every built-in rule:
3
Restart the agent
Restart the agent so it reads the new configuration:
4
Check that masking is on
The agent writes the active rules to
/var/log/atatus-infra-agent/agent.log when it starts:[REDACTED: followed by the rule name and ], and the rest of the line is kept:
"cvv":123 becomes "cvv":"[REDACTED:cvv]".
Built-in rules
All built-in rules are on whenenabled: true is set, except the two opt-in rules at the end of the table.
Some values identify themselves, such as an email address or a card number, so the agent finds them anywhere in a log line. Others only mean something next to their field name, such as a CVV or a date of birth, so the agent masks them when they follow a matching key.
Keys are matched in the common log formats (JSON, logfmt,
key: value, XML, form data, and Ruby or Python hashes), ignoring case and _, -, and . separators. A key also matches at the end of a longer name, so mobileNo, mobile_no, and customer.mobile_no all match mobile.
Some values are left alone on purpose. Network fields such as
remoteAddress or address=10.0.0.5:443 are not treated as postal addresses, certificate and token expiry timestamps are not treated as card expiry dates, and AWS access key IDs (AKIA...) are kept because they identify a key without granting access. The AWS secret access key is masked.Customize the rules
List only the rules you want to change underrules:
Add custom rules
You can add new data types inatatus.yml, without an agent upgrade, under custom_rules:
Use
(?:...) for groups other than value, and \b at the edges of a pattern so it does not match inside longer words.
If the configuration is invalid
An unknown rule name, an invalid regular expression, or a replacement with quotes stops log collection. The agent writes the reason to/var/log/atatus-infra-agent/agent.log:
Limits
- Names, addresses, and dates of birth are found only next to a field name. A name in plain text (“Dear Ravi Kumar”), in a CSV row, or in an SQL
VALUES (...)list is not masked. Add the field names your logs use withextra_keys. - Plain
nameis not a built-in key, because in infrastructure logs it usually names a pod, a container, or a service. If your logs usenamefor people, for example<Payer name="...">in UPI XML, add it withconsumer_name: extra_keys: [name]. - A foreign phone number written without
+and a country code, such as415-555-2671, is masked only after a key such asphone. - For Windows event logs, the event fields (
event_dataanduser_data) are scanned as well as the message. For other logs, the message is scanned. - Checksums remove most false matches but not all. Occasionally an ID that happens to pass a checksum, such as a 16-digit number passing Luhn, is masked.
Next steps
- Sensitive Data Classifier Overview: mask and tag sensitive data in the Atatus ingest pipeline.
- Logs Monitoring: set up log collection.