Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ control plane, or runtime AI filter.
- `src/Bower.Source.Syslog`: RFC 5424/3164 syslog over TCP, TLS and UDP, routed to signed pack parsers (collector `BOWER_SYSLOG_CONFIG`).
- `src/Bower.Source.File`: security-selected local file tail (operator-named files under allowed roots, no wildcards), routed to signed pack parsers with durable cursors (collector `BOWER_FILE_CONFIG`).
- `src/Bower.Source.WindowsEventLog`: channel and event ID allow-listed Windows Event Log subscriptions with durable bookmarks, mapped by signed pack parsers (C# collector on Windows, `BOWER_WINDOWS_EVENTLOG_CONFIG`).
- `src/Bower.Source.MicrosoftCloud`: least-privilege pull of Microsoft cloud admin and audit APIs (Intune audit and device compliance) with bounded HTTPS, a token host allow-list and durable per-page cursors, mapped by signed pack parsers (collector `BOWER_MICROSOFT_CONFIG`). Not the Unified Audit Log or an audit archive.
- `src/Bower.Agent.Docker`: Docker sidecar that forwards opted-in container security events.
- `src/Bower.ServiceDefaults`: opt-in OpenTelemetry host defaults; inert unless `OTEL_EXPORTER_OTLP_ENDPOINT` is set.
- `src/Bower.AppHost`, `tools/Bower.DevSinks`, `tests/Bower.AppHost.Tests`: Aspire local development and integration-test harness with local stand-in destinations (development only, never deployed). See `docs/getting-started/aspire.md`.
- `packs`: signed content packs (`linux-ssh-gateway`, `linux-journald-ssh`, `linux-authlog-ssh`, `windows-security-logon`, `aws-security`, `gcp-security`, `owasp-asvs-app-logging`).
- `packs`: signed content packs (`linux-ssh-gateway`, `linux-journald-ssh`, `linux-authlog-ssh`, `windows-security-logon`, `aws-security`, `gcp-security`, `owasp-asvs-app-logging`, `microsoft-intune`).
- `deploy/aws`, `deploy/gcp`: CloudFormation and Terraform for cloud signal and the S3 output policy (plan-only by default).
- `deploy/azure-function`: Bicep for the Azure Functions collector (Flex Consumption, managed identity; plan-only by default).
- `deploy/azure-webapp`, `deploy/docker/hosted`: private App Service pilot (Bicep, ephemeral queue) and hardened Compose for a hosted HTTPS collector. See `docs/deployment/hosted-collectors.md`.
Expand Down
15 changes: 15 additions & 0 deletions Bower.sln
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bower.Source.Journald", "sr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bower.Source.Kubernetes", "src\Bower.Source.Kubernetes\Bower.Source.Kubernetes.csproj", "{DBB32FBD-107E-4DDC-A110-F00C1A3EC9D9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bower.Source.MicrosoftCloud", "src\Bower.Source.MicrosoftCloud\Bower.Source.MicrosoftCloud.csproj", "{34AF2780-854B-4886-9660-E97BCCDFCEC0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -691,6 +693,18 @@ Global
{DBB32FBD-107E-4DDC-A110-F00C1A3EC9D9}.Release|x64.Build.0 = Release|Any CPU
{DBB32FBD-107E-4DDC-A110-F00C1A3EC9D9}.Release|x86.ActiveCfg = Release|Any CPU
{DBB32FBD-107E-4DDC-A110-F00C1A3EC9D9}.Release|x86.Build.0 = Release|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Debug|x64.ActiveCfg = Debug|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Debug|x64.Build.0 = Debug|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Debug|x86.ActiveCfg = Debug|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Debug|x86.Build.0 = Debug|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Release|Any CPU.Build.0 = Release|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Release|x64.ActiveCfg = Release|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Release|x64.Build.0 = Release|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Release|x86.ActiveCfg = Release|Any CPU
{34AF2780-854B-4886-9660-E97BCCDFCEC0}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -729,5 +743,6 @@ Global
{BBF9180B-5DEE-43BB-8D0B-B11F7D368A2E} = {07C2787E-EAC7-C090-1BA3-A61EC2A24D84}
{827CAE03-02C1-4625-AB39-B32FAF688A1D} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{D784F971-24BA-435F-831E-4442A33FBC02} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{34AF2780-854B-4886-9660-E97BCCDFCEC0} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Microsoft cloud pull source (`Bower.Source.MicrosoftCloud`, collector `BOWER_MICROSOFT_CONFIG`): Intune audit events and a daily device compliance snapshot from Microsoft Graph with least-privilege read-only permissions, a token host allow-list, capped retry honouring `Retry-After`, and durable per-page cursors in the queue database. Signed `microsoft-intune` pack 1.1.0 (two parsers, two policies, four detections) and the `deploy/privacy/microsoft-cloud.yaml` pseudonymisation profile (email addresses hashed whole, so pseudonyms stay distinct per person).

## [1.0.0] - 2026-11-21

Initial v1.0.0 release of Bower, a self-hosted security telemetry privacy gateway for Microsoft Sentinel following the Collect, Select, Arrange, Deliver and Prove model.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ Full design: [architecture](docs/architecture/overview.md).
| Management UI and API | Fleet inventory, approval, health, audit, custom-log parser generation, privacy profile versioning with two-person review and signed assignment, and Entra app-role RBAC implemented |
| AI-assisted custom log parser generator | Deterministic local JSON, CSV, key/value and common-regex inference with OCSF/ASIM mappings and redacted preview |
| Windows Service | MSI installs the collector as the `Bower` service (`NT SERVICE\Bower`) |
| Microsoft cloud sources | Intune audit events and a daily device compliance snapshot pulled from Microsoft Graph with least-privilege read permissions, durable per-page checkpoints, retry and throttling handling; signed `microsoft-intune` pack. [Details](docs/deployment/microsoft-cloud-sources.md) |
| SQL Server source | EF Core adapter library with durable keyset/overlap cursors; collector polling orchestration not yet wired |
| AWS security signal | GuardDuty, Security Hub and high-value CloudTrail via EventBridge → SQS, plus Bower events from CloudWatch Logs via Firehose → S3; CloudFormation, signed `aws-security` pack, `bower-cloud` agent with IAM-role credentials |
| Google Cloud security signal | Security Command Center findings and Admin Activity audit logs via Pub/Sub with Australian storage policy; Terraform, signed `gcp-security` pack, ADC / Workload Identity Federation (key files refused) |
Expand Down Expand Up @@ -533,6 +534,7 @@ PowerShell). It has not been exercised against a live tenant yet.
| `BOWER_SOURCE_EXPECTATIONS` | — | JSON file of applications that must keep sending events; quiet ones degrade `/health`. [Details](docs/operations/suppression-archive-and-source-silence.md#source-silence) |
| `BOWER_ARCHIVE_PATH` | — | Directory for the ledger-verified long-term archive; retention then purges only events a verified archive of this queue covers. [Details](docs/operations/suppression-archive-and-source-silence.md#archive-and-replay) |
| `BOWER_FILE_CONFIG` | — | JSON file of security-selected local files (no wildcards), their allowed roots and routes to signed pack parsers; lines no parser selects are counted and dropped. [Details](docs/deployment/file-tail-source.md) |
| `BOWER_MICROSOFT_CONFIG` | (unset) | JSON file of Microsoft cloud API inputs (Intune audit and device compliance), each one tenant and one route to a signed pack parser; least-privilege read-only Graph permissions. [Details](docs/deployment/microsoft-cloud-sources.md) |
| `BOWER_SYSLOG_CONFIG` | — | JSON file of syslog listeners (RFC 5424/3164 over TCP, TLS or UDP), sender allow-lists and routes to signed pack parsers. Loopback unless TLS. [Details](docs/deployment/syslog-source.md) |
| `BOWER_ORIGIN_PRODUCERS` | — | Tokens-file producer IDs trusted to report where an event came from (the cloud forwarder's `X-Bower-Origin`: CloudWatch Logs group and stream). Others' headers are ignored; `anonymous` is refused. Fills the `Origin` column. [Details](docs/reference/sentinel-table.md#origin) |
| `BOWER_TAP_ENABLED` / `BOWER_TAP_PRODUCERS` | `true` / — | Serve the post-redaction `bower tap` stream; tokens-file producers allowed to tap besides the shared token. [Details](docs/operations/tap-and-top.md) |
Expand Down
26 changes: 26 additions & 0 deletions deploy/privacy/microsoft-cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: bower.security/v1
kind: PrivacyProfile
metadata:
id: microsoft-cloud-pseudonymised
version: 1.0.0
description: >-
For the microsoft-intune pack and the other Microsoft cloud source packs. Replaces user
principal names, object ids of people and resource display names with keyed HMAC
pseudonyms, so analysts can follow one person or resource across events without the
profile exposing who or what it is. Everything else keeps the default Australian
redaction. Set with BOWER_PRIVACY_PROFILE plus BOWER_PRIVACY_HMAC_KEY_FILE and
BOWER_PRIVACY_HMAC_KEY_ID.
detectors:
# Value detectors run before field rules. The default email action (mask) would turn
# megan.bowen@ and mark.smith@ into the same m***@ before the field rule hashed it, so
# every user sharing an initial and domain would share one pseudonym. Hash the address
# itself instead, wherever it appears.
id.email: hmac
fields:
- path: actor.username
action: hmac
- path: actor.userId
action: hmac
- path: target.name
action: hmac
maximumFieldLength: 16384
41 changes: 41 additions & 0 deletions docs/architecture/microsoft-cloud-envelope-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Microsoft cloud sources: envelope hand-off contract

Bower's Microsoft cloud sources collect and normalise admin and audit data from Microsoft
APIs that do not integrate cleanly with Sentinel. They do not keep it long term. A
separate archive (owned outside Bower) holds long-term copies of the well-known streams
(Unified Audit Log, Entra sign-in and audit, selected Defender events) for search, legal
hold and evidence packs. This page is the contract that lets a copy forwarded or archived
elsewhere line up with what Bower delivered.

## What Bower guarantees

| Field | Value | Stable across |
|---|---|---|
| `eventId` | `mscloud-` and 32 lowercase hex characters | Every re-read of an unchanged source record by the same input (overlap, crash recovery, restart) |
| `eventOriginalId` | Same as `eventId` | As above |
| `collector.sourceAdapter` | `mscloud:<input id>:<pack>:<parser index>` | The input's configuration |
| `application.name` | Pack defined, for example `microsoft-intune` | Pack major version |
| `eventType` | Pack defined, for example `intune_audit`, `intune_device_compliance` | Pack major version |
| `request.correlationId` | The source's own correlation id when it has one (Intune `correlationId`), else the source record id | Source |
| `labels.intuneAuditEventId` | `intune_audit`: the Intune audit event id (the source record id) | Source |
| `labels.intuneDeviceId`, `labels.snapshotDate` | `intune_device_compliance`: the Intune managed device id and the UTC day of the snapshot (together, the source record id) | Source |
| `target.id` | The source object's GUID (Intune resource id, Entra device id) | Source |
| `timeGenerated` | The source's own activity time; for snapshots, when the snapshot started | Source |

The event id is SHA-256 over `bower-mscloud-v1`, the input id, the source kind, the tenant
id, the source record id (the Intune audit event id; for compliance, the device id and the
snapshot date) and the bounded record content. A receiver that needs to join a Bower row
to the original Microsoft record should use the source record id carried in the labels
above, not recompute the hash.

## What a receiver must not assume

- Values are post-redaction. With `deploy/privacy/microsoft-cloud.yaml`, user principal
names, user object ids, resource names and email addresses are keyed HMAC pseudonyms;
the key never leaves the collector.
- Bower delivers at least once. Deduplicate on (`collector.id`, `eventId`), as the
`BowerSecurityEvents` parser does.
- Bower keeps queue rows only for its delivered retention period. It is not the system of
record and offers no legal hold.
- Fields can be added in a later pack version; none are renamed or removed within a major
version.
Loading
Loading