Skip to content

feat(#177): admin compose & send ESPI BatchList notification (DC sender + TP receiver)#178

Merged
dfcoffin merged 1 commit into
mainfrom
feature/177-admin-batchlist-notify
Jun 8, 2026
Merged

feat(#177): admin compose & send ESPI BatchList notification (DC sender + TP receiver)#178
dfcoffin merged 1 commit into
mainfrom
feature/177-admin-batchlist-notify

Conversation

@dfcoffin

@dfcoffin dfcoffin commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Admin page on the Data Custodian to compose and send an ESPI BatchList notification to a Third Party, plus the Third Party receiver that processes it. Closes #177. Built on the #158 notification contract.

The TP boot/bring-up fixes (dead ResourceRepository chain, RestClient.Builder, Jackson 3 property, ddl-auto) are split into #179 (#146). This PR is the notification feature; the live DC→TP round-trip is validated with both applied (the merged main state).

Data Custodian (sender)

  • NotificationService.notifyBatchList(uri, resourceUris) — synchronous send (marshal BatchListDto via BatchListXmlCodec, POST application/atom+xml); validates URI + ≥1 resource; surfaces failures.
  • BatchNotificationController GET/POST /custodian/notifications — TP notify URL (suggested from registered ApplicationInformation endpoints) + the four resource URLs (ApplicationInformation, Authorization feed, Authorization entry, Subscription); flash result; ROLE_CUSTODIAN; dashboard card + nav item.

Third Party (receiver) — ESPI flow

Verification

🤖 Generated with Claude Code

@dfcoffin dfcoffin changed the title feat(#177): admin compose & send ESPI BatchList notification feat(#177): DC→TP BatchList notification round-trip (admin send + TP receiver + TP boot) Jun 8, 2026
…er + TP receiver)

Data Custodian (sender):
- NotificationService.notifyBatchList(uri, resourceUris): synchronous send — marshal
  BatchListDto via BatchListXmlCodec, POST application/atom+xml; validates the URI and
  >=1 resource (blanks dropped); surfaces failures to the caller.
- BatchNotificationController (/custodian/notifications GET + /send POST): admin enters
  the Third Party notify URL (suggested from registered ApplicationInformation endpoints)
  and the BatchList resource URLs (ApplicationInformation, Authorization feed, Authorization
  entry, Subscription); flash success/failure. ROLE_CUSTODIAN. Dashboard card + nav item.

Third Party (receiver), corrected to the ESPI flow:
- For each <resource> URL the TP, as an OAuth client, performs an authenticated GET on the
  URL to obtain the data, then hands it to import (per-resource failures logged, don't abort
  the batch). Per-resource token selection = #146; unmarshal/persist of the payload = #89.
- Inbound POST /espi/1_1/Notification is permitAll: the DC delivers without an OAuth token
  (transport-secured by TLS); the token is used only on the outbound fetch.
- Removed the legacy sftp:// branch + Runtime.exec (ESPI no longer permits SFTP; injection
  risk). Unparseable payload -> 400.

Verified live (with the #146/#179 TP bring-up applied): DC admin notify page -> DC POSTs
BatchList -> TP receives, persists the BatchList, attempts an authenticated GET per resource
(DC returns 401 until a token is wired) -> "Successfully processed notification with 4
resources". Tests: common 4/0, datacustodian 160/0, thirdparty 47/0.

(TP boot bring-up split into #146/#179.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfcoffin dfcoffin force-pushed the feature/177-admin-batchlist-notify branch from 466d260 to 9add3a2 Compare June 8, 2026 20:39
@dfcoffin dfcoffin changed the title feat(#177): DC→TP BatchList notification round-trip (admin send + TP receiver + TP boot) feat(#177): admin compose & send ESPI BatchList notification (DC sender + TP receiver) Jun 8, 2026
@dfcoffin dfcoffin merged commit 68a1251 into main Jun 8, 2026
4 checks passed
@dfcoffin dfcoffin deleted the feature/177-admin-batchlist-notify branch June 8, 2026 23:31
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.

Admin: compose & send an ESPI BatchList notification (ApplicationInformation / Authorization feed+entry / Subscription)

1 participant