refactor(services): consume dunite-hibp + dunite-webhook, drop bunyip copies #494

Merged
nrupard merged 1 commit from feat/DEV-527-consume-hibp-webhook into main 2026-08-06 17:28:26 +02:00
Owner

What

Consumes the dunite-webhook + dunite-hibp leaf crates (dunite #37, DEV-527) and removes bunyip's copies.

  • password_breach.rs -> a re-export shim over dunite_hibp (check_password_breach / is_breached / BreachCheckOutcome). The three is_breached call sites in services/auth.rs are unchanged.
  • webhook.rs -> WebhookService keeps its bunyip surface (new / notify_maintenance_change / notify_active_change / notify_account_deleted / dispatch_account_deleted), building each payload from an Application, but delegates signing + delivery to dunite_webhook::WebhookSender. The local sign/send/dispatch impl (and the three sign unit tests, now in dunite) are removed; the Application-payload, retry-exhaust, and no-url tests stay.

Pins

Adds dunite-hibp + dunite-webhook at 82f9baa as leaf deps (they own their types, no dunite-core dep), so they pin independently and do NOT move the dunite-core graph rev. reqwest 0.11 unifies with the copy bunyip already pulls via dunite-oci / dunite-download.

Behaviour

Identical wire shape: event payloads, the X-Webhook-Signature HMAC, the 3-attempt exponential backoff, and the no-url no-op. One log change: on a transport failure the shared sender logs the destination URL rather than the app slug.

Validation

just check-container green: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace --all-targets.

#DEV-527

## What Consumes the `dunite-webhook` + `dunite-hibp` leaf crates (dunite #37, DEV-527) and removes bunyip's copies. - `password_breach.rs` -> a re-export shim over `dunite_hibp` (`check_password_breach` / `is_breached` / `BreachCheckOutcome`). The three `is_breached` call sites in `services/auth.rs` are unchanged. - `webhook.rs` -> `WebhookService` keeps its bunyip surface (`new` / `notify_maintenance_change` / `notify_active_change` / `notify_account_deleted` / `dispatch_account_deleted`), building each payload from an `Application`, but delegates signing + delivery to `dunite_webhook::WebhookSender`. The local sign/send/dispatch impl (and the three `sign` unit tests, now in dunite) are removed; the Application-payload, retry-exhaust, and no-url tests stay. ## Pins Adds `dunite-hibp` + `dunite-webhook` at `82f9baa` as leaf deps (they own their types, no dunite-core dep), so they pin independently and do NOT move the dunite-core graph rev. `reqwest` 0.11 unifies with the copy bunyip already pulls via `dunite-oci` / `dunite-download`. ## Behaviour Identical wire shape: event payloads, the `X-Webhook-Signature` HMAC, the 3-attempt exponential backoff, and the no-url no-op. One log change: on a transport failure the shared sender logs the destination URL rather than the app slug. ## Validation `just check-container` green: `cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace --all-targets`. #DEV-527
refactor(services): consume dunite-hibp + dunite-webhook, drop bunyip copies
All checks were successful
E2E / PR gate (pull_request) Successful in 42s
Check / fmt + clippy + build + tests (pull_request) Successful in 27m16s
Create release / Create release from merged PR (pull_request) Has been skipped
8024c7c9ac
The HIBP password-breach check and the outbound webhook sender moved to the dunite-hibp / dunite-webhook leaf crates (dunite #37, DEV-527).

password_breach.rs is now a re-export shim over dunite_hibp; the three is_breached call sites in services/auth.rs are unchanged. webhook.rs keeps WebhookService and its Application-payload surface (notify_* + dispatch_account_deleted) but delegates signing and delivery to dunite_webhook::WebhookSender; the local sign/send/dispatch impl and the three sign unit tests (now in dunite) are removed.

dunite-hibp + dunite-webhook are added as leaf deps at 82f9baa; they own their types (no dunite-core dep) so they pin independently and do not move the dunite-core graph rev. Wire shape is unchanged (payloads, X-Webhook-Signature HMAC, 3-attempt backoff, no-url noop); the only change is that a transport-failure log now names the destination URL rather than the app slug.

#DEV-527
nrupard scheduled this pull request to auto merge when all checks succeed 2026-08-06 17:07:14 +02:00
nrupard scheduled this pull request to auto merge when all checks succeed 2026-08-06 17:08:33 +02:00
nrupard deleted branch feat/DEV-527-consume-hibp-webhook 2026-08-06 17:28:27 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!494
No description provided.