From dffbeee3be225a2ac04787e883a1c25f26ac775f Mon Sep 17 00:00:00 2001 From: "Donald F. Coffin" Date: Sat, 6 Jun 2026 20:36:30 -0400 Subject: [PATCH] fix(#171): re-enable CustodianHomeController so post-login /custodian/home doesn't 401 The custodian login flow (C2a) redirects to /custodian/home on success (CustomerLoginSecurityConfiguration DEFAULT_SUCCESS_URL), but CustodianHomeController had its @Controller annotation commented out ("UI not needed in resource server"). So /custodian/home had no handler -> 404 -> re-dispatched to /error -> evaluated by the resource-server filter chain as anonymous -> 401. Re-enable @Controller; the view template templates/custodian/home.html exists. Surfaced during local sandbox bring-up (admin/admin login -> 401). Co-Authored-By: Claude Opus 4.8 --- .../web/custodian/CustodianHomeController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openespi-datacustodian/src/main/java/org/greenbuttonalliance/espi/datacustodian/web/custodian/CustodianHomeController.java b/openespi-datacustodian/src/main/java/org/greenbuttonalliance/espi/datacustodian/web/custodian/CustodianHomeController.java index afa8ce4c..4ba8e8de 100644 --- a/openespi-datacustodian/src/main/java/org/greenbuttonalliance/espi/datacustodian/web/custodian/CustodianHomeController.java +++ b/openespi-datacustodian/src/main/java/org/greenbuttonalliance/espi/datacustodian/web/custodian/CustodianHomeController.java @@ -23,8 +23,11 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -// @Controller - COMMENTED OUT: UI not needed in resource server -// @Component +// The custodian login flow (C2a) redirects to /custodian/home on success +// (CustomerLoginSecurityConfiguration DEFAULT_SUCCESS_URL), so this landing controller must be +// enabled — otherwise the post-login redirect 404s and is re-dispatched to /error, which the +// resource-server chain returns as 401. Template: templates/custodian/home.html. +@Controller @RequestMapping("/custodian/home") public class CustodianHomeController {