Skip to content

Commit 634f6d6

Browse files
committed
docs(cpex): close remaining PR #493 review nits
Final sweep to ensure every Hai Huang comment is addressed: - cpex-policy.yaml: add a DEMO ONLY banner — the file embeds hardcoded client secrets (client_secret_source.kind: literal) over plaintext http to a local Keycloak. Addresses the "kind: literal secrets want a demo-only banner" nit (previously only realm-export.json was banner'd). - cmf_a2a_test.go: TestA2AResponseBodyMod_RewritesArtifact now asserts the ORIGINAL secret is absent after redaction, not just that the redacted string is present (the reviewer's explicit ask — a partial rewrite would satisfy presence-only). - README.md: correct the OPA/PDP note — the demo DOES exercise the embedded `cedar` PDP (scenario 05 → cpex.cedar_default_deny); only the external `opa(...)` / `authzen(...)` steps are doc-level BYOP examples. Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
1 parent 7da57be commit 634f6d6

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

authbridge/authlib/plugins/cpex/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ checks pass; their decisions feed the same `on_deny` / `on_allow` effect lists.
152152
> effects, session tainting, and ordered composition with other PDPs.
153153
> Use the native `opa` plugin for standalone binary OPA gates; use
154154
> CPEX's `opa(...)` when OPA participates in a multi-PDP orchestration
155-
> flow. The `authzen(...)` and `cedar` steps are doc-level BYOP examples
156-
> not exercised in this demo.
155+
> flow. Note: the CPEX `opa(...)` and `authzen(...)` steps above are
156+
> doc-level BYOP examples — the hr-cpex demo exercises only the embedded
157+
> `cedar` PDP, not external OPA/AuthZEN.
157158

158159
## CMF / extension mapping
159160

authbridge/authlib/plugins/cpex/cmf_a2a_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ func TestA2AResponseBodyMod_RewritesArtifact(t *testing.T) {
120120
if want := "leaked [REDACTED]"; !jsonContains(t, pctx.ResponseBody, want) {
121121
t.Fatalf("artifact not redacted in %s", pctx.ResponseBody)
122122
}
123+
// Assert the original secret is GONE, not merely that the redacted
124+
// string is present (a partial rewrite would satisfy the latter).
125+
if contains(string(pctx.ResponseBody), "123-45-6789") {
126+
t.Fatalf("original secret still present after redaction: %s", pctx.ResponseBody)
127+
}
123128
}
124129

125130
func TestA2AResponseBodyMod_MultiPartFailsClosed(t *testing.T) {

authbridge/demos/hr-cpex/k8s/cpex-policy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CPEX runtime config for the HR demo.
22
#
3+
# DEMO ONLY — this file embeds hardcoded client secrets
4+
# (client_secret_source.kind: literal) and points at a local Keycloak
5+
# over plaintext http. Do NOT use in production: source secrets from a
6+
# mounted file / Secret (kind: file) and use TLS to the IdP.
7+
#
38
# ── How to read this file ───────────────────────────────────────────
49
# The `routes:` block at the BOTTOM is the story: three tool routes,
510
# one per demo act, each spelling out the authorization chain for that

0 commit comments

Comments
 (0)