Skip to content

fix: local sandbox bring-up — DC↔AS introspection alignment + TP atomMarshaller (#146)#170

Merged
dfcoffin merged 1 commit into
mainfrom
fix/sandbox-bringup-introspection-tp-atommarshaller
Jun 7, 2026
Merged

fix: local sandbox bring-up — DC↔AS introspection alignment + TP atomMarshaller (#146)#170
dfcoffin merged 1 commit into
mainfrom
fix/sandbox-bringup-introspection-tp-atommarshaller

Conversation

@dfcoffin

@dfcoffin dfcoffin commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Surfaced by manually launching all three servers (AS + DC + TP) against a local MySQL (the "test all three servers" exercise). Two dev-bring-up blockers fixed; findings recorded.

1. DC↔AS opaque-token introspection (dev was broken)

DC defaulted to introspect at http://localhost:8080 with client datacustodian/datacustodian-secret — but the AS runs on :9999 and had no datacustodian client seeded → Connection refused → every token 401'd at the DC.

  • AS: seed a dedicated datacustodian/{noop}datacustodian-secret introspection client (client_secret_basic) — a confidential client any of whose role is just to let the DC resource-server introspect; matches DC's default introspection client-id/secret so the sandbox works out of the box. Seeded-client assertion in MySqlTestcontainersIntegrationTest bumped 5→6.
  • DC application-dev-mysql.yml: point issuer-uri + introspection-endpoint at the local AS :9999.
  • Verified end-to-end: client_credentials token mint → /oauth2/introspect (active:true) → DC authorizes the request (reaches the controller). The subsequent 500 is a separate pre-existing bug — collection controllers marshal a raw List instead of an Atom <feed> — which the Remediation: ESPI REST controller modernization (post-#116) #119 E-phase entry/feed assembly fixes.

2. TP #146 — missing atomMarshaller bean

ResourceRESTRepositoryImpl requires a Jaxb2Marshaller @Qualifier("atomMarshaller") that didn't exist → TP APPLICATION FAILED TO START. Added JaxbMarshallingConfiguration defining it (scanning the shared common.domain/common.dto packages, same context the DC marshaller uses). TP now advances past this bean.

Full TP boot remains blocked on the deeper #146 chain — the next gap is the custom ResourceRepository interface, which has no implementation anywhere (the resource-fetch layer was never built). That's substantive TP work ("TP last") and out of scope here; documented on #146.

Bring-up status after this PR

No production behavior change (DC change is dev-profile only; AS adds one seeded client; TP adds a bean). TP has no @SpringBootTest context test (its integration test's @SpringBootTest is commented out), so the new bean has no test impact.

🤖 Generated with Claude Code

…Marshaller bean

Surfaced by manually launching all three servers (AS+DC+TP) against a local MySQL.

1. DC↔AS opaque-token introspection (dev): DC defaulted to introspect at :8080 with a
   `datacustodian` client that wasn't seeded on the AS → Connection refused → every customer/
   admin token 401'd at the DC.
   - AS: seed a dedicated `datacustodian`/`{noop}datacustodian-secret` introspection client
     (client_secret_basic) — matches DC's default introspection client-id/secret so the sandbox
     introspects out of the box. (Bumped MySqlTestcontainersIntegrationTest seeded-client count
     5 -> 6.)
   - DC application-dev-mysql.yml: point issuer-uri + introspection-endpoint at the local AS :9999.
   Verified end-to-end: token mint -> introspection -> DC authorizes (request reaches the
   controller; the subsequent 500 is the separate raw-List marshalling bug the #119 E-phase fixes).

2. TP #146: define the missing `atomMarshaller` Jaxb2Marshaller bean
   (JaxbMarshallingConfiguration, scanning the common DTO/Atom packages) so the TP resource-fetch
   layer wires. TP advances past this bean; full TP boot remains blocked on the deeper #146 chain
   (the custom `ResourceRepository` interface has no implementation) — out of scope here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit 8fffcff into main Jun 7, 2026
4 checks passed
@dfcoffin dfcoffin deleted the fix/sandbox-bringup-introspection-tp-atommarshaller branch June 7, 2026 00:35
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.

1 participant