feat: IBAC integration via authbridge plugin pipeline#18
Open
kellyaa wants to merge 10 commits into
Open
Conversation
Signed-off-by: Kelly Abuelsaad <kna@us.ibm.com>
Signed-off-by: Kelly Abuelsaad <kna@us.ibm.com>
Drop the standalone IBAC sidecar (forked authbridge image + Envoy + iptables init container) in favor of patching the operator-injected authbridge sidecar's plugin pipeline. The new flow appends a2a-parser (inbound) and inference-parser/mcp-parser/ibac (outbound) into the operator-managed authbridge-config-<agent> ConfigMap, and waits for the sidecar's filesystem-watch hot-reload to swap pipelines. Also wires --ibac to authBridgeEnabled=true in the kagenti API call so the operator injects the sidecar (and creates the ConfigMap) in the first place. Removes envoy-config.yaml and patch-deployment.yaml (legacy stack); adds ibac-patch.yaml (envsubst template), ibac-merge.py (idempotent ConfigMap merge with --prompt-file), and wait-for-reload.sh. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Kelly Abuelsaad <kna@us.ibm.com>
Stale leftover from before the migration commit; the flag no longer injects an Envoy overlay sidecar. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Kelly Abuelsaad <kna@us.ibm.com>
The kagenti-deps otel-collector binds OTLP/HTTP on 8335 (and gRPC on 4317); nothing is listening on 4318, so requests to 4318 return 503 and crash the agent's strict OTEL startup probe. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Kelly Abuelsaad <kna@us.ibm.com>
Allow authbridge sidecar to be enabled independently of IBAC via --authbridge/--no-authbridge flags and AUTHBRIDGE_ENABLED env var. Previously authbridge was only activated implicitly by --ibac. This decouples the two so auth/routing can be used without the IBAC plugin. Also rename the local `session_id` variable in a2a_client.py to `x_session_id` to avoid shadowing and clarify its purpose as the x-session-id header value. Signed-off-by: Yoav Katz <yoavkatz@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Yoav Katz <katz@il.ibm.com>
feat: add standalone --authbridge flag
Re-architect the deploy scripts to drive AuthBridge as a generic plugin
pipeline. The old --ibac and --authbridge flags treated the sidecar as
two opaque toggles; AuthBridge has since moved to independently
composable plugins (jwt-validation, token-exchange, token-broker,
a2a-parser, mcp-parser, inference-parser, ibac) with per-plugin
on_error policies (enforce/observe/off).
Spec: exgentic_a2a_runner/AUTHBRIDGE_PIPELINE_SPEC.md.
CLI surface (deploy-agent.sh and deploy-and-evaluate.sh):
--plugin-preset {auth-only|ibac-only|full}
--plugin <name>[:enforce|observe|off] (repeatable)
--no-plugin <name> (shorthand for :off)
--plugin-config-file <path> (flat-map per-plugin overrides)
Removed: --authbridge, --no-authbridge, --ibac, --no-ibac flags and
the IBAC_ENABLED / AUTHBRIDGE_ENABLED env-var aliases. No back-compat
shim — old call sites fail loudly with "unknown option".
Implementation:
- Rename ibac/ -> authbridge/. Split ibac-patch.yaml into per-plugin
fragments under plugins/ and three preset YAMLs.
- Replace ibac-merge.py with pipeline-merge.py: emits every
supported plugin (active ones with their resolved policy, others
with on_error: off so the framework skips dispatch — required
because the operator base config enables every plugin by default).
- Replace apply-ibac.sh with apply-pipeline.sh: renders fragments
via envsubst, runs the merge, validates the token-exchange /
token-broker mutex, applies, waits for reload.
- The resolver in deploy-agent.sh delegates to embedded Python so
it works under macOS bash 3.2 (no associative arrays).
Sidecar injection (authBridgeEnabled in the operator API call) now
fires when ANY plugin selector is supplied; omit them all for a
sidecar-free deployment.
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Kelly Abuelsaad <kna@us.ibm.com>
- apply-pipeline.sh / ibac.yaml: thread JUDGE_BEARER (falling back to OPENAI_API_KEY) into the IBAC plugin config so the judge endpoint authenticates correctly. - deploy-agent.sh: auto-source the script-local .env so IBAC_* values reach apply-pipeline.sh without the caller pre-sourcing; existing shell exports still win. - deploy-agent.sh: set LITELLM_LOCAL_MODEL_COST_MAP=True to stop litellm's startup fetch of the remote pricing JSON, which IBAC was rejecting with no_session/no_intent before any request landed. - intent_prompt.txt: always allow raw.githubusercontent.com so legitimate static-config fetches during init aren't blocked. - deploy-agent.sh: forward JUDGE_BEARER and OPENAI_API_KEY into the authbridge pipeline invocation. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Kelly Abuelsaad <kna@us.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
a2a-parser,inference-parser,mcp-parser,ibac).--ibac/--no-ibacflags todeploy-agent.shplus anibac/overlay (apply-ibac.sh,ibac-merge.py,ibac-patch.yaml,intent_prompt.txt,wait-for-reload.sh) that patchesauthbridge-config-<agent>and waits for sidecar hot-reload.You will need to build and load the IBAC images into the cluster prior to use.
See docs: https://github.com/kagenti/kagenti-extensions/blob/main/authbridge/demos/ibac/README.md
Notes
ibacplugin (e.g.localhost/ibac-sidecar); the operator's defaultauthbridge-envoy:v0.5.0-rc.3does not include it and will logreloader: reload failed ... unknown plugin "ibac". Document or wire the image override before merging if this is intended for general use.