Skip to content

Authenticate A2A requests and fix jwt-validation pipeline reload - #46

Merged
kellyaa merged 5 commits into
rossoctl:mainfrom
yoavkatz:fix/a2a-auth-and-jwt-validation-config
Jul 27, 2026
Merged

Authenticate A2A requests and fix jwt-validation pipeline reload#46
kellyaa merged 5 commits into
rossoctl:mainfrom
yoavkatz:fix/a2a-auth-and-jwt-validation-config

Conversation

@yoavkatz

Copy link
Copy Markdown
Contributor

Summary

Wire a Keycloak bearer token through the A2A evaluation path so requests are accepted by the agent's authbridge sidecar, and fix the pipeline merge so jwt-validation reloads instead of failing with issuer is required.

Changes

  • a2a_client.py — attach Authorization: Bearer from config.auth_token (A2A_AUTH_TOKEN) to the agent-card fetch and every send_message.
  • evaluate-benchmark.sh — obtain a rossoctl-realm token via the direct-access-grant flow when A2A_AUTH_TOKEN is unset (mirrors the deploy flow).
  • pipeline-merge.py — seed each plugin entry from the operator's rendered config block (deep-merging fragment + overrides on top) instead of replacing the plugin list wholesale, preserving operator-only config such as jwt-validation's issuer and token-exchange's token_url.
  • plugins/jwt-validation.yaml — render issuer/keycloak_url/keycloak_realm from the operator authbridge-config ConfigMap; document the DisallowUnknownFields schema constraint.
  • apply-pipeline.sh — source JWT_VALIDATION_* from the base ConfigMap and pre-flight fail if the issuer can't be resolved while jwt-validation is active.
  • deploy-agent.sh — fail fast with a clear message when python3/PyYAML is missing and a plugin selector was supplied.
  • run-ibac-comparison.sh — new wrapper to run a benchmark with a plugin preset vs a baseline and compare.

Test plan

  • Deploy an agent with a plugin preset and confirm the authbridge sidecar reloads without issuer is required.
  • Run evaluate-benchmark.sh and confirm A2A requests are authenticated (no HTTP 401).
  • Run run-ibac-comparison.sh end-to-end.

🤖 Generated with Claude Code

yoavkatz and others added 5 commits July 26, 2026 21:12
Wire a Keycloak bearer token through the A2A evaluation path so requests
are accepted by the agent's authbridge sidecar, and fix the pipeline
merge so jwt-validation reloads instead of failing with "issuer is
required".

- a2a_client: attach Authorization: Bearer from config.auth_token
  (A2A_AUTH_TOKEN) to the agent-card fetch and every send_message.
- evaluate-benchmark.sh: obtain a rossoctl-realm token via the
  direct-access-grant flow when A2A_AUTH_TOKEN is unset.
- pipeline-merge.py: seed each plugin entry from the operator's rendered
  config block (deep-merge fragment + overrides on top) instead of
  replacing the plugin list wholesale, preserving operator-only config
  such as jwt-validation's issuer and token-exchange's token_url.
- jwt-validation.yaml: render issuer/keycloak_url/keycloak_realm from the
  operator authbridge-config ConfigMap; document the DisallowUnknownFields
  schema constraint.
- apply-pipeline.sh: source JWT_VALIDATION_* from the base ConfigMap and
  pre-flight fail if the issuer can't be resolved while jwt-validation is
  active.
- deploy-agent.sh: fail fast with a clear message when python3/PyYAML is
  missing and a plugin selector was supplied.
- run-ibac-comparison.sh: new wrapper to run a benchmark with a plugin
  preset vs a baseline and compare.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
Surface A2A execution failures as errors, fix trace token accounting to
the current OpenTelemetry gen_ai keys, and make comparison experiment
names unique per run.

- a2a_client: add A2ATaskError and inspect the task's terminal state; a
  task ending in failed/rejected/canceled is raised as an error even when
  it returned descriptive text, so the runner marks Agent.Call /
  Agent.Session spans ERROR instead of counting it as a success.
- analyze_traces: read token usage from gen_ai.usage.input_tokens/
  output_tokens (the keys current tracers emit) rather than the stale
  llm.token_count.prompt/completion path.
- run-ibac-comparison.sh: append a short random id to experiment names so
  repeated runs with the same params don't collide; read /dev/urandom via
  a bounded head to avoid an intermittent SIGPIPE-induced exit under
  pipefail + set -e.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
Add an "IBAC Comparison Script" section describing the plugin-vs-baseline
comparison wrapper: what it does, the shared random experiment id,
the judge env requirements, usage examples, and an options table matching
the script's --help defaults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
Add an Error Rate (%) row to the --compare/-c report, printed just
before Eval Success Rate. Uses the same ERROR-status definition as the
per-parallel and per-group tables.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
The --compare/-c report now includes an "Error Breakdown by Type" table
below the main comparison, counting ERROR-status root spans by their
verbatim statusMessage per experiment, shown as count (pct%).

- Thread statusMessage from the root Agent.Session span into TraceRecord.
- Group ERROR traces by first line of statusMessage; blank -> "(no
  message)". Strip the "A2A task ended in state 'failed':" prefix and
  truncate labels to 100 chars.
- Rows are the union of error types across experiments, sorted by total
  frequency; the section always prints, showing "No errors" when empty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
@kellyaa
kellyaa merged commit a25682a into rossoctl:main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants