Keycloak token validation failing — basketball-api returns 401 #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Discovered during validation of PR #24 (generic api_get). Pre-existing — not caused by the PR.
Repo
forgejo_admin/westside-ai-assistantWhat Broke
Nemo's Keycloak service account token is rejected by basketball-api with
{"detail":"Token validation failed"}. Theapi_gettool correctly calls basketball-api but gets 401 Unauthorized. This means ALL read tools (both old and new) are broken — not just the generic api_get.Repro Steps
Expected Behavior
Keycloak client credentials flow should return a valid token that basketball-api accepts.
Environment
5211f23Acceptance Criteria
Related
project-westside-basketballFixed. Root cause: Nemo's
KEYCLOAK_REALM_URLpointed to internal URL (http://keycloak.keycloak.svc.cluster.local/realms/westside-basketball). Tokens from internal URL have a different issuer than what basketball-api validates against (external URL). Changed env var tohttps://keycloak.tail5b443a.ts.net/realms/westside-basketball. Validated end-to-end: api_get("/admin/dashboard") returns 200 OK.