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
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Summary

<!-- Describe what changed and link the relevant issue (e.g. Closes #123 or Advances #123). -->

## Verification

- [ ] `dotnet build --configuration Release`
- [ ] `dotnet test --configuration Release`
- [ ] `dotnet format --verify-no-changes`
- [ ] UI checks (`cd ui/Bower.Management.Web && npm run lint && npm test && npm run build`) if UI changed
- [ ] Docs checks (`python3 -I tools/docs/generate_cli_reference.py --check`, `python3 -I tools/docs/generate_config_and_api_reference.py --check`, `python3 -I tools/docs/generate_glossary.py --check`, `python3 -m unittest tools/docs/tests/test_build_tools.py`)

## Documentation & security checklist

- [ ] **Docs updated?** (CLI, API, configuration, schema, or console changes include matching docs updates, or a `documentation` waiver is explained below)
- [ ] Australian English spelling used in user-facing text and docs
- [ ] Only synthetic data and example domains (`example.gov.au`, `example.com`, `192.0.2.x`) appear in examples and tests
- [ ] Security and compatibility impact explained below

## Security and compatibility impact

<!-- Explain any new trust boundary, RBAC rule, schema addition, or breaking-change consideration. -->
9 changes: 9 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- 'deploy/kubernetes/deployment.yaml'
- 'ui/Bower.Management.Web/src/components/glossary.json'
- 'src/Bower.Cli/Commands/CliHelp.cs'
- 'src/Bower.Collector/CollectorSettings.cs'
- 'src/Bower.Collector/CollectorApplication.cs'
- 'src/Bower.Management.Api/*.cs'
- 'schemas/**'
- '.github/workflows/docs.yml'
push:
branches: [main]
Expand All @@ -27,6 +31,10 @@ on:
- 'deploy/kubernetes/deployment.yaml'
- 'ui/Bower.Management.Web/src/components/glossary.json'
- 'src/Bower.Cli/Commands/CliHelp.cs'
- 'src/Bower.Collector/CollectorSettings.cs'
- 'src/Bower.Collector/CollectorApplication.cs'
- 'src/Bower.Management.Api/*.cs'
- 'schemas/**'
- '.github/workflows/docs.yml'
workflow_dispatch:

Expand Down Expand Up @@ -60,6 +68,7 @@ jobs:
run: |
.venv-docs/bin/python tools/docs/generate_glossary.py --check
.venv-docs/bin/python tools/docs/generate_cli_reference.py --check
.venv-docs/bin/python tools/docs/generate_config_and_api_reference.py --check
.venv-docs/bin/python -m unittest discover -s tools/docs/tests -p 'test_*.py'
- name: Build the site
working-directory: website
Expand Down
151 changes: 151 additions & 0 deletions docs/deployment/syslog-vendors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Syslog vendor configuration guides

These guides configure common Linux daemons and network security appliances to forward
security events to Bower's [syslog source](syslog-source.md) over **RFC 5424 TLS**
(`TCP/6514`). All hostnames and addresses below are synthetic (`192.0.2.x`,
`bower-collector.example.gov.au`).

Never send raw unrestricted debug traffic to Bower: configure each appliance to forward
only security-relevant facilities (authentication, firewall denies, threat, and
configuration changes) and pair every listener with a signed Bower pack parser.

## 1. Linux rsyslog (RFC 5424 over TLS)

Install `rsyslog-gnutls` (or `rsyslog-openssl`), place the collector's CA bundle at
`/etc/ssl/certs/bower-ca.pem`, and create `/etc/rsyslog.d/60-bower-security.conf`:

```text
global(
DefaultNetstreamDriver="gtls"
DefaultNetstreamDriverCAFile="/etc/ssl/certs/bower-ca.pem"
)

# Forward only authentication and security facilities with a bounded disk-assisted queue.
auth,authpriv.* action(
type="omfwd"
target="bower-collector.example.gov.au"
port="6514"
protocol="tcp"
template="RSYSLOG_SyslogProtocol23Format"
StreamDriver="gtls"
StreamDriverMode="1"
StreamDriverAuthMode="x509/name"
StreamDriverPermittedPeers="bower-collector.example.gov.au"
queue.type="LinkedList"
queue.filename="bower_fwd"
queue.maxDiskSpace="256m"
queue.saveOnShutdown="on"
action.resumeRetryCount="-1"
)
```

Validate with `rsyslogd -N1` and restart `rsyslog`.

## 2. Linux syslog-ng (RFC 5424 over TLS)

Add `/etc/syslog-ng/conf.d/60-bower.conf`:

```text
filter f_bower_security {
facility(auth, authpriv) or program("sshd") or program("sudo");
};

destination d_bower_tls {
syslog(
"bower-collector.example.gov.au"
port(6514)
transport("tls")
tls(
ca-dir("/etc/syslog-ng/ca.d")
peer-verify(required-trusted)
)
disk-buffer(
mem-buf-size(10485760)
disk-buf-size(268435456)
reliable(yes)
)
);
};

log {
source(s_src);
filter(f_bower_security);
destination(d_bower_tls);
};
```

Validate with `syslog-ng --syntax-only` and reload `syslog-ng`.

## 3. Palo Alto Networks PAN-OS

1. **Import the collector CA certificate:** *Device → Certificate Management → Certificates
→ Import* (`bower-ca.pem`). Create a *Certificate Profile* referencing it.
2. **Create a Syslog Server Profile:** *Device → Server Profiles → Syslog → Add*:
- Name: `Bower-Syslog-TLS`
- Syslog Server: `bower-collector.example.gov.au`
- Transport: **SSL** (TLS), Port: `6514`
- Format: **IETF** (RFC 5424), Facility: `LOG_USER`
3. **Create a Log Forwarding Profile:** *Objects → Log Forwarding → Add* and forward only
**Threat**, **Authentication**, **System**, and **Config** logs (plus security-relevant
**Traffic** denies) to `Bower-Syslog-TLS`.
4. Commit the configuration and verify receipt on the collector with `bower top`.

## 4. Fortinet FortiGate (FortiOS)

Configure RFC 5424 over TLS on the FortiGate CLI (replace `Bower_CA` with the imported CA
certificate name):

```text
config log syslogd setting
set status enable
set server "bower-collector.example.gov.au"
set mode reliable
set port 6514
set format rfc5424
set enc-algorithm high
set ssl-min-proto-version TLSv1-2
set certificate "Bower_CA"
end

config log syslogd filter
set severity warning
set forward-traffic disable
set local-traffic enable
set anomaly enable
set voip disable
end
```

## 5. Cisco IOS-XE / ASA

### Cisco IOS-XE (TCP / TLS via PKI trustpoint)

```text
logging trap informational
logging facility local6
logging source-interface Loopback0
logging host 192.0.2.10 transport tcp port 6514
logging origin-id hostname
service timestamps log datetime msec localtime show-timezone year
```

For TLS transport on IOS-XE releases supporting RFC 5425, attach a configured PKI
trustpoint (`transport tls`) or terminate TLS via a local rsyslog forwarder on the
management jump host.

### Cisco ASA

```text
logging enable
logging timestamp
logging trap notifications
logging facility 22
logging host management 192.0.2.10 6/6514 secure
```

## Verify with Bower

1. Confirm the listener is healthy in `/v1/status` (`syslog` block).
2. Watch post-redaction intake live with `bower tap --source syslog` or inspect counts with
`bower top`.
3. Verify zero unapproved event types leak past default-deny policies.
132 changes: 132 additions & 0 deletions docs/operations/alert-runbooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Console alert runbooks

Every condition surfaced on the console **Alerts** page (`/alerts`) and in collector
operational logs has a plain-language explanation, verification steps, and a recovery path
below. All examples use synthetic hosts (`collector-01.example.gov.au`).

## Fleet and collector alerts

### Collector offline (`offline`)

- **What it means:** The collector has stopped sending heartbeats to the management API.
- **How to check:** Run `systemctl status bower` (Linux) or `Get-Service BowerCollector`
(Windows) on the host, and run `bower doctor` to test outbound HTTPS connectivity to the
management endpoint.
- **How to fix:** Start the service, verify proxy/firewall rules allow outbound port 443 to
the management API, and check disk space on `/var/lib/bower`.
- **Safe to mute?** Only during planned host maintenance (set an expiry matching the
maintenance window).

### Collector history changed (`history-changed`)

- **What it means:** The collector's queue ledger hash chain reported tampering, truncation,
or an unexpected reset.
- **How to check:** Inspect `/v1/status` (`ledger` and `recovery` blocks) and run
`bower queue verify --queue /var/lib/bower/queue.db`.
- **How to fix:** Treat as a security incident until explained. Preserve a backup copy of
the queue database (`bower queue backup`) before re-initialising.
- **Safe to mute?** No — investigate immediately.

### Collector not sending (`not-sending`)

- **What it means:** Events are queued locally, but no batch has been acknowledged by the
destination recently.
- **How to check:** Run `bower doctor` against the DCE/DCR endpoint and inspect `/v1/status`
(`deliveryActivity.lastFailureCode`).
- **How to fix:** Verify managed identity / workload identity RBAC (`Monitoring Metrics
Publisher` on the DCR), check network egress and TLS trust, and verify the DCR stream name
matches `Custom-BowerSecurity`.

### Collector stale (`stale`)

- **What it means:** The collector's last heartbeat is older than the staleness threshold,
though not yet marked fully offline.
- **How to check:** Check host CPU/disk load and outbound management proxy latency.
- **How to fix:** Resolve host congestion or proxy timeouts; check `management-heartbeat`
status in `/v1/status`.

### Queue full or storage pressure (`queue-full`, EventId `1500` / `1501`)

- **What it means:** The queue database or its underlying volume (or AMA spool / archive
volume) has crossed the warning or critical free-space watermark.
- **How to check:** Check `df -h /var/lib/bower` (Linux) or volume free space on Windows,
and inspect `/v1/status` (`storage` and `volumes`).
- **How to fix:** Restore destination delivery so the backlog drains, expand the volume, or
increase `BOWER_QUEUE_MAX_BYTES` only when volume headroom allows. See
[storage pressure](../production-readiness/03-storage-pressure.md).

### Delivery trouble (`send-trouble`, EventId `1008`)

- **What it means:** Repeated transient or permanent HTTP errors occurred when delivering to
Azure Logs Ingestion, S3, or an HTTP sink.
- **How to check:** Inspect `deliveryActivity.lastFailureCode` and collector logs for the
metadata-only failure code (`azure-http-403`, `azure-http-429`, `azure-http-400-isolated`).
- **How to fix:** Fix DCR permissions for `403`, allow adaptive backoff to absorb `429`, or
inspect dead-letter counts for `400`.

### Events set aside in dead-letter queue (`set-aside`)

- **What it means:** One or more events could not be delivered after retries or failed a
permanent validation check and were moved to the dead-letter queue.
- **How to check:** Run `bower queue dead-letter --queue /var/lib/bower/queue.db` (metadata
only — never raw payloads).
- **How to fix:** Fix the underlying schema or destination issue, then replay with
`bower queue replay`.

### Delivery backlog (`backlog`)

- **What it means:** Queued events waiting for delivery exceed the expected steady-state
backlog.
- **How to check:** Compare `/v1/status` queued depth against `delivery.concurrency`.
- **How to fix:** Verify destination reachability and check for throttling (`429`).

### Quiet source (`quiet-source`)

- **What it means:** An application or WEC subscription listed in `BOWER_SOURCE_EXPECTATIONS`
has emitted no accepted events within its expected silence window.
- **How to check:** Verify the upstream producer or WEC forwarder is running (`bower doctor
--wec-channel ForwardedEvents` on Windows) and confirm events are not being quarantined by
a policy change (`bower top`).
- **How to fix:** Restart the upstream forwarder or fix producer credentials/TLS.

### Policy or privacy profile not applied (`policy-not-applied`, `privacy-not-applied`, EventId `1702`)

- **What it means:** The collector's active policy hash or privacy profile hash does not match
the approved desired hash, or a hot reload failed validation (`EventId 1702`).
- **How to check:** Inspect `/v1/status` (`reload.errorType` and active hashes) and run
`bower validate` on the policy directory.
- **How to fix:** Correct the invalid YAML/signature, verify trusted signing keys, and
trigger a reload (`POST /v1/reload` or `SIGHUP`).

### Pending approval (`pending`) or suspended collector (`suspended`)

- **What it means:** A newly enrolled collector is waiting for an Approver decision, or an
Approver has suspended the collector.
- **How to check:** Open **Approvals** (`/approvals`) or **Fleet** (`/collectors`).
- **How to fix:** Have a second person with `Bower.Approver` review and approve or
re-activate the collector.

### Background job failed (`job-failed`, EventId `1600`)

- **What it means:** A scheduled maintenance or health job (such as retention, heartbeat, or
alert notifications) threw an error.
- **How to check:** Open **Jobs** (`/jobs`) or inspect collector EventId `1600` metadata.
- **How to fix:** Resolve the failing dependency (disk permissions, management connectivity,
or webhook/SMTP endpoint).

### Redaction failure (`EventId 1302`) and configuration error (`EventId 2101`)

- **What it means:** `1302` indicates the Privacy & Secret Protection Engine rejected or
quarantined an event before persistence (fail-closed). `2101` indicates invalid startup or
source configuration.
- **How to check:** Run `bower privacy test` on synthetic fixtures or `bower doctor` to
validate local files.
- **How to fix:** Fix the invalid privacy rule or source configuration and reload.

### Sentinel proof missing or expired (`sentinel-proof`)

- **What it means:** No recent destination-verified evidence bundle confirms rows landed in
`BowerSecurity_CL` in Microsoft Sentinel.
- **How to check:** Run `bower evidence run` with read access to the Log Analytics workspace.
- **How to fix:** Verify end-to-end delivery and upload the signed evidence bundle in the
console. Remember that simulated evidence never counts as production proof.
Loading
Loading