Skip to content

feat: migrate demo-ui.md from demo realm to kagenti realm - #149

Merged
5 commits merged into
rossoctl:mainfrom
mrsabath:feat/demo-ui-kagenti-realm
Mar 6, 2026
Merged

5 commits merged into
rossoctl:mainfrom
mrsabath:feat/demo-ui-kagenti-realm

Conversation

@mrsabath

Copy link
Copy Markdown
Member

Summary

  • Migrates all Keycloak realm references in demo-ui.md from demo to kagenti
  • Replaces the Step 8 "Known limitation" workaround (kagenti-extensions#147) with instructions for direct UI chat, since the UI and demos now share the same kagenti realm
  • Depends on PR #148 (demo manifests realm migration)

Files changed

File Changes
demo-ui.md All realms/demo URLs, realm table entry, ConfigMap verification, CLI test commands, expected log output, patching section JWKS_URI, troubleshooting references
demo-ui.md (Step 8) Replaced known-limitation workaround with UI chat instructions now that realm mismatch is resolved

Part of: kagenti#767

Test plan

  • Deploy agent via UI with updated ConfigMaps (using kagenti realm)
  • Verify UI chat with AuthBridge-protected agent works (same realm)
  • Verify CLI test (Step 9d) works with kagenti realm token
  • Verify AuthProxy logs show kagenti realm in issuer/token-exchange URLs

mrsabath added 3 commits March 4, 2026 23:01
Migrate all GitHub Issue Agent demo files from the Keycloak "demo" realm
to the shared "kagenti" realm. This aligns the demo with the platform-wide
realm migration (kagenti#764) so that UI-issued tokens and demo tokens
share the same issuer, enabling UI chat with AuthBridge-protected agents.

Updated files:
- k8s/configmaps.yaml: KEYCLOAK_REALM, TOKEN_URL, ISSUER
- k8s/github-tool-deployment.yaml: ISSUER, JWKS_URL
- k8s/git-issue-agent-deployment.yaml: JWKS_URI
- setup_keycloak.py: default KEYCLOAK_REALM
- demo-manual.md: all realm references in docs and commands

Part of: rossoctl/rossoctl#767

Signed-off-by: Mariusz Sabath <[email protected]>
Made-with: Cursor
Update all Keycloak realm references in demo-ui.md from "demo" to
"kagenti" to align with the platform-wide realm migration (kagenti#764).

With the UI and demos now on the same realm, the UI chat with
AuthBridge-protected agents works end-to-end. The Step 8 known-limitation
workaround (kagenti-extensions#147) is replaced with instructions for
direct UI chat.

Part of: rossoctl/rossoctl#767

Signed-off-by: Mariusz Sabath <[email protected]>
Made-with: Cursor
The CLI test steps were obtaining the Keycloak admin token from the
master realm. Now that the admin user exists in the kagenti realm
with realm-admin permissions, use the kagenti realm consistently
throughout the demo to avoid cross-realm dependencies.

The wrong-issuer test and troubleshooting sections intentionally
retain master realm references.

Signed-off-by: Mariusz Sabath <[email protected]>
Made-with: Cursor
@mrsabath
mrsabath force-pushed the feat/demo-ui-kagenti-realm branch from f9efa45 to 22d2698 Compare March 5, 2026 04:01
The Kagenti installer (rossoctl/rossoctl#851) now creates correct default
ConfigMaps for all AuthBridge components:
- authbridge-config with templatized kagenti realm
- envoy-config with 300s timeouts and Lua filter for inbound direction

Remove environments, spiffe-helper-config, and envoy-config from the
demo's configmaps.yaml — only authbridge-config remains, overriding
TARGET_AUDIENCE (github-tool), TARGET_SCOPES, and EXPECTED_AUDIENCE
with demo-specific values.

Update demo-ui.md Step 2 and demo-manual.md Step 3 to explain that
only authbridge-config is overridden.  Update troubleshooting sections
to reference the installer's envoy-config defaults.

Signed-off-by: Mariusz Sabath <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Keycloak only auto-assigns realm default scopes to newly created
clients. The UI kagenti client was created during install before
the agent audience scope existed, so it does not inherit it. Without
this scope, the UI token lacks the agent SPIFFE ID in the audience
claim, causing AuthBridge to reject UI chat requests with invalid
audience.

Explicitly add the agent-ns-sa-aud scope to the kagenti UI client
after creating it as a realm default. This is a temporary workaround
until the client-registration sidecar handles this automatically
(#169).

Signed-off-by: Mariusz Sabath <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
@mrsabath mrsabath closed this pull request by merging all changes into rossoctl:main in 77e51a9 Mar 6, 2026
anatolykoyfman added a commit that referenced this pull request Aug 26, 2026
Parametrize the UC-1 onboarding harness so a second policy can drive the
same live flow under a different default effect, without changing any
Policy-A behavior. Every new parameter defaults to today's behavior, so the
existing rung callers (which pass only a positional workloads list) are
byte-for-byte unchanged.

- ensure_agent_policy gains policy_md (default scn.POLICY_ABSTRACT); the
  existing content-diff rollout already reloads the Controller on a prose
  change, so switching policies reloads correctly.
- onboarded_stack gains keyword-only policy_md, default_effect, and
  ready_signals. It applies the default_effect hook before onboarding and
  resets it to the shipped Deny on teardown; Deny is a no-op that never
  patches the stack. The convergence probe is now the supplied ReadySignal
  set (or the preserved Policy-A default), and the raw-diagnostics message is
  recomputed against those signals.
- ReadySignal describes one inbound/outbound convergence probe; a new
  unmarked unit test pins the pure seams and the behavior-preserving defaults.

default_effect is applied via _set_controller_default_effect, a documented
single-point seam that patches the Controller/PCE env (AIAC_DEFAULT_EFFECT)
and rolls it, mirroring ensure_agent_policy. This is the hard coupling to
Task 1 (#146), which owns the reader side and is not yet merged on this
base; the env name and Allow/Deny values track #146's contract and must be
realigned once it lands (handoff 02 §3).

Does not modify scenario_uc1.py, test_policy_pipeline.py, the rung tests,
launcher.py, or src/aiac/**.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman added a commit that referenced this pull request Aug 26, 2026
…d harness setter (#149)

#146 threads default_effect through the PCE as an onboard_service parameter but
left the live /apply/service route hardcoded to the DENY default, so a running
Controller had no reachable way to onboard a policy under default_effect=ALLOW.
#149's integration harness requests ALLOW by patching AIAC_DEFAULT_EFFECT onto
the Controller deployment, but nothing read that env. This connects the two
halves: apply_service now resolves RuleEffect from AIAC_DEFAULT_EFFECT
("Allow"/"Deny") and threads it into onboard_service. Absent/unrecognised → DENY,
so existing deployments are byte-for-byte unchanged. Required for the #151 live
denyworld test to actually flip the default.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman added a commit that referenced this pull request Aug 26, 2026
Add test/integration/test_policy_pipeline_denyworld.py, the ALLOW-default
sibling of test_policy_pipeline.py (#151, epic #142). It onboards Policy B
(permissive-default prose with prohibitions + exclusive scoping) through the
real UC-1 pipeline via the #149 policy-agnostic harness
(onboarded_stack(..., policy_md=POLICY_DENYWORLD, default_effect=ALLOW,
ready_signals=...)), drives real HTTP through AuthBridge, and asserts the
deployed OPA plugin enforces the §6 allow/deny matrix from the #148 oracle.

Why default_effect=ALLOW: under deny-by-default an explicit DENY is invisible
at the enforced seam (an ungranted pair is already denied), so flipping the
default makes each DENY the only thing that can deny a pair — proving DENY
enforcement end-to-end through PRB -> PCE -> Rego -> bundle -> OPA. The
devops -> issues-* = allow cells are the default-flip tracer (deny under
Policy A).

- pytestmark = pytest.mark.integration (excluded from the keep-green lane).
- Expected verdicts computed from the #148 oracle functions
  (expected_inbound_denyworld / expected_outbound_denyworld_bare) — no second
  copy of the matrix; the fixture-independent §6 contract stays in the #148
  test_scenario_uc1_denyworld.py unit module.
- Policy-B-aware convergence signals (dev-user inbound allow; devops-user
  issues-read allow tracer; test-user source-read deny).
- Negative controls resolved against the ALLOW-mode Rego: an unmatched tool
  name is in no deny map, so no deny gate fires and it falls through to the
  permissive default = allow (the mirror of the deny-by-default control).
- Teardown (in the harness) resets default_effect to Deny + cleans Keycloak so
  a subsequent Policy-A run on the shared stack is unaffected.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman added a commit that referenced this pull request Aug 26, 2026
Parametrize the UC-1 onboarding harness so a second policy can drive the
same live flow under a different default effect, without changing any
Policy-A behavior. Every new parameter defaults to today's behavior, so the
existing rung callers (which pass only a positional workloads list) are
byte-for-byte unchanged.

- ensure_agent_policy gains policy_md (default scn.POLICY_ABSTRACT); the
  existing content-diff rollout already reloads the Controller on a prose
  change, so switching policies reloads correctly.
- onboarded_stack gains keyword-only policy_md, default_effect, and
  ready_signals. It applies the default_effect hook before onboarding and
  resets it to the shipped Deny on teardown; Deny is a no-op that never
  patches the stack. The convergence probe is now the supplied ReadySignal
  set (or the preserved Policy-A default), and the raw-diagnostics message is
  recomputed against those signals.
- ReadySignal describes one inbound/outbound convergence probe; a new
  unmarked unit test pins the pure seams and the behavior-preserving defaults.

default_effect is applied via _set_controller_default_effect, a documented
single-point seam that patches the Controller/PCE env (AIAC_DEFAULT_EFFECT)
and rolls it, mirroring ensure_agent_policy. This is the hard coupling to
Task 1 (#146), which owns the reader side and is not yet merged on this
base; the env name and Allow/Deny values track #146's contract and must be
realigned once it lands (handoff 02 §3).

Does not modify scenario_uc1.py, test_policy_pipeline.py, the rung tests,
launcher.py, or src/aiac/**.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman added a commit that referenced this pull request Aug 26, 2026
…d harness setter (#149)

#146 threads default_effect through the PCE as an onboard_service parameter but
left the live /apply/service route hardcoded to the DENY default, so a running
Controller had no reachable way to onboard a policy under default_effect=ALLOW.
#149's integration harness requests ALLOW by patching AIAC_DEFAULT_EFFECT onto
the Controller deployment, but nothing read that env. This connects the two
halves: apply_service now resolves RuleEffect from AIAC_DEFAULT_EFFECT
("Allow"/"Deny") and threads it into onboard_service. Absent/unrecognised → DENY,
so existing deployments are byte-for-byte unchanged. Required for the #151 live
denyworld test to actually flip the default.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
anatolykoyfman added a commit that referenced this pull request Aug 26, 2026
Add test/integration/test_policy_pipeline_denyworld.py, the ALLOW-default
sibling of test_policy_pipeline.py (#151, epic #142). It onboards Policy B
(permissive-default prose with prohibitions + exclusive scoping) through the
real UC-1 pipeline via the #149 policy-agnostic harness
(onboarded_stack(..., policy_md=POLICY_DENYWORLD, default_effect=ALLOW,
ready_signals=...)), drives real HTTP through AuthBridge, and asserts the
deployed OPA plugin enforces the §6 allow/deny matrix from the #148 oracle.

Why default_effect=ALLOW: under deny-by-default an explicit DENY is invisible
at the enforced seam (an ungranted pair is already denied), so flipping the
default makes each DENY the only thing that can deny a pair — proving DENY
enforcement end-to-end through PRB -> PCE -> Rego -> bundle -> OPA. The
devops -> issues-* = allow cells are the default-flip tracer (deny under
Policy A).

- pytestmark = pytest.mark.integration (excluded from the keep-green lane).
- Expected verdicts computed from the #148 oracle functions
  (expected_inbound_denyworld / expected_outbound_denyworld_bare) — no second
  copy of the matrix; the fixture-independent §6 contract stays in the #148
  test_scenario_uc1_denyworld.py unit module.
- Policy-B-aware convergence signals (dev-user inbound allow; devops-user
  issues-read allow tracer; test-user source-read deny).
- Negative controls resolved against the ALLOW-mode Rego: an unmatched tool
  name is in no deny map, so no deny gate fires and it falls through to the
  permissive default = allow (the mirror of the deny-by-default control).
- Teardown (in the harness) resets default_effect to Deny + cleans Keycloak so
  a subsequent Policy-A run on the shared stack is unaffected.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant