The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
docs: roll out Beacon and the Sentinel forwarder with Workspace ONE
shukieshahdaf58f9d2915
diff --git a/docs/docs.json b/docs/docs.jsonindex 1208b904..d0b954eb 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -543,7 +543,8 @@"guides/jamf-gcs-mdm","guides/jamf-s3-mdm","guides/jamf-falcon-mdm",- "guides/jamf-sentinel-mdm"+ "guides/jamf-sentinel-mdm",+ "guides/workspace-one-sentinel-mdm"]},{diff --git a/docs/guides/jamf-sentinel-mdm.mdx b/docs/guides/jamf-sentinel-mdm.mdxindex 9838edd6..d2fcd7eb 100644--- a/docs/guides/jamf-sentinel-mdm.mdx+++ b/docs/guides/jamf-sentinel-mdm.mdx@@ -5,6 +5,10 @@ description: "Roll out Beacon to Apple Silicon Macs with Jamf Pro and send runtiThis guide takes you from no Beacon on your Macs to every Mac in a Jamf pilot sending its AI agent activity to one Microsoft Sentinel table. Follow the steps in order.+<Note>+ Beacon can now set up and manage the Sentinel forwarder itself: `sudo /opt/beacon/bin/beacon endpoint sentinel forwarder install --system` replaces the script in Policy 2 and works the same on Linux and Windows. See [Vector and the Logs Ingestion API](/log-forwarding/microsoft-sentinel#vector-and-the-logs-ingestion-api), and [Beacon with Workspace ONE and Microsoft Sentinel](/guides/workspace-one-sentinel-mdm) for a Windows rollout.+</Note>+A Homebrew install on one Mac is only for looking at events locally. It does not include Vector, and it writes a per-user log. The Macs in the pilot use the signed package, which writes `/var/log/beacon-agent/runtime.jsonl` and ships Vector at `/opt/beacon/bin/vector`.## What you'll set updiff --git a/docs/guides/workspace-one-sentinel-mdm.mdx b/docs/guides/workspace-one-sentinel-mdm.mdxnew file mode 100644index 00000000..57d40819--- /dev/null+++ b/docs/guides/workspace-one-sentinel-mdm.mdx@@ -0,0 +1,226 @@+---+title: "Beacon with Workspace ONE and Microsoft Sentinel"+description: "Roll out Beacon to Windows machines with Workspace ONE UEM and send runtime telemetry to Microsoft Sentinel."+---++This guide takes you from no Beacon on your Windows machines to every machine in a Workspace ONE pilot sending its AI agent activity to one Microsoft Sentinel table, attributed to the person who ran the agent. Follow the steps in order.++## What you'll set up++When you finish, each machine in the pilot has:++- Beacon installed from the MSI, with its collector running as the `BeaconCollector` Windows service.+- Claude Code and Codex reporting to that collector, for each person who signs in.+- Agent activity written to `C:\ProgramData\Beacon\Endpoint\logs\runtime.jsonl`.+- The `BeaconSentinelForwarder` Windows service (the Vector that ships in the MSI) posting each line to the Azure Monitor Logs Ingestion API.++Those lines land in the custom Log Analytics table `BeaconRuntime_CL`, which Sentinel hunts over. macOS and Linux machines set up the same forwarder with the same command, so every platform fills the same table. See [Microsoft Sentinel forwarding](/log-forwarding/microsoft-sentinel).++```mermaid+flowchart LR+ WS1[Workspace ONE] -->|app| MSI[Beacon MSI]+ WS1 -->|script, as System| Fwd[BeaconSentinelForwarder]+ WS1 -->|script, as each user| Cfg[Claude Code and Codex settings]+ MSI --> Collector[BeaconCollector]+ Cfg --> Collector+ Collector --> Logs["runtime.jsonl"]+ Logs --> Fwd+ Fwd --> Table[(BeaconRuntime_CL)]+```++## Before you start++| You need | Why |+| --- | --- |+| Workspace ONE UEM, with a pilot smart group of a few Windows x64 machines | Scope the app and scripts before a wider rollout. |+| A Log Analytics workspace with Microsoft Sentinel enabled | Step 1. |+| Permission to deploy a Data Collection Rule and register an app in Microsoft Entra ID | Step 1. The app needs the Monitoring Metrics Publisher role on that rule. |+| A way to make a PFX certificate, such as `openssl` | Step 1. The forwarder authenticates with it. |++The machines do not need Beacon installed beforehand. Workspace ONE installs it in step 2.++## 1. Prepare Sentinel++Do this once, in Azure. The same workspace then receives every machine.++On any machine with Beacon, generate the content pack:++```powershell+beacon endpoint sentinel install-pack --output .\beacon-sentinel-pack+```++Then:++1. **Create the table.** Name it `BeaconRuntime`; Azure adds `_CL`. Upload `sample-event.jsonl` and paste `dcr-transform.kql` in the schema step. The full portal steps are in [Microsoft Sentinel forwarding](/log-forwarding/microsoft-sentinel#3-create-the-beacon-custom-table).+2. **Create the Data Collection Rule.** Deploy `dcr-logs-ingestion-template.json` with the workspace resource ID. Copy the `dcrImmutableId` output (it starts with `dcr-`), then read the rule's logs ingestion URL:++ ```bash+ az monitor data-collection rule show \+ --resource-group <resource group> --name dcr-beacon-runtime-ingestion \+ --query endpoints.logsIngestion --output tsv+ ```++3. **Register an app with a certificate.** Make a certificate and its PFX:++ ```bash+ openssl req -x509 -newkey rsa:2048 -nodes -days 365 \+ -keyout beacon-sentinel.key -out beacon-sentinel.crt -subj '/CN=beacon-sentinel'+ openssl pkcs12 -export -inkey beacon-sentinel.key -in beacon-sentinel.crt \+ -out beacon-sentinel.pfx -passout pass:'<pfx password>'+ ```++ A certificate you already have in a Windows certificate store works too: export it with its private key, as a PFX, with `Export-PfxCertificate` or the Certificates console.++ Register an app in Microsoft Entra ID and upload `beacon-sentinel.crt` under **Certificates & secrets**. Note the tenant ID and the application (client) ID. Keep the PFX and its password for step 2, and delete the key file.+4. **Grant the role.** On the Data Collection Rule, give the app the **Monitoring Metrics Publisher** role. A new assignment can take up to 30 minutes to apply. The forwarder keeps retrying until it does, and loses nothing meanwhile.++Each machine needs outbound HTTPS to `login.microsoftonline.com` and to the rule's `*.ingest.monitor.azure.com` hostname.++## 2. Set up Workspace ONE++Create one app and two scripts, scoped to the pilot smart group:++| Order | What | Runs as | Purpose |+| --- | --- | --- | --- |+| 1 | Beacon MSI (app) | System | Installs Beacon, the collector and Vector |+| 2 | Forward to Sentinel (script) | System | Sets up the `BeaconSentinelForwarder` service |+| 3 | Configure agent tools (script) | Current user | Points that person's Claude Code and Codex at the collector |++If a scheduled task ships the log today, remove it once the forwarder is running, or every line is sent twice.++### App: the Beacon MSI++Download `BeaconEndpointAgent-<version>-x64.msi` and its `.sha256` from the [latest release](https://github.com/asymptote-labs/agent-beacon/releases/latest) and check it:++```powershell+(Get-FileHash BeaconEndpointAgent-<version>-x64.msi -Algorithm SHA256).Hash+```++Add it in Workspace ONE as a Windows app, installed in device context, with:++| Setting | Value |+| --- | --- |+| Install command | `msiexec /i BeaconEndpointAgent-<version>-x64.msi /qn /norestart` |+| Uninstall command | `msiexec /x BeaconEndpointAgent-<version>-x64.msi /qn /norestart` |+| When to call install complete | The app is installed (the MSI's product code) |++Keep `/norestart`. The package never needs a reboot, and without it Windows Installer restarts the machine on its own if something holds a file it has to replace.++To keep users from reading or writing the log themselves, set the machine environment variable `BEACON_LOG_ACCESS` to `restricted` before the app installs. See [restricted log access](/security/restricted-log-access#on-windows). The forwarder works the same either way.++The installer is not code-signed yet. If you run AppLocker or WDAC, allow `beacon.exe`, `beacon-hooks.exe`, `beacon-otelcol.exe` and `vector.exe` in `C:\Program Files\Beacon\bin` by path or file hash.++**Success looks like:** `sc.exe query BeaconCollector` reports `RUNNING`.++### Script: forward to Sentinel++Add a PowerShell script that runs as **System**, after the app. Give it these variables, and mark the PFX and its password as secure. Workspace ONE passes script variables to the script as environment variables.++| Variable | Value |+| --- | --- |+| `BEACON_SENTINEL_ENDPOINT` | The logs ingestion URL from step 1 |+| `BEACON_SENTINEL_DCR_ID` | The `dcr-...` immutable ID |+| `BEACON_SENTINEL_TENANT_ID` | The tenant ID |+| `BEACON_SENTINEL_CLIENT_ID` | The app's client ID |+| `BEACON_SENTINEL_PFX_BASE64` | The PFX, base64-encoded (`[Convert]::ToBase64String([IO.File]::ReadAllBytes('beacon-sentinel.pfx'))`) |+| `BEACON_SENTINEL_PFX_PASSWORD` | The PFX password |++```powershell title="Forward to Sentinel"+$ErrorActionPreference = 'Stop'+$beacon = Join-Path $env:ProgramFiles 'Beacon\bin\beacon.exe'+$pfx = Join-Path $env:SystemRoot ('Temp\beacon-sentinel-' + [Guid]::NewGuid().ToString('N') + '.pfx')+[IO.File]::WriteAllBytes($pfx, [Convert]::FromBase64String($env:BEACON_SENTINEL_PFX_BASE64))+try {+ $env:AZURE_CLIENT_CERTIFICATE_PASSWORD = $env:BEACON_SENTINEL_PFX_PASSWORD+ & $beacon endpoint sentinel forwarder install --system `+ --endpoint $env:BEACON_SENTINEL_ENDPOINT `+ --dcr-immutable-id $env:BEACON_SENTINEL_DCR_ID `+ --tenant-id $env:BEACON_SENTINEL_TENANT_ID `+ --client-id $env:BEACON_SENTINEL_CLIENT_ID `+ --client-certificate $pfx+ exit $LASTEXITCODE+} finally {+ Remove-Item -LiteralPath $pfx -Force -ErrorAction SilentlyContinue+}+```++The command copies the certificate and its password into `C:\ProgramData\Beacon\Endpoint\forwarders\sentinel`, which only SYSTEM and Administrators can read, so the script deletes its own copy. It has Vector check the config before changing anything, and then starts the service. On its first start the forwarder sends what is already in the log once, including the past sessions the install picked up, and then each new line.++Running the script again replaces the settings, which is how you rotate the certificate.++**Success looks like:** the script exits 0, and `sc.exe query BeaconSentinelForwarder` reports `RUNNING`.++### Script: configure agent tools++Add a PowerShell script that runs as the **current user**, so it runs for each person who signs in:++```powershell title="Configure agent tools"+& (Join-Path $env:ProgramFiles 'Beacon\bin\beacon.exe') endpoint user-config repair-installed --system --harness claude,codex+exit $LASTEXITCODE+```++It points that person's Claude Code and Codex at the collector and installs their hooks. It also writes the person's Windows account (their SID) into Claude Code's settings, so Claude Code's own events name them even on a machine several people use. Hook events always do.++**Success looks like:** the script exits 0, and `%USERPROFILE%\.claude\settings.json` contains `OTEL_EXPORTER_OTLP_ENDPOINT` and `beacon.os.user.id`.++## 3. Check one machine++From an elevated PowerShell on a pilot machine:++```powershell+$beacon = Join-Path $env:ProgramFiles 'Beacon\bin\beacon.exe'+& $beacon endpoint sentinel forwarder status --system+& $beacon endpoint sentinel validate --system+```++`status` shows the service state and Vector's latest warning, if it has one. `validate` writes a test event. Within a minute or two it is in Log Analytics:++```kql+BeaconRuntime_CL+| where TimeGenerated > ago(1h)+| where Message has "Beacon endpoint Sentinel validation event"+```++Then have someone run Claude Code and check that their events carry their account:++```kql+BeaconRuntime_CL+| where TimeGenerated > ago(1h)+| extend UserId = tostring(RawData.user.uid), User = tostring(RawData.user.name)+| summarize Events = count() by HostName, User, UserId, HarnessName+```++Codex's own events carry the collector's account rather than the person's, because Codex has no setting for it. Its hook events carry the person, under the same `SessionId`.++## Upgrades and removal++- **Upgrade:** add the newer MSI with the same install command. The forwarder keeps its settings and credential, and the upgrade restarts it on the new Vector.+- **Uninstall:** removes both services. The settings stay in `C:\ProgramData\Beacon\Endpoint`, so reinstalling brings the forwarder back. To remove those too, follow [Uninstall](/platforms/windows#uninstall) with `BEACON_PURGE=1`.+- **Remove only the forwarder:** `beacon.exe endpoint sentinel forwarder remove --system`.++## Troubleshooting++| What you see | Likely cause |+| --- | --- |+| The forwarder script fails with "PKCS12 parsing failed" | The PFX password is wrong. Check `BEACON_SENTINEL_PFX_PASSWORD`. |+| `status` reports `Retrying after response` with 403 | The role assignment has not applied yet. Wait up to 30 minutes; nothing is lost meanwhile. |+| `status` reports an `AADSTS` error | Entra ID refused the credential: a wrong tenant or client ID, or a certificate that was not uploaded to the app, has expired or was removed. Vector drops what it cannot send while this lasts, so renew certificates before they expire and rerun the forwarder script with the new one. |+| Events arrive under the collector's account (`SYSTEM`) | They are Codex's own events, or the person's agent-tools script has not run yet. |+| An app or script is blocked | AppLocker or WDAC; allow the four programs in `C:\Program Files\Beacon\bin`. |++## Related++<Columns cols={2}>+ <Card title="Microsoft Sentinel forwarding" icon="tower-broadcast" href="/log-forwarding/microsoft-sentinel">+ Both ingestion paths, the table, and hunting content.+ </Card>+ <Card title="Windows install" icon="windows" href="/platforms/windows">+ The MSI, the service, and how upgrades and uninstall work.+ </Card>+ <Card title="beacon endpoint sentinel" icon="terminal" href="/cli/sentinel">+ Every forwarder command and flag.+ </Card>+ <Card title="Restricted log access" icon="lock" href="/security/restricted-log-access">+ Keep users from reading or writing the runtime log.+ </Card>+</Columns>diff --git a/docs/log-forwarding/microsoft-sentinel.mdx b/docs/log-forwarding/microsoft-sentinel.mdxindex c8b99bbf..a10f9ac4 100644--- a/docs/log-forwarding/microsoft-sentinel.mdx+++ b/docs/log-forwarding/microsoft-sentinel.mdx@@ -297,6 +297,9 @@ Beacon applies redaction, sanitization, truncation, and event-size limits before<Card title="Jamf and Sentinel" icon="screwdriver-wrench" href="/guides/jamf-sentinel-mdm">Roll Beacon out to Macs with Jamf Pro and forward runtime events to Sentinel.</Card>+ <Card title="Workspace ONE and Sentinel" icon="windows" href="/guides/workspace-one-sentinel-mdm">+ Roll Beacon out to Windows machines with Workspace ONE and forward runtime events to Sentinel.+ </Card><Card title="beacon endpoint sentinel" icon="terminal" href="/cli/sentinel">Review Microsoft Sentinel command syntax, flags, and examples.</Card>