Files
zeekayandHanzo Dev 10eefd446b fix(authz): admit the cert id shape the BINARY sends; commit the probe as the gate
Fourth instance of one pattern in a day: verified with the bare id, the client
sends the org-qualified one. ai/internal/iam/cert.go:35 builds
"<IAM_ORG>/<name>" -> hanzo/cert-hanzo, while GetApplication hardcodes admin/ —
same clause, opposite directions, and only the spelling I happened to test worked.

SETTLED THE TRAP BEFORE GRANTING. admin/cert-hanzo and hanzo/cert-hanzo are two
DISTINCT rows, so granting blind risked cloud validating every bearer against the
wrong public key: green boot, total silent auth failure, no stack trace — strictly
worse than the crashloop. Measured instead: a real hanzo-cloud token carries
kid=cert-hanzo, and both rows carry the IDENTICAL 4096-bit modulus
(zE8fZcoJ_u4Uq…), which is the single key /v1/iam/.well-known/jwks publishes for
that kid. So the owner half selects between duplicates of ONE keypair, not between
keys, and the trap cannot fire.

They were seeded 3ms apart (…19.416479 and …19.419119) by the same run — seed
drift, a duplicate signing identity, reported separately. Nothing here depends on
which row wins, which is the point: name == p.AppCert remains the whole gate, so
an app reaches the one cert its own application row names and no other, whichever
owner it spells. Read-only, and Cert.Mask blanks PrivateKey, so this discloses the
PUBLIC key already published at the JWKS endpoint.

The probe manifest is now a committed artifact (test/probe/) with the rule written
down: derive the test id from what the client actually sends, by reading the
client. A green suite has now failed to predict production three times running;
the probe caught all three in seconds.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-26 19:40:58 -07:00
..