Skip to content

feat: IBAC integration via authbridge plugin pipeline#18

Open
kellyaa wants to merge 10 commits into
kagenti:mainfrom
kellyaa:feat/ibac
Open

feat: IBAC integration via authbridge plugin pipeline#18
kellyaa wants to merge 10 commits into
kagenti:mainfrom
kellyaa:feat/ibac

Conversation

@kellyaa
Copy link
Copy Markdown
Contributor

@kellyaa kellyaa commented May 22, 2026

Summary

  • Integrate IBAC (Intent-Based Access Control) into the exgentic agent deploy flow via the operator-injected authbridge sidecar's plugin pipeline (a2a-parser, inference-parser, mcp-parser, ibac).
  • Add --ibac / --no-ibac flags to deploy-agent.sh plus an ibac/ overlay (apply-ibac.sh, ibac-merge.py, ibac-patch.yaml, intent_prompt.txt, wait-for-reload.sh) that patches authbridge-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

  • IBAC requires an authbridge-envoy image that registers the ibac plugin (e.g. localhost/ibac-sidecar); the operator's default authbridge-envoy:v0.5.0-rc.3 does not include it and will log reloader: reload failed ... unknown plugin "ibac". Document or wire the image override before merging if this is intended for general use.
  • Branch is marked experimental; flag defaults to off.

kellyaa added 6 commits May 13, 2026 11:54
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>
yoavkatz and others added 4 commits May 27, 2026 16:08
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New /:ToDo

Development

Successfully merging this pull request may close these issues.

3 participants