Skip to content

epic: AuthBridge UI Configuration — close all gaps between webhook capabilities and import UI #1168

Closed
4 of 4 issues completed

Description

@mrsabath

Problem

Summary

The Kagenti UI's Agent and Tool import flows expose only two AuthBridge controls: a global enable/disable toggle and a SPIRE on/off toggle. Meanwhile, recent changes to kagenti-extensions have significantly expanded the AuthBridge configuration surface:

  • Combined sidecar mode (kagenti-extensions#254) — merges 3 sidecars into 1
  • Operator-managed Keycloak client credentials (kagenti-extensions#262) — client-registration sidecar is now opt-in, not injected by default
  • Per-sidecar injection controls — supported by the webhook but invisible in the UI
  • Outbound token-exchange routing — authproxy-routes ConfigMap must be hand-edited

Users who need anything beyond all-or-nothing sidecar injection must hand-edit Kubernetes manifests, which defeats the purpose of having a UI-driven import flow.

Additionally, there is a functional bug where enabling AuthBridge on tools doesn't actually inject sidecars (#1143), and the UI description of what gets injected is now inaccurate (#1167 Gap 1).

Motivation

Scope

This epic coordinates 6 existing issues into a sequenced plan that addresses all UI gaps for AuthBridge configuration. It does NOT include the AgentRuntime CR (#862), which is a longer-term architectural change that may eventually reshape the label-based model.

Design decision

After internal discussion, the default behavior was set as follows:

Workload AuthBridge default Checkbox Per-sidecar controls
Agent ON (checked) Visible Visible when AuthBridge ON
Tool OFF (unchecked) Visible (user can opt-in) Visible when AuthBridge ON

Progress tracker

All phases complete.

Phase 1: Fix what's broken

Phase 2: Core sidecar controls

Phase 3: UI consistency

Phase 4: Outbound routing

Phase 5: Advanced configuration


PR summary and merge order

Phase PR Status Description
1 #1169 Merged Fix AuthBridge sidecar injection for tools + description fix
2 #1174 Merged Per-sidecar injection controls (full stack: React + FastAPI + TUI)
3 #1175 Merged UI consistency — labels, section titles, defaults
4 #1176 Merged Outbound routing rules UI for authproxy-routes ConfigMap
5 #1177 Merged Advanced config — port exclusions, outbound policy

Merge order: #1174 → #1175 → #1176 → #1177 (each builds on the previous)


Sub-issues and sequencing

Phase 1: Fix what's broken

Priority: Immediate — DONE

1a. #1143 — AuthBridge not present on tool

Root cause found: Two issues — injectTools feature gate defaulted to false in Helm, and the tools backend was missing calls to _ensure_authbridge_configmaps().

Fix: PR #1169 (merged) — added _ensure_authbridge_configmaps calls to the tool create and finalize flows.

1b. #1167 Gap 1 — Fix AuthBridge checkbox description

Fix: Included in PR #1169 (merged) — updated description text on both Import Agent and Import Tool pages.


Phase 2: Core sidecar controls

Priority: High — DONE

2. #836 (updated) + #1167 Gap 2 — Per-sidecar injection toggles

Wires envoyProxyInject, spiffeHelperInject, clientRegistrationInject through the full stack:

Layer Files Changes
Backend constants.py, agents.py, tools.py Per-sidecar label constants, request model fields, label builder logic, Shipwright annotation storage, finalize flow
Frontend ImportAgentPage.tsx, ImportToolPage.tsx, api.ts State variables, "Advanced Injection Controls" section, API type fields
TUI types.go *bool fields on CreateAgentRequest and CreateToolRequest

Effort: Medium
Repo: kagenti/kagenti


Phase 3: UI consistency

Priority: Medium — DONE

3. #762 — Consistent look and feel for import Agents and Tools
  • Agent page: "Git Branch" → "Git Branch or Tag", "Select Example" → "Select Agent", "Source Path" → "Source Subfolder", section title renames, SPIRE defaults ON
  • Tool page: "Branch or Tag" → "Git Branch or Tag", "Example Tools" → "Select Tool", default port 9090, env URL defaults to .env.openai

Effort: Small
Repo: kagenti/kagenti


Phase 4: Outbound routing

Priority: Medium — DONE

4. #1167 Gap 4 — Outbound token-exchange routing UI

Adds an expandable "Outbound Routing Rules" section to both import pages. Users can define per-host token exchange rules (host pattern, target audience, OAuth scopes) that are stored as the authproxy-routes ConfigMap.

  • New upsert_configmap method on KubernetesService (create-or-merge)
  • OutboundRoute Pydantic model
  • _ensure_authproxy_routes helper
  • Shipwright build annotations and finalize flow propagate routes

Effort: Medium
Repo: kagenti/kagenti


Phase 5: Advanced configuration

Priority: Low — DONE

Bundle three smaller enhancements into one PR:

Gap 5 — authbridge-config parameter editing:
Field for DEFAULT_OUTBOUND_POLICY written to authbridge-config ConfigMap via upsert (merge, not replace). EXPECTED_AUDIENCE was dropped — replaced by per-agent CLIENT_ID in kagenti-extensions#282.

Gap 6 — Port exclusion annotations:
Text fields for kagenti.io/outbound-ports-exclude and kagenti.io/inbound-ports-exclude applied as pod template annotations.

Gap 3 — Combined sidecar mode indicator:
Deferred to a future PR — requires reading kagenti-webhook-defaults ConfigMap from a different namespace, which needs RBAC changes.

Effort: Medium (combined)
Repo: kagenti/kagenti


Dependency graph

Phase 1: Fix what's broken ✅
  #1143 (tool bug) ── #1169 MERGED
  #1167 Gap 1 (desc) ── #1169 MERGED
                       ▼
Phase 2: Core sidecar controls ✅
  #836 + #1167 Gap 2 ── #1174 MERGED
                       │
          ┌────────────┼────────────┐
          ▼            ▼            ▼
Phase 3 ✅       Phase 4 ✅    Phase 5 ✅
  #762             #1167 Gap 4   #1167 Gaps 5+6
  #1175 MERGED     #1176 MERGED  #1177 MERGED

All phases complete.


Cross-repo references

Reference Repo Relationship
kagenti-extensions#254 kagenti-extensions Combined sidecar mode (merged)
kagenti-extensions#262 kagenti-extensions Operator-managed client credentials (merged)
kagenti-extensions#282 kagenti-extensions Per-agent audience validation via CLIENT_ID (open)
kagenti-operator#247 kagenti-operator Operator client registration controller (merged)
#862 kagenti AgentRuntime CR epic (future — may reshape the UI model)

Success criteria

Additional Context

The full gap analysis with line-level implementation guidance is in #1167.

Demo documentation updates: The AuthBridge demo docs in kagenti-extensions were updated in [kagenti-extensions#XXX] to reflect the new UI fields, label renames, and default states.

Sub-issues

Sub-issues

4 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    enhancement
    on Apr 8, 2026
  2. moved this from Backlog to Epics in Rossoctl Issue Prioritizationon Apr 9, 2026
  3. added
    Identity
    on Apr 29, 2026
  4. added
    epic
    on Apr 29, 2026
  5. self-assigned this
    on May 2, 2026
  6. mrsabath commented on May 2, 2026

    @mrsabath
    MemberAuthor

    Closing — all phases complete

    All 5 phases delivered and merged:

    Phase PR Description
    1 #1169 Fix AuthBridge sidecar injection for tools + description fix
    2 #1174 Per-sidecar injection controls (React + FastAPI + TUI)
    3 #1175 UI consistency — labels, section titles, defaults
    4 #1176 Outbound routing rules UI for authproxy-routes ConfigMap
    5 #1177 Advanced config — port exclusions, outbound policy

    Sub-issues: #1143, #1167, #836, #762 — all closed.
    Cross-repo: kagenti-extensions#254, #262, #282 and kagenti-operator#247 — all merged.
    Success criteria: All 6 items satisfied.

    Deferred: Gap 3 (combined sidecar mode indicator) was intentionally deferred — requires RBAC changes to read kagenti-webhook-defaults ConfigMap cross-namespace. Can be tracked separately if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Identityenhancementepic

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions