Repository navigation
feat: migrate demo-ui.md from demo realm to kagenti realm - #149
Merged
5 commits merged intoMar 6, 2026
Merged
5 commits merged into
5 commits merged into
Conversation
9 of 15 tasks
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
force-pushed
the
feat/demo-ui-kagenti-realm
branch
from
March 5, 2026 04:01
f9efa45 to
22d2698
Compare
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]>
This was referenced 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]>
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
demo-ui.mdfromdemotokagentikagentirealmFiles changed
demo-ui.mdrealms/demoURLs, realm table entry, ConfigMap verification, CLI test commands, expected log output, patching section JWKS_URI, troubleshooting referencesdemo-ui.md(Step 8)Part of: kagenti#767
Test plan
kagentirealm)kagentirealm tokenkagentirealm in issuer/token-exchange URLs