Skip to content

feat(console): add journald and Kubernetes guided source setup plus live redacted tap preview (#99) - #315

Merged
jusso-dev merged 1 commit into
mainfrom
feat/guided-source-setup-journald-k8s-tap
Nov 21, 2026
Merged

jusso-dev merged 1 commit into
mainfrom
feat/guided-source-setup-journald-k8s-tap

Conversation

@jusso-dev

Copy link
Copy Markdown
Owner

Summary

Closes #99.

Completes guided source setup coverage for every supported source type in the repository and adds an Operator-only first live redacted event preview backed by the audited pipeline tap endpoint:

  • Linux systemd journald guided source (src/Bower.Management.Api/SourceSetupJournald.cs):
    • Enforces explicit allow-listed systemd units and/or SYSLOG_IDENTIFIER entries (refusing wildcards and empty/oversized lists > 64 entries) and bounded maxBatchSize (1..500).
    • Generates journald.json (/etc/bower/journald.json), source-expectations.json, environment variables, and a least-privilege systemd drop-in (SupplementaryGroups=systemd-journal).
    • Produces a server-side redacted synthetic sample event.
  • Kubernetes container logs guided source (src/Bower.Management.Api/SourceSetupKubernetes.cs):
    • Enforces explicit allow-listed DNS-1123 namespaces (1..32) and exact key=value labelSelectors (1..16) — no wildcards, no cluster-wide defaults, no pod annotations.
    • Generates kubernetes.json (/etc/bower/kubernetes.json), source-expectations.json, DaemonSet environment variables, and a namespaced Role snippet (get/list pods only — never ClusterRole).
    • Produces a server-side redacted synthetic sample event (verifying bearer token redaction).
  • Live first redacted event preview (ui/Bower.Management.Web/src/pages/SourcesPage.tsx):
    • On approved source setup requests, Operators+ can click "Preview first live redacted event" on the Check step to call the audited POST /api/pipelines/collectors/{collectorId}/tap endpoint and inspect the first post-redaction event (or the exact CLI tap command when no live tap endpoint is configured). Viewers remain read-only.
  • Tests (tests/Bower.UnitTests/SourceSetupApiTests.cs, ui/Bower.Management.Web/src/pages/SourcesPage.test.tsx):
    • Updates Types_DescribeEverySupportedSourceForOneGenericForm for all 11 supported source types (syslog, windows-eventlog, file, sql-server, journald, kubernetes, docker, aws, gcp, ama, http-sdk).
    • Adds server-side tests verifying allow-list/wildcard refusal, namespaced RBAC generation, and redaction on both journald and kubernetes.
    • Adds Vitest coverage for the Operator live redacted event preview.

(Note: Kafka guided setup remains pending the maintainer architectural decision on #93.)

Verification

  • dotnet build --configuration Release — 0 warnings, 0 errors
  • dotnet test (SourceSetupApiTests) — 35 passed, 0 failed
  • dotnet format --verify-no-changes — passed
  • cd ui/Bower.Management.Web && npm run lint && npm test && npm run build — 19/19 test files (113/113 tests) passed, production bundle built cleanly

Security and compatibility impact

  • Strictly additive guided source types and UI tap trigger; zero new NuGet packages.
  • All generated configs remain signed-approval gated and metadata/redaction-only; live tap requests require Bower.Operator+ and are audited (pipeline.tapped) with post-redaction payloads only.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9574278e-6ddb-4b72-90d2-cde5c672fa0f
Commits

Reviewing files that changed from the base of the PR and between a0b3fc1 and 9d0e9ca.

Files selected for processing: 6

  • src/Bower.Management.Api/SourceSetupJournald.cs
  • src/Bower.Management.Api/SourceSetupKubernetes.cs
  • src/Bower.Management.Api/SourceSetupRegistry.cs
  • tests/Bower.UnitTests/SourceSetupApiTests.cs
  • ui/Bower.Management.Web/src/pages/SourcesPage.test.tsx
  • ui/Bower.Management.Web/src/pages/SourcesPage.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@jusso-dev
jusso-dev merged commit 12203d4 into main Nov 21, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console: guided source setup per source type

1 participant