Skip to content

feat(console): add signed pack gallery and four-eyes group install (#102) - #309

Merged
jusso-dev merged 1 commit into
mainfrom
feat/console-pack-gallery
Nov 21, 2026
Merged

jusso-dev merged 1 commit into
mainfrom
feat/console-pack-gallery

Conversation

@jusso-dev

Copy link
Copy Markdown
Owner

Summary

Closes #102.

Adds a signed pack gallery to the Management API and console with under-five-click group installation routed through the four-eyes Approvals workflow:

  • Server-side verified pack gallery (PackGalleryService.cs, PackGalleryModels.cs, PackGalleryEndpoints.cs):
    • Reads .bowerpack archives from the server-configured BOWER_PACK_GALLERY_DIR and verifies every manifest signature and file digest via PackArchive.Load against BOWER_PACK_TRUSTED_KEYS before listing, before submitting an install request, and again on approval.
    • Exposes metadata only (description, owner, version, signed key ID, event types, plain-language redaction summary, and post-redaction sample pass/fail results — never raw sample inputs or host paths).
    • Surfaces untrusted, unsigned, or tampered archives with an explicit plain refusal reason and blocks them from installation (HTTP 400).
  • Four-eyes pack installation requests (ManagementStore.PackInstalls.cs):
    • GET /api/packs (View), GET /api/packs/install-requests (View), POST /api/packs/install-requests (Operate), POST /api/packs/install-requests/{id}/approve|reject (Approve).
    • Computes a population diff snapshot (affected collectors, current vs target policy hashes, event types added).
    • Enforces four-eyes (409 if requester attempts to approve/reject their own request) and atomically updates desired_policy_hash on all approved/active collectors in the target group while writing approval and audit rows (pack.install-requested, pack.install-approved/rejected, collector.desired-policy-updated).
  • Console UI (PacksPage.tsx, PackInstallApprovals.tsx, ApprovalsPage.tsx, App.tsx, PacksPage.test.tsx):
    • Adds /packs route showing verified packs, untrusted pack refusal cards, and an under-5-click "Install to group" flow with inline population diff preview.
    • Adds pending pack install cards with population diff and four-eyes guards to Approvals.
  • Security & Docs: Updates docs/security/threat-model.md with the pack gallery trust boundary.

Verification

  • dotnet build --configuration Release — 0 warnings, 0 errors
  • dotnet test (PackGalleryApiTests, ManagementApiTests) — 14 passed, 0 failed
  • dotnet format --verify-no-changes — passed
  • cd ui/Bower.Management.Web && npm run lint && npm test && npm run build — 17/17 test files (109/109 tests) passed, production bundle built cleanly
  • python3 -m unittest tools/docs/tests/test_build_tools.py — 7/7 passed

Security and compatibility impact

  • All new API endpoints, SQLite tables, and UI routes are strictly additive and Native AOT source-generated (ManagementJsonContext).
  • Zero new NuGet packages (Bower.Management.Api adds a project reference to Bower.Packs).
  • Server verifies signatures fail-closed before listing and again on approval; every collector independently verifies pack signatures on load.

@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 43 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: e9d9f51d-4d29-49c1-9ff8-ce6c72a86a4a
Commits

Reviewing files that changed from the base of the PR and between f4e632e and c6dad97.

Files selected for processing: 18

  • docs/security/threat-model.md
  • src/Bower.Management.Api/Bower.Management.Api.csproj
  • src/Bower.Management.Api/ManagementApplication.cs
  • src/Bower.Management.Api/ManagementJson.cs
  • src/Bower.Management.Api/ManagementStore.PackInstalls.cs
  • src/Bower.Management.Api/ManagementStore.cs
  • src/Bower.Management.Api/PackGalleryEndpoints.cs
  • src/Bower.Management.Api/PackGalleryModels.cs
  • src/Bower.Management.Api/PackGalleryService.cs
  • src/Bower.Management.Api/packages.lock.json
  • tests/Bower.UnitTests/PackGalleryApiTests.cs
  • tests/Bower.UnitTests/packages.lock.json
  • ui/Bower.Management.Web/src/App.tsx
  • ui/Bower.Management.Web/src/pages/ApprovalsPage.tsx
  • ui/Bower.Management.Web/src/pages/PackInstallApprovals.tsx
  • ui/Bower.Management.Web/src/pages/PacksPage.test.tsx
  • ui/Bower.Management.Web/src/pages/PacksPage.tsx
  • ui/Bower.Management.Web/src/types.ts
  • 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 force-pushed the feat/console-pack-gallery branch from 98afcfb to c6dad97 Compare November 21, 2026 22:52
@jusso-dev
jusso-dev merged commit 995043d into main Nov 21, 2026
25 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: pack gallery with one-click install of signed packs

1 participant