Skip to main content

Transforming Linux syslog with Bower

Use this guide when you have Linux machines producing syslog (or journald / /var/log/auth.log / /var/log/secure) and you want to parse, transform, redact, and select only high-value security signal into Microsoft Sentinel's BowerSecurity_CL table — with the same zero-secret Azure Managed Identity (MSI) simplicity as AMA, plus host-side Australian privacy redaction, default-deny selection, and query-verified proof of arrival.

For why teams choose Bower over raw AMA forwarding or Cribl, see Why Bower. For the underlying ACSC ISM and Microsoft Sentinel controls, see ACSC and Microsoft logging best practices.

Dead-simple 2-step quick start (Azure VM or Azure Arc with Managed Identity)​

On an Azure Linux VM or an Azure Arc-enabled Linux server (on-premises, AWS, or GCP), Bower uses the host's Managed Identity (MSI) by default (BOWER_AZURE_CREDENTIAL=managed-identity). There are no Entra app registrations, no client secrets, no stored tokens, and—in local mode—no TLS certificates to create or rotate, because rsyslog talks to Bower over acknowledged loopback RELP (127.0.0.1:20514).

Step 1: Deploy the Sentinel table, DCR, and single-DCR MSI role (1 command)​

On an admin workstation with Azure CLI and a checkout of this repository:

# Grab the host's system-assigned Managed Identity principal ID:
# Azure VM: MSI_ID=$(az vm identity show -g rg-linux -n linux-01 --query principalId -o tsv)
# Azure Arc: MSI_ID=$(az connectedmachine show -g rg-arc -n linux-01 --query identity.principalId -o tsv)

# Preview first (plan-only), then deploy BowerSecurity_CL + kind:Direct DCR + least-privilege MSI grant:
az deployment group what-if --resource-group rg-sentinel \
--template-file deploy/bicep/main.bicep \
--parameters workspaceName=law-sentinel ingestPrincipalObjectId="$MSI_ID"

az deployment group create --resource-group rg-sentinel --name bower-sentinel \
--template-file deploy/bicep/main.bicep \
--parameters workspaceName=law-sentinel ingestPrincipalObjectId="$MSI_ID"

# Read the two values Bower needs:
DCE=$(az deployment group show -g rg-sentinel -n bower-sentinel --query properties.outputs.dataCollectionEndpoint.value -o tsv)
DCR=$(az deployment group show -g rg-sentinel -n bower-sentinel --query properties.outputs.dataCollectionRuleImmutableId.value -o tsv)

deploy/bicep/main.bicep grants Monitoring Metrics Publisher scoped strictly to the single Bower DCR—never the whole workspace—and supports a user-assigned Managed Identity (createIngestIdentity=true) if you prefer one shared identity across a VM scale set.

Step 2: Bootstrap the signed pack, HMAC key, syslog listener, and rsyslog (1 command)​

Install the Bower deb/rpm package (Linux and Windows packages) and rsyslog-relp (sudo apt install rsyslog-relp or sudo dnf install rsyslog-relp), then run bower init linux-syslog:

bower init linux-syslog \
--pack-source ./packs/linux-syslog-security \
--dce-endpoint "$DCE" \
--dcr-id "$DCR" \
--out-dir ./bower-setup

# Review generated files if desired, then apply with root:bower 0640 permissions:
sudo ./bower-setup/apply-linux.sh

What that single command builds and verifies automatically:

  • Generates an ECDSA P-256 signing keypair (keys/bower-signing.key.pem, 0600 — kept offline and never copied by apply-linux.sh).
  • Builds, runs all 16 positive/negative/privacy/spoofing tests on, signs, and verifies linux-syslog-security-1.0.0.bowerpack.
  • Generates a 32-byte random HMAC pseudonymisation key (secrets/bower-hmac.key, 0600).
  • Writes /etc/bower/syslog.json (acknowledged loopback RELP 127.0.0.1:20514, all 9 Linux security routes pre-wired, zero TLS certs needed) and /etc/bower/source-expectations.json.
  • Writes /etc/bower/bower.env pre-configured for Azure Managed Identity (BOWER_AZURE_CREDENTIAL=managed-identity, zero inline secrets; pass --azure-client-id <guid> for a user-assigned MSI).
  • Writes and validates /etc/rsyslog.d/60-bower-linux-security.conf (rsyslogd -N1) and restarts bower.service and rsyslog.service.

Step 3: Verify and prove arrival in Sentinel​

bower doctor
bower tap --source syslog # watch post-redaction semantic events live
bower evidence run --collector-url http://127.0.0.1:4319

Query deduplicated Linux syslog events in Microsoft Sentinel (Defender portal):

BowerSecurityEvents
| where ApplicationName == "linux-syslog"
| project TimeGenerated, EventType, EventAction, EventResult,
EventOutcomeReason, ActorUsername, SourceIpAddress,
TargetName, Labels
| order by TimeGenerated desc
Why this is more secure than AMA with Managed Identity

Both paths use Azure VM / Azure Arc Managed Identity (MSI) with zero static secrets. With AMA, raw Syslog lines leave the host before any cloud DCR runs, so accidental TFNs, API keys, or secrets in sudo commands cross the network boundary unredacted, and delivery stops at agent upload. With Bower + MSI, deterministic redaction, HMAC username pseudonymisation, default-deny selection, and hash-chained queueing all run on the host before any byte leaves the machine, and bower evidence run proves the event is queryable in BowerSecurity_CL.

Choose your Linux architecture and agent​

Bower supports three Linux deployment patterns. Pick the one that fits your fleet:

Option 1: Per-host Azure VM / Azure Arc (--mode local-msi, default)​

  • Best for: Fastest, zero-certificate, zero-secret rollout on Azure VMs and Azure Arc Linux servers.
  • How it works: Bower runs locally on the Linux host as the unprivileged bower account. Local rsyslog forwards security programs over loopback RELP (127.0.0.1:20514, zero TLS certs). Bower uploads to Sentinel using the host's Managed Identity (MSI).
  • Prefer local journald or file tail instead of rsyslog? You can also read systemd-journald directly with linux-journald-ssh (systemd journald) or tail /var/log/auth.log with linux-authlog-ssh (Local files), or hand off to an existing AMA agent via --output ama-syslog (Quick start: Azure Monitor Agent).

Option 2: Centralised Bower syslog gateway (--mode gateway-relp)​

  • Best for: Transforming syslog for an entire fleet of Linux servers (including non-Azure / legacy hosts) without installing an extra binary on every machine.
  • How it works: Deploy one or two Bower Collector VMs on Azure (or Azure Arc) using Managed Identity (MSI) for Sentinel upload. Linux servers run stock rsyslog (omrelp + mutual TLS) forwarding only security programs to the gateway:
bower init linux-syslog \
--mode gateway-relp \
--allowed-senders 10.20.0.0/24,10.20.1.0/24 \
--collector-host bower-gw.example.internal \
--pack-source ./packs/linux-syslog-security \
--dce-endpoint "$DCE" \
--dcr-id "$DCR" \
--out-dir ./bower-gateway

Place your server certificate, private key, and sender CA bundle in /etc/bower/syslog/ on the gateway, run sudo ./bower-gateway/apply-linux.sh, and distribute bower-gateway/rsyslog/60-bower-linux-security.conf to your Linux fleet (see also the reference configs under examples/linux-syslog/).

Using the Management Console?

In Sources → Syslog, select RELP over TLS (acknowledged delivery for Linux rsyslog) and pack linux-syslog-security to generate a four-eyes-approved syslog.json and matching rsyslog omrelp snippet automatically.

Option 3: syslog-ng or hosts without rsyslog-relp (--mode gateway-tls)​

syslog-ng does not ship a RELP output; use RFC 5424 over TLS (TCP/6514) with a reliable disk buffer:

bower init linux-syslog \
--mode gateway-tls \
--allowed-senders 10.20.0.0/24 \
--collector-host bower-gw.example.internal \
--pack-source ./packs/linux-syslog-security \
--dce-endpoint "$DCE" \
--dcr-id "$DCR" \
--out-dir ./bower-tls

For syslog-ng senders, copy examples/linux-syslog/syslog-ng-tls-client.conf to /etc/syslog-ng/conf.d/60-bower-linux-security.conf, validate with syslog-ng --syntax-only, and reload syslog-ng.

Linux starter packs compared​

Bower ships four signed-ready starter packs for Linux security telemetry. Every pack bundles its policies, privacy profile, bounded transform parsers, Sigma detections (where applicable), DCR template, and sample corpus—and cannot be signed if any sample fails.

PackLinux agent / input sourceSecurity events transformedPrivacy & detections includedWhen to pick it
linux-syslog-securityrsyslog (omrelp/TLS) or syslog-ng (TLS) → BOWER_SYSLOG_CONFIG3 parsers:
0: sshd/sshd-session failed & accepted auth (ISM-1895)
1: sudo commands & denials (ISM-1509)
2: useradd/usermod/userdel/groupadd/groupdel/gpasswd (ISM-1650)
Default AU redaction + HMAC actor.username; local Sigma rules for SSH failures (T1110), sudo denials (T1548.003), and privileged group adds (T1098)Best starting point for transforming syslog from Linux machines (ISM-1977).
linux-journald-sshLocal systemd-journald (Bower.Source.Journald or journalctl -o json)sshd authentication failures (authentication_failure)Default AU redaction + HMAC actor.username; drops MESSAGE and other raw fieldsPer-host collectors reading directly from systemd journald without rsyslog.
linux-authlog-sshLocal file tail (BOWER_FILE_CONFIG on /var/log/auth.log or /var/log/secure)sshd/sshd-session authentication failures (authentication_failure) with strict injection-resistant grammarDefault AU redaction + HMAC actor.username; drops line, hostname and file pathPer-host collectors tailing plain-text auth logs with logrotate-safe cursors.
linux-ssh-gatewayPre-normalised JSON (POST /v1/packs/... or Docker sidecar)sshd/PAM authentication failures (authentication_failure)Default AU redaction + HMAC actor.username; SSH failure detection (T1110)Containers or gateways already emitting structured JSON records.

Extending transforms for your own Linux daemons​

Need to transform another Linux syslog source (such as nftables, auditd, haproxy, nginx, or systemd)?

  1. Copy packs/linux-syslog-security as a starting template or add a new numbered parser under parsers/ (for example 03-nftables-syslog.json).
  2. Write bounded, linear-time regex_extract and lookup statements using the transform language reference. Bower's validator checks static sensitivity flow, field caps, and step budgets at build time.
  3. Add a matching default-deny policy in policies/ and (optionally) Sigma detections in detections/.
  4. Add positive, negative, privacy (mustNotContain), expectFields, and adversarial samples to samples/.
  5. Build, test, and inspect the population diff before rolling out:
    bower pack build ./my-linux-pack --key ./keys/bower-signing.key.pem --out ./artifacts/packs
    bower pack test ./artifacts/packs/my-linux-pack-1.0.0.bowerpack --trusted-key ./keys/bower-signing.pub.pem
    bower pack diff ./old.bowerpack ./artifacts/packs/my-linux-pack-1.0.0.bowerpack --trusted-key ./keys/bower-signing.pub.pem