You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(gateway): add custom claims validation and TUI wizard for JWT auth (#599)
* feat(gateway): add custom claims validation and TUI wizard for JWT auth
Add custom JWT claims validation support and a full TUI wizard flow
for configuring Custom JWT gateway authorization.
Schema:
- Add ClaimMatchOperator, ClaimMatchValue, InboundTokenClaimValueType,
and CustomClaimValidation schemas with strict validation
- Add customClaims to CustomJwtAuthorizerConfigSchema and deployed-state
- Add --custom-claims CLI flag with JSON parsing and validation
TUI Wizard:
- Expand JWT config flow with custom claims manager (add/edit/done)
- Add claim name, operator, value, and value type sub-steps
- Show human-readable claim summary in confirm review
- Make client credentials optional (skip with empty Enter)
Testing:
- Add AddGatewayJwtConfig.test.tsx — full TUI component tests
- Add finishJwtConfig.test.ts — unit tests for config assembly
- Extend useAddGatewayWizard.test.tsx with JWT + custom claims flows
- Add GatewayPrimitive.test.ts for custom claims round-trip
- Extend validate.test.ts with custom claims validation cases
- Add TUI integration test (add-gateway-jwt.test.ts)
Constraint: Stacked on fix/inbound-auth-hardening (#598)
Confidence: high
Scope-risk: moderate
* fix(gateway): improve custom claim form navigation UX
Enter now advances to the next field instead of immediately submitting,
and up/down arrow keys navigate between fields for a more intuitive form
experience.
* fix(gateway): position cursor before placeholder in custom claim form
When a text field is empty, the cursor now appears before the placeholder
hint instead of after it, matching expected input behavior.
* test(gateway): update claim form test for Enter-advances-fields behavior
The test expected Enter to immediately submit and show a validation error,
but Enter now advances to the next field. Updated the test to press Enter
through all fields before expecting the submission validation error.
* fix: restore CLIENT_ID env var and move inline import to top-level
Restore writing both CLIENT_ID and CLIENT_SECRET to .env in
createManagedOAuthCredential, matching main branch behavior.
Move dynamic import of policyEnginePrimitive to a static top-level
import per AGENTS.md conventions.
* style: run prettier and fix test prop
Run prettier on 3 files and add missing existingPolicyEngines
prop to AddGatewayJwtConfig test defaults.
* ci: retrigger checks
0 commit comments