Repository navigation
Description
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-routesConfigMap 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
- Correctness: The AuthBridge checkbox description claims client-registration is injected, but since kagenti-extensions PR 🐛 fix setting up mcp inspector proxy URL #262, it is not. Users are misled.
- Functionality: Enabling AuthBridge on tools doesn't work at all (🐛 AuthBridge not present on tool #1143).
- Usability: Users must hand-edit
authproxy-routesConfigMaps to get outbound token exchange working — the most common AuthBridge use case. - Completeness: The webhook supports 7+ configurable labels/annotations per workload, but the UI exposes only 2.
- Consistency: The Agent and Tool import pages have inconsistent labels, defaults, and section names (UI: Consistent look and feel for import Agents and Tools #762).
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
- 🐛 AuthBridge not present on tool #1143 — AuthBridge not present on tool (bug) — MERGED in 🐛 Fix AuthBridge sidecar injection for tools #1169
- feat: Expose AuthBridge sidecar configuration options in Agent/Tool import UI #1167 Gap 1 — Fix inaccurate AuthBridge checkbox description (bug) — MERGED in 🐛 Fix AuthBridge sidecar injection for tools #1169
Phase 2: Core sidecar controls
- feature: Add AuthBridge sidecar injection opt-out controls to kagenti UI #836 / feat: Expose AuthBridge sidecar configuration options in Agent/Tool import UI #1167 Gap 2 — Per-sidecar injection toggles — MERGED in feat: Add per-sidecar injection controls to agent and tool import #1174
Phase 3: UI consistency
- UI: Consistent look and feel for import Agents and Tools #762 — Consistent look and feel for import Agents and Tools — MERGED in fix(ui): Align import page labels, defaults, and sections #1175
Phase 4: Outbound routing
- feat: Expose AuthBridge sidecar configuration options in Agent/Tool import UI #1167 Gap 4 — Outbound token-exchange routing UI — MERGED in feat: Add outbound routing rules UI for authproxy-routes ConfigMap #1176
Phase 5: Advanced configuration
- feat: Expose AuthBridge sidecar configuration options in Agent/Tool import UI #1167 Gaps 3, 5, 6 — Port exclusions, outbound policy — MERGED in feat: Add advanced AuthBridge config -- port exclusions, outbound policy, audience #1177
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_configmapmethod on KubernetesService (create-or-merge) OutboundRoutePydantic model_ensure_authproxy_routeshelper- 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
- Enabling AuthBridge on tools actually injects sidecars (🐛 AuthBridge not present on tool #1143) — fixed in 🐛 Fix AuthBridge sidecar injection for tools #1169
- AuthBridge checkbox description accurately reflects current behavior — fixed in 🐛 Fix AuthBridge sidecar injection for tools #1169
- Users can control per-sidecar injection from the import UI — merged in feat: Add per-sidecar injection controls to agent and tool import #1174
- Users can configure outbound token-exchange routes from the UI — merged in feat: Add outbound routing rules UI for authproxy-routes ConfigMap #1176
- Import Agent and Import Tool pages have consistent labels and defaults (UI: Consistent look and feel for import Agents and Tools #762) — merged in fix(ui): Align import page labels, defaults, and sections #1175
- Advanced users can configure port exclusions and outbound policy from the UI — merged in feat: Add advanced AuthBridge config -- port exclusions, outbound policy, audience #1177
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
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
mrsabath commentedon May 2, 2026
Closing — all phases complete
All 5 phases delivered and merged:
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-defaultsConfigMap cross-namespace. Can be tracked separately if needed.