pr-body
Summary
- Credentials & secrets: Enriches secret metadata with usage references, storage/encryption details, and creator attribution; adds
SecretProtectionDetailsUI; removes standalone audit panel in favor of inline protection context; extends BFF routes andsecret-servicefor usage lookup and masked previews. - MCP + AgentGateway: Fronts all enabled HTTP/SSE MCP servers through AgentGateway (config bridge, mcp-targets BFF, endpoint normalization); adds endpoint probe and test-tool APIs; per-row OpenFGA permissions on the MCP Servers tab; full edit path for AgentGateway-managed rows (supersedes #1960); rewrites
Authorizationcredential headers toX-CAIPE-Provider-Token. - Agents & workflows: Tightens dynamic-agent team grants (use vs manage); reconciles platform MCP/agent OpenFGA tuples on startup; delegates workflow BFF calls to the invoking user's bearer for Webex/Slack agents.
- Agent context HMAC (G1/G2, #1920/#1928): Wires
CAIPE_AGENT_CONTEXT_HMAC_SECRETthrough Helm for dynamic-agents and openfga-authz-bridge (agentContext.existingSecret), documents it in.env.example, patches it insetup-caipe.sh→caipe-ui-secret, and logs a startup warning when AgentGateway is on without the secret. See Agent context HMAC. - Platform wiring: Updates dynamic-agents MCP client token forwarding, dev compose (OpenFGA reconcile default, workflow OAuth2), Webex WDM reconnect hardening, and RBAC E2E specs.
Commits (incremental)
feat(credentials): integrate secrets UX with AgentGateway MCP routing— base PR commitfeat(mcp): add AgentGateway upstream resolver and credential helpersfeat(agentgateway): propagate MCP credential headers through bridgefeat(mcp): add list permissions and gate MCP server actions in UIfeat(agents): scope ownership checks and tighten team member grantsfeat(rbac): reconcile platform MCP and agent OpenFGA tuples on startupfeat(workflows): delegate workflow BFF calls to invoking user bearerfix(rbac): allow team workflow owners to run without team membershipfix(ui): flip popovers when viewport space is limitedfeat(credentials): harden secret dialog and add workspace regression e2etest(e2e): expand MCP permission and workflow agent regression coveragefix(webex): improve WDM reconnection and device registration handlingfix(jira): harden MCP API client error handlingchore(compose): default OpenFGA reconcile on and add workflow OAuth2 envfeat(workflows): improve Webex workflow run tool responses and guidancefix(webex): reduce duplicate pairing prompts and harden identity lookup
Agent context HMAC (CAIPE_AGENT_CONTEXT_HMAC_SECRET)
Shared symmetric secret used when MCP calls go through AgentGateway:
- Signers (dynamic-agents, caipe-ui BFF probe/test-tool) attach
X-CAIPE-Agent-Context+ HMAC signature naming the callingagent_id. - Verifier (openfga-authz-bridge) checks the signature, then enforces
user can_use agent:<id>andagent:<id> can_call tool:<server>/<tool>ontools/call.
Without it, only the coarse user-level mcp_gateway:list gate runs — per-agent allowed_tools may 403.
G1 (Helm): dynamic-agents.agentContext.existingSecret + bridge wiring via caipe-ui-secret; chart NOTES.txt warning.
G2 (bootstrap): .env.example, setup-caipe.sh patch/generate, dynamic-agents startup warning.
Full doc: Agent context HMAC
Test plan
-
cd ui && npm run lint && npm test -- --runInBand src/lib/credentials src/components/credentials src/components/dynamic-agents src/app/api/mcp-servers src/app/api/credentials -
cd deploy/agentgateway && uv run pytest tests/test_config_bridge.py -
cd ai_platform_engineering/dynamic_agents && uv run pytest tests/test_mcp_client_token_forwarding.py tests/test_workflow_api_client.py tests/test_workflow_user_delegation.py -
uv run pytest tests/test_dynamic_agents_chart_keycloak_env.py(HMACsecretKeyRef+ NOTES warning) - Manual: create MCP server with secret header binding → probe endpoint → test tool call via AgentGateway route
- Manual: credentials workspace — create/rotate/share secret, verify usage references and protection details
- E2E:
RUN_RBAC_REGRESSION=1 npm run test:e2e:rbac-regression(includes credentials, MCP, workflow delegation mocks)
Linked issues
Fixes #1930
Fixes #1929
Fixes #1942
Fixes #1920
Fixes #1928
Fixes #1911
Relates to #1931 — workflow user-bearer delegation is implemented; live Webex bot → agent → team workflow validation is tracked in docs/docs/specs/2026-06-22-pr-1967-issue-closure/plan.md (gap G5).
Supersedes closed PR #1960.
Follow-up gaps (post-merge)
See docs/docs/specs/2026-06-22-pr-1967-issue-closure/plan.md for jwtAuth guardrails (G3, P2), admin FGA tab parity (G4, P2), #1931 live E2E (G5, P3), and workflow image rollout (#1968, G6, P4). G1/G2 (HMAC Helm + bootstrap) are done — see Agent context HMAC.