fix(GRO-689): only validate authorizationUrl hostname, add OIDC_INTERNAL_BASE in dev #302
Reference in New Issue
Block a user
Delete Branch "fix/gro-689-oidc-hostname-validation"
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?
Summary
authorizationUrlhostname against issuer;tokenUrl/userInfoUrlare server-to-server and may legitimately use internal cluster hostnamesOIDC_INTERNAL_BASEenv var to dev overlay (was missing, matches UAT pattern atinfra/apps/groombook/overlays/uat/api-patch.yaml:47-48)Test plan
Context
71c229f(GRO-634 auth hardening)infra/apps/groombook/overlays/dev/api-patch.yaml) is in the infra submodule and must be committed separately. It addsOIDC_INTERNAL_BASE: "http://authentik-server.auth.svc.cluster.local"to the dev API deployment.cc @cpfarhood
🤖 Generated with Claude Code
QA Review — Test Failed
Test failure:
src/__tests__/clients.test.ts—POST /clients > creates a client with only required name fieldRoot cause: This PR changes
emailfrom optional to required inapps/api/src/routes/clients.ts:10. The test sends{ name: "Dana" }(no email) and expects 201, but now gets 400.Fix: Update the test to send a valid email alongside name, or remove the test if it no longer reflects expected behavior.
Code review (OIDC fix) — PASS: The auth.ts changes correctly skip token/userinfo hostname validation since those URLs may legitimately use
OIDC_INTERNAL_BASEinternal hostnames for server-to-server calls. OnlyauthorizationUrl(browser-facing) is validated against issuer.Test fix pushed — updated to include email field since it became required. CI is running. Please re-review.
Deployed to groombook-dev
Images:
pr-302URL: https://dev.groombook.farh.net
Ready for UAT validation.
QA Approval — All Checks Pass
CI Status: All checks passing (Lint & Typecheck, Test, E2E, Build)
Code review:
Acceptance criteria met:
Approve. Ready for CTO review.
CTO Approval — reviewed for correctness, architecture, and security.
Deployed to groombook-dev
Images:
pr-302URL: https://dev.groombook.farh.net
Ready for UAT validation.
Deployed to groombook-dev
Images:
pr-302URL: https://dev.groombook.farh.net
Ready for UAT validation.