Skip to content

docs(authbridge): trim demos.md and fix token/deploy guidance - #1680

Merged
mrsabath merged 10 commits into
rossoctl:mainfrom
mrsabath:docs/authbridge-demos-fix
Jul 15, 2026
Merged

mrsabath merged 10 commits into
rossoctl:mainfrom
mrsabath:docs/authbridge-demos-fix

Conversation

@mrsabath

@mrsabath mrsabath commented May 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Rewrites docs/authbridge/demos.md for clarity and corrects docs/install.md and a stale
legacy secrets example, based on running the AuthBridge beginner path on Kind and verifying
claims against the current charts/operator.

demos.md

  • Add a "What AuthBridge does" + "How it works" intro that tells the story (SPIRE issues the
    SPIFFE identity; the operator registers the Keycloak OAuth client; the sidecar enforces
    inbound/outbound auth) instead of a bare list of commands.
  • Give each Layer a plain-English explanation of what it demonstrates and what to look for;
    rewrite the fragmentary inline comments into complete sentences a newcomer can follow.
  • Delegate deployment to demo-ui.md
    (no duplicated UI steps); document KAGENTI_UI_PW and the OAuth client pitfalls
    (kagenti / admin-cli / kagenti-e2e-tests).
  • Fix the agent call to A2A on weather-service:8080; correct the expected agent-card name
    to Weather Assistant; fix test-client (bare pod, not deploy/) and the
    87-setup-test-credentials.sh invocation (KEYCLOAK_URL=http://keycloak.localtest.me:8080
    on Kind).
  • Fix cross-repo links after the kagenti-extensions demos README was restructured
    (#github-issue-agent-full-authbridge-flow; token-exchange-routes/README.md).

install.md

  • Correct the operator's Keycloak admin secret: the client-registration controller
    reads the keycloak-initial-admin Secret from the keycloak namespace (keys
    username/password), configurable via keycloak.adminSecretName /
    keycloak.adminUsernameKey / keycloak.adminPasswordKey. (An earlier draft of this PR
    incorrectly described a keycloak-admin-secret in kagenti-system with invented chart
    values — that has been removed.)
  • Local machine resources: document the CPU/RAM profiles and the 4-CPU build caveat,
    with numbers matching the installer's pre-flight check (6 CPUs / 18 GiB recommended,
    warn-only — not a hard minimum).
  • Clarify the two Istio layers: the core Gateway controller is always installed (required
    for ingress); --with-istio is the optional ambient mesh.

deployments/envs/secret_values.yaml.example

  • Remove the stale keycloak: block from this (already deprecated) example. Its comment
    described a keycloak-admin-secret created in agent namespaces for the AuthBridge
    client-registration sidecar — a model that no longer exists — so it contradicted the
    corrected install.md.

Test plan

  • Ran the full beginner path on a fresh Kind cluster (install → deploy weather tool +
    agent → Layer 1 A2A checks) and verified AuthBridge inbound enforcement live
  • Verified secret name/namespace/keys and CPU numbers against charts/kagenti,
    charts/kagenti-operator, and scripts/kind/setup-kagenti.sh
  • Verified the fixed kagenti-extensions links/anchors resolve on main

Issue

Closes #1679 (partial — see also kagenti-extensions #671 for the demo-ui.md side).
Supersedes #2210 (the secrets-example fix is now included here).

Assisted-By: Claude Code

@mrsabath

Copy link
Copy Markdown
Member Author

Updated PR: added DCO sign-off and restored a Verify deployment section plus Layer 1 inbound checks (agent card, no token, invalid token, JWT decode, E2E curl). Single-file commit only.

@mrsabath

Copy link
Copy Markdown
Member Author

Also updated docs/install.md: Local machine resources table (8 CPUs recommended, 4 CPUs not enough for Shipwright builds), Podman resize steps, and corrected keycloak-admin-secret location to kagenti-system.

@mrsabath
mrsabath force-pushed the docs/authbridge-demos-fix branch from da5f4fa to d6fc07d Compare June 4, 2026 00:48
@mrsabath

mrsabath commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

Rebased onto current main and resolved the docs/install.md conflict with #1767 (which bumped Podman to 6 CPUs). Kept the 8 CPU recommended / 6 CPU minimum framing from the new Local machine resources table — strictly stronger than the prior 6-CPU-only line, and internally consistent with the table.

Also added a small Gotchas subsection to docs/authbridge/demos.md capturing two pitfalls confirmed end-to-end this week:

  • admin-cli lives in the master realm, not kagenti (admin token requests must hit /realms/master/...).
  • 'aud' not satisfied from AuthBridge on client_credentials tokens for clusters on operator ≤ v0.2.0-rc.5 — fixed in kagenti-operator#395 (issue kagenti-operator#394).

Three commits now: the original demos.md trim, the install.md CPU/secret doc, and the new gotchas. PR is MERGEABLE again.

@mrsabath
mrsabath requested review from esnible and huang195 June 4, 2026 00:48
@mrsabath
mrsabath force-pushed the docs/authbridge-demos-fix branch from d6fc07d to c216c5a Compare July 13, 2026 19:44
mrsabath added 3 commits July 13, 2026 21:45
Link to the weather UI demo for deployment. Document credentials, OAuth
clients, A2A on :8080, deploy verification commands, and inbound CLI checks.
Note 4-CPU Kind/Podman resource tips.

Fixes kagenti#1679

Signed-off-by: Mariusz Sabath <[email protected]>
Recommend 8 CPUs for typical Kind/Podman installs; note that 4 CPUs often
causes Shipwright build pods to stay Pending. Fix keycloak-admin-secret docs
to reflect operator 0.2+ storage in kagenti-system.

Fixes kagenti#1679

Signed-off-by: Mariusz Sabath <[email protected]>
Capture two pitfalls surfaced while running the weather agent demo:

- admin-cli lives in the master realm, not kagenti. Hitting the kagenti
  realm's token endpoint with admin credentials returns null and
  cascades into empty-token failures downstream.
- 'aud not satisfied' from AuthBridge for client_credentials tokens on
  operator <= v0.2.0-rc.5 — the agent's client was registered before
  the realm audience scope existed, so the SPIFFE audience never lands
  in the token. Linked to the issue and fix PR upstream.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
@mrsabath
mrsabath force-pushed the docs/authbridge-demos-fix branch from c216c5a to e066393 Compare July 14, 2026 01:45
@mrsabath
mrsabath marked this pull request as ready for review July 14, 2026 01:48
@mrsabath mrsabath added Ready for Review! ready-for-ai-review Request automated AI code review from clawgenti labels Jul 14, 2026
…bient mesh

The core Istio Gateway controller (istio-base + istiod) is always installed
and required for *.localtest.me:8080 ingress (gatewayClassName: istio), while
--with-istio is a separate optional ambient mesh. Note that the AuthBridge
weather demo does not need --with-istio.

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

@Alan-Cha Alan-Cha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code Review

Docs-only PR (2 files, +185/−198): trims docs/authbridge/demos.md ~40% by replacing duplicated UI walkthroughs with pointers to the kagenti-extensions demo guides, and corrects docs/install.md on the operator's Keycloak admin secret and local CPU/RAM guidance. I verified the substantive claims against the live kagenti charts, the installer script, and the kagenti-extensions repo — the high-stakes factual claims all check out.

Correctness — verified against source

  • ✅ Keycloak secret correction is accurate. charts/kagenti/values.yaml has exactly adminSecretName: keycloak-initial-admin, adminUsernameKey: username, adminPasswordKey: password, namespace: keycloak. The removed keycloak-admin-secret/adminExistingSecret chart values do not exist in the current chart, so removing that guidance is correct.
  • ✅ The --keycloak-admin-secret-namespace operator flag exists (kagenti-operator/cmd/main.go, manager.yaml).
  • ✅ CPU/RAM numbers match the installer. setup-kagenti.sh sets RECOMMENDED_MEMORY_MB=18432 / RECOMMENDED_CPUS=6, warn-only (never fails) — exactly as the new wording states.
  • ✅ Cross-repo links resolve on main: demo-ui.md, demo-ui-advanced.md, and token-exchange-routes/README.md all exist; #github-issue-agent-full-authbridge-flow matches the actual ### GitHub Issue Agent (Full AuthBridge Flow) heading.

Issues / Risks

  • ⚠️ Residual contradiction (out of scope, worth flagging). deployments/envs/secret_values.yaml.example still contains a keycloak: { adminUsername: admin, adminPassword: admin } block with a comment describing keycloak-admin-secret "for agent namespace secrets… used by the AuthBridge client-registration sidecar" — the exact model this PR now declares "invented" and removes from install.md. Either that example file is stale and should be cleaned up in a follow-up, or the AuthBridge sidecar path genuinely differs from the operator path (in which case the "invented chart values" framing is slightly too absolute). Recommend a follow-up issue to reconcile.
  • 🔸 Port/endpoint change is a real behavioral fix — confirm end-to-end. The doc moves from weather-service.team1.svc:8000/run with {"query": ...} to weather-service:8080/ with a JSON-RPC A2A message/send envelope. Consistent with the "Service fronts AuthBridge on 8080" verify step, but this is the one change a reviewer running the demo should confirm (the PR's own checklist leaves "follow Layer 1 after UI deploy" unchecked).
  • 🔸 JWT decode one-liner is fragile. The inline python3 -c "..." base64url decoder works but is hard to maintain in a doc. Minor; acceptable for a demo. The note that JWTs use base64url (not base64 -d) is a good correction.

Style

  • ✅ Good use of tables and blockquote callouts, consistent with existing file style.
  • 🔸 Unicode right-single-quote (U+2019) appears in the new install.md prose ("node's", "operator's") while the rest of the file uses ASCII '. Minor consistency nit.

Test Coverage / Security

  • N/A (docs). Test plan is appropriate; I independently reproduced the chart/installer verifications.
  • ✅ No secrets committed; retains the production note steering toward a dedicated service account over the admin account. The admin-cli/master-realm and audience-claim gotchas are accurate.

Verdict

Approve. Accurate, well-verified, reduces duplication and fixes genuinely wrong guidance. The one substantive follow-up is reconciling the stale deployments/envs/secret_values.yaml.example comment so the "invented values" claim isn't itself contradicted by a file still in the tree.

🤖 Generated with Claude Code

@clawgenti clawgenti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Docs-only cleanup across two files — all CI checks pass, all commits carry DCO sign-off, and the factual claims appear accurate based on the PR's own verification notes and the prior review by @Alan-Cha. One minor inconsistency: the second commit message says "Recommend 8 CPUs" but the actual table in install.md lists 6 CPUs as the recommended profile — the doc content looks correct; the commit headline is off.


Reviewed by clawgenti using github:pr-review

Comment thread docs/install.md

| Profile | RAM | CPUs | Typical install |
|---------|-----|------|-----------------|
| **Recommended** | 18 GiB | **6** | `--with-istio --with-spire --with-ui --with-backend` plus AuthBridge demos |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Commit 1553fa8 headline says "Recommend 8 CPUs" but the table here lists 6 CPUs as the recommended profile (--with-istio --with-spire --with-ui --with-backend plus demos). The doc content is internally consistent and matches setup-kagenti.sh (RECOMMENDED_CPUS=6) — the discrepancy is only in the commit message, so this is purely informational and does not affect the content.

Comment thread docs/authbridge/demos.md Resolved
Comment thread docs/authbridge/demos.md Resolved
Comment thread docs/authbridge/demos.md Resolved
Comment thread docs/authbridge/demos.md Resolved
Comment thread docs/authbridge/demos.md Resolved
…d why

Address review feedback that the walkthrough read as a bare series of
commands. Add a 'What AuthBridge does' intro + a 3-step 'how it works',
and a one-line 'what this proves' framing to each Layer, so a new reader
learns the value (sidecar-enforced identity, per-hop token delegation)
rather than just running curls. Also clarify the advanced demo's scope,
soften the deploy-vs-learn wording, and drop a duplicate mention of
87-setup-test-credentials.sh. Commands are unchanged.

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

@clawgenti clawgenti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Docs-only rewrite — content is accurate, well-structured, and the OAuth client guidance + credential gotchas address real user pain points. All CI passes.

Findings:

  • Commit subject lines use docs(scope): style without an emoji prefix; the Kagenti git:commit convention requires a leading emoji (e.g. 📝 docs(authbridge): …). Applies to all 5 feature commits.

Reviewed by clawgenti using github:pr-review

Comment thread docs/authbridge/demos.md Outdated

A progressive learning path that starts with seeing AuthBridge work transparently,
then peels back layers to show what's happening underneath.
**What AuthBridge does:** it's a sidecar proxy injected next to each agent that gives

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit / commit convention: The commit that introduces this section (docs(authbridge): trim demos.md…) has no emoji prefix. All Kagenti commits should start with a recognized emoji per git:commit conventions (e.g. 📝 docs(authbridge): trim demos.md…). Same applies to the other four commits in this PR.

Comment thread docs/authbridge/demos.md Resolved
Comment thread docs/authbridge/demos.md Resolved
…ibution

Address review feedback that the walkthrough was hard to follow for a
newcomer and that the assisting text was fragmentary.

- Fix the intro: SPIRE issues the SPIFFE identity; the operator registers
  the Keycloak OAuth client (previously conflated).
- Rewrite the fragmentary lead-ins and inline comments into complete,
  plain-English sentences that explain what each step does and what a
  healthy result looks like.
- Expand Layers 2-5 from one-line fragments into short explanations of
  what the layer demonstrates and what to look for.
- Promote two commands that were buried in prose (the oauth-secret-job
  wait and the Layer 3 rollout restart) into their own code blocks.
- Remove the duplicate mention of 87-setup-test-credentials.sh.

All executable commands are unchanged.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
@mrsabath

Copy link
Copy Markdown
Member Author

@Alan-Cha thanks for the thorough review — all your points are addressed in 3cc28482. I also stood the demo up end-to-end on a fresh Kind cluster while working through these, which surfaced a few more fixes.

Your comments:

  • "Just a series of commands / wouldn't learn anything" (L1): Rewrote the doc with a "What AuthBridge does" + "How it works" intro, and gave each Layer a real explanation of what it demonstrates and what to look for — not just commands.
  • Operator doesn't issue the SPIFFE ID (L11): Correct, my mistake. Fixed: SPIRE issues the SPIFFE identity; the operator registers the Keycloak OAuth client. AuthBridge does not package SPIRE.
  • Deploy seems separate from the guide (L27): Reworded — the demo-ui guide is where you learn to deploy; the checks here just confirm it.
  • No context on the advanced demo (L20): Now says it adds token exchange + per-tool JWTs (what powers Layer 2+).
  • Move the credential line up (L37): Consolidated — the "wait for the secret" guidance now lives inline in Credentials, and the duplicate was removed.
  • Script mentioned twice (L86): Deduped — 87-setup-test-credentials.sh now appears in the client table (what it creates) and once in Verify (where you run it).
  • Descriptions too short (L192): Expanded Layers 2–5 from fragments into full explanations.

Fragmentary prose: did a full pass — every fragment is now a complete sentence, and the inline command comments explain the why and the expected result. All executable commands are unchanged (verified by diff); I only reworded comments and promoted two commands that were buried in prose into their own code blocks.

From running it live (folded into the PR): the test-client was referenced as deploy/test-client but created as a bare pod; 87-setup-test-credentials.sh needs KEYCLOAK_URL=http://keycloak.localtest.me:8080 on a Kind install; and the agent card name is Weather Assistant, not weather_service.

Your secret_values.yaml.example catch: confirmed and out of scope here — filed as a follow-up: #2210.

mrsabath added 2 commits July 15, 2026 09:31
…mple

The keycloak: block in the (already deprecated) secret_values.yaml.example
described a keycloak-admin-secret created in agent namespaces for the
AuthBridge client-registration sidecar. That model no longer exists: the
operator reads keycloak-initial-admin from the keycloak namespace, and the
chart exposes no keycloak.adminUsername/adminPassword values. Remove the
block so the reference example does not contradict the corrected install.md.

Addresses the follow-up raised in review (previously tracked as #2210).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
@mrsabath

Copy link
Copy Markdown
Member Author

Update on the `secret_values.yaml.example` point: rather than leave it as a follow-up, I pulled the fix into this PR (commit 03b5953) — removed the stale `keycloak:` block from that (already deprecated) example, since its `keycloak-admin-secret` / agent-namespace comment no longer matches how the operator works. Issue #2210 is closed as superseded.

@clawgenti clawgenti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Docs-only update across three files — all CI checks pass, all feature commits carry DCO sign-off, and the factual corrections (keycloak-initial-admin secret location, CPU/RAM profiles, Istio gateway vs ambient mesh) are consistent with what a prior review by @Alan-Cha independently verified against the live charts and installer.

No blocking issues found. All checks pass. Ready for human review.


Reviewed by clawgenti using github:pr-review

@Alan-Cha Alan-Cha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Docs-only rewrite of the AuthBridge demo walkthrough and install guide — replaces stale/duplicated content with verified guidance and adds narrative context for newcomers. This PR was extensively pre-reviewed across its commit history (by me and the clawgenti bot); the one outstanding item from my earlier review round (a stale keycloak: block in deployments/envs/secret_values.yaml.example that contradicted the corrected install.md) is now resolved in the final commit.

I independently re-verified the newer claims added since that pass, against origin/main:

Claim Result
weather-service Service fronts AuthBridge on port 8080 (container listens on 8000) Confirmed — kagenti/examples/agents/weather_service_service.yaml
kagenti-test-user secret (keycloak ns, keys password/client_id/client_secret) created by 87-setup-test-credentials.sh Confirmed verbatim
kagenti-agent-oauth-secret-job job in kagenti-system Confirmed — charts/kagenti/templates/agent-oauth-secret-job.yaml
authbridge-proxy vs envoy-proxy container names by sidecar mode Confirmed verbatim — charts/kagenti/templates/kagenti-authbridge-scc.yaml
Agent card name "Weather Assistant" at /.well-known/agent.json Unverifiable locally — the container image lives in kagenti-extensions/agent-examples, not this repo. Port chain and path convention are both plausible; not a blocker given the PR's test plan states this was run live on a fresh Kind cluster.

No must-fix issues.

Author: mrsabath (MEMBER — maintainer)
Areas reviewed: Docs
Agent/IDE config (.claude/.vscode): none
Commits: 8 commits, 6 requiring sign-off, all signed-off (2 merge commits exempt)
CI status: passing (E2E HyperShift pending — manual trigger, not required)

@mrsabath

Copy link
Copy Markdown
Member Author

Heads-up on the latest merge (resolving a conflict from main): while this PR was open, main landed dbc812a9 (docs: refactor authentication guide into symmetric docs/authentication.md), which removed the same stale "Keycloak Admin Credentials for Agent Namespaces" section this PR was correcting and moved that content into a new dedicated docs/authentication.md.

Both changes were fixing the same wrong section, so I resolved the conflict by taking main's version in install.md — the short "Keycloak Authentication" pointer to authentication.md. That means the detailed Keycloak-secret correction from this PR's earlier commits is no longer in the install.md diff: it is superseded by authentication.md, which already states the corrected facts I verified live (keycloak-initial-admin in the keycloak namespace, and the adminSecretName / adminUsernameKey / adminPasswordKey config). Nothing was lost — the correct guidance now lives in one canonical place.

The PR's remaining install.md contributions (the "Local machine resources" CPU/RAM section and the "two Istio layers" note) were untouched by main and are preserved. The net diff versus main is just the three intended files.

All of your earlier inline comments are addressed and resolved above. Thanks again for the reviews.

@mrsabath
mrsabath merged commit cdba944 into rossoctl:main Jul 15, 2026
25 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Review! ready-for-ai-review Request automated AI code review from clawgenti

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

AuthBridge demo docs: outdated paths, missing deploy steps, wrong OAuth clients

3 participants