Skip to content

Feat: RC1 AuthBridge egress PoC — design + RC1-0 shared services - #94

Merged
pdettori merged 4 commits into
rossoctl:mainfrom
pdettori:feat/rc1-authbridge
Jul 11, 2026
Merged

pdettori merged 4 commits into
rossoctl:mainfrom
pdettori:feat/rc1-authbridge

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

Lands the design and the harness-side shared services for the RC1 AuthBridge (Rosso Cortex) egress
control-plane PoC
— a single-tenant, Kind-first proof that AuthBridge can do credential injection and
action control on the harness's HTTP egress hops, with the real credential never held by any
model-influenced workload.

This PR contains:

  • Design docs — the RC1 spec (docs/specs/2026-07-10-authbridge-egress-control-plane-poc-design.md),
    ADR-0025 (deployment topology), and the registry entry in docs/specs/README.md.
  • @sh/ibac-stub — a tiny canned IBAC judge (POST /v1/chat/completions → an OpenAI completion whose
    choices[0].message.content is {"verdict","reason"}) that lets the PoC demonstrate allow/deny runs
    deterministically without a real LLM judge. Denies by a configured tool/URL/arg-marker denylist.
  • deploy/knative/ibac-stub.yaml — its Deployment + Service (shared repo image + command: override,
    matching relay-deployment.yaml), plus a manifest-shape vitest that parses the YAML directly.

Flag-gated / inert

The whole RC1 path is gated behind SH_AUTHBRIDGE (off by default), mirroring the SH_REMOTE_SANDBOX
discipline. The ibac-stub manifest is not wired into any kustomization base — it is applied only by
the RC1 setup path, so this PR changes no default behavior and existing e2e stays green.

Testing

  • pnpm --filter @sh/ibac-stub test — 11/11 (unit + a real server integration test); pnpm -r test
    regression-clean.
  • pnpm --filter @sh/knative-server test — manifest-shape test green.

Companion PR

The credential-injection mechanism (static-inject plugin) is a companion PR in kagenti-extensions.

Known follow-up

  • Add ibac-stub to CI's per-package tsc --noEmit list (.github/workflows/ci.yml) in a later RC1
    integration change (it is picked up by pnpm -r test today).

Assisted-By: Claude Code

pdettori added 3 commits July 10, 2026 16:12
Reframe the Phase-2 zero-trust credential plane around Rosso Cortex /
AuthBridge as the injection and control mechanism, for a single-tenant
Kind-first PoC. Filed as its own RC (Rosso Cortex Integration) track
rather than a linear Z id, since it reframes the plane rather than
succeeding it.

AuthBridge sits on both harness HTTP egress hops: a shared LLM gateway
(Profile A) and a per-sandbox egress forward-proxy (Profile B), running
token-broker credential injection plus stubbed-judge SPARC/IBAC control.
BYO sandbox is a marked stretch on the SandboxTransport seam.

ADR-0025 records the deployment-topology decision (shared vs co-located)
and its trade-offs (per-caller attribution deferred to Z1, abph_ single-
replica limit, enforceable harness zero-egress, ambient/waypoint alignment).

Registers the RC track + RC1 in the milestone registry; records the Z3+Z5
mechanism merge under one 'egress control-plane, two profiles' pattern
(no retro-edits to Z3/Z5 until RC1 is accepted).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Self-authored PR — GitHub blocks a formal APPROVE, so this is posted as a COMMENT; review verdict is approve-equivalent.)

Clean, well-scoped PoC scaffolding PR. New @sh/ibac-stub package (canned OpenAI-compatible IBAC judge), its inert Knative manifest, and a manifest-shape test — all gated behind the RC1 path and wired into no kustomization base, so default behavior and existing e2e are untouched. Test coverage is good (decide unit tests, a real-server integration test, YAML-parsing manifest test), and the manifest matches the relay-deployment.yaml shared-image convention exactly. Two minor findings inline, neither blocking. CI is fully green and all commits are signed off.

Assisted-By: Claude Code

Comment thread packages/ibac-stub/src/main.ts Resolved
Comment thread packages/ibac-stub/src/server.ts Resolved
… body

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori

Copy link
Copy Markdown
Member Author

Both inline findings addressed in 46c24b6:

  • main.ts dead env param — listFromEnv now takes env and rulesFromEnv threads its env through to every call, so a caller-supplied env is actually honored. Added a main.test.ts case that passes a custom env object and asserts the deny lists come from it (guards against the asymmetry with portFromEnv reappearing).
  • server.ts non-object body — a non-object/null parsed body is now treated as empty action text (→ allow), uniform with the other primitives, instead of throwing a 500. This also required guarding parsed?.model in the response envelope, which would otherwise throw one line later on a null body. Added a server.test.ts case: a JSON null body returns 200 with an allow verdict.

Tests: 14/14 pass, tsc --noEmit clean.

Assisted-By: Claude Code

@pdettori
pdettori merged commit 56b1c3a into rossoctl:main Jul 11, 2026
10 checks passed
@pdettori
pdettori deleted the feat/rc1-authbridge branch July 11, 2026 00:57
pdettori added a commit that referenced this pull request Jul 14, 2026
…ded annotations

RC1-0/1/2/4 are merged and live-verified on both Kind and OCP 4.20 (PRs #94–#104;
the OCP live gate passes 6/6). The only remaining RC1 milestone, RC1-3 (BYO
sandbox, a marked stretch), is gated on the SandboxTransport live gate ST5 (#88).

Per the RC1 spec §7, the Z3/Z5 mechanism-superseded header edits were deliberately
deferred "until RC1 is accepted." This flips RC1 Proposed → Accepted and applies
those annotations:

- RC1 spec: Status → Accepted (with implementation state); §7 closing note updated
  to reflect the annotations are now applied.
- Z3 (inference injector): Status notes its mechanism is superseded by RC1 Profile A
  (plain-Go injector → AuthBridge shared gateway); retained for deployment-profile
  detail + deferred per-caller-identity/mTLS.
- Z5 (generalized credentialed egress): Status notes RC1 Profile B implements a
  static single-tenant slice of its mechanism; retained as the home of the deferred
  per-user / RFC 8693 token-exchange core.
- specs/README.md: RC1 row → accepted; Z3/Z5 rows annotated to match.

No mechanism prose is deleted; Z3/Z5 remain the home of their deferred per-user work.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
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.

1 participant