Skip to content

feat: go-processor should support multiple JWKS URLs for inbound validation #147

Closed
rossoctl/rossoctl
#764

Description

@mrsabath

Problem

The Kagenti UI authenticates users via Keycloak's master realm, but AuthBridge's go-processor validates inbound JWTs against a single JWKS URL configured via the JWKS_URI environment variable (typically pointing to the demo realm). When a user chats with an agent from the UI's Agent panel, the go-processor rejects the request with 401 Unauthorized ("key not found in key set") because the master-realm token's signing key is not in the demo-realm JWKS.

As a result, UI-based agent chat does not work when AuthBridge is enabled. Users must fall back to CLI-based testing with a demo-realm token.

Current Behavior

  • go-processor reads a single JWKS_URI from the environment and caches its key set.
  • Inbound JWT validation checks the token signature against only that one key set.
  • Tokens issued by a different realm (e.g., master) fail validation even if they are otherwise valid.

Expected Behavior

The go-processor should accept tokens from multiple trusted issuers/JWKS endpoints. For example:

  • Support a comma-separated list of JWKS URLs: JWKS_URI=url1,url2
  • Or support a separate ADDITIONAL_JWKS_URIS env var
  • Each issuer's keys should be cached and refreshed independently
  • Inbound validation should try all configured key sets when verifying a token signature

Alternative Fix (UI side)

Instead of (or in addition to) multi-JWKS support in the go-processor, the Kagenti UI could be updated to obtain a demo-realm token (via token exchange or direct auth) when communicating with AuthBridge-protected agents. This would be tracked in the kagenti/kagenti repo.

Impact

  • Blocks UI-based agent chat for all AuthBridge-enabled agents
  • Documented as a known limitation in AuthBridge/demos/github-issue/demo-ui.md (Step 8)

Related

  • AuthBridge/AuthProxy/go-processor/main.go — loadConfig() and validateInboundToken()
  • PR #133 — added BYPASS_INBOUND_PATHS (.well-known/* bypass works, but chat endpoint / does not)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions