feat(#4521): AGNTCY Identity badge verify — agents-kt-identity module#219
Merged
Conversation
The trust pillar of the AGNTCY epic (#4517), beside the OASF discovery record (#4518) and A2A invocation. Verify-only; issuance is deferred to the self-hosted stack. - IdentityVerifier.verify(compactJws, jwks): validates a JOSE/JWS-secured W3C VC badge against an issuer JWKS, returns VerifiedBadge or throws BadgeVerificationException. Fail-closed and NOT hand-rolled — delegates to nimbus-jose-jwt's DefaultJWTProcessor. Negative tests cover every forgery class: alg=none, HS* algorithm-confusion, tamper, expiry, wrong key, unknown kid. - IdentityResolver.fetchJwks(url) / fetchText(url): bounded (timeouts + size cap) reads of /.well-known/jwks.json and vcs.json. vcs.json returned raw (AGNTCY VC envelope still settling upstream); the cryptographic verify is the stable core. - New feature module agents-kt-identity (package agents_engine.agntcy.identity) so the nimbus dependency stays out of core — the agents-kt-rag pattern. Lockfile + sha256 verification-metadata for nimbus-jose-jwt 10.3 (no transitives). - 8 tests. README + CHANGELOG + PRD §12.6 + internals adjunct updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
AGNTCY Identity badge verify — the trust pillar of epic #4517, beside the OASF discovery record (#4518) and A2A invocation (§12.5). In a trust-gated agent network you accept work only from agents whose badge a known issuer signed. Verify-only; issuance (keys/signing/vaults) is deferred to the self-hosted stack (PRD §12.6).
What landed
IdentityVerifier.verify(compactJws, jwks)— validates a JOSE/JWS-secured W3C VC badge against an issuer JWKS (/.well-known/jwks.json), returningVerifiedBadge(issuer / subject /credentialSubject) or throwingBadgeVerificationException.nimbus-jose-jwtDefaultJWTProcessor. Negative tests cover every forgery class:alg: none,HS*algorithm-confusion (sign HMAC with the public key), tamper, expiry, wrong key, unknownkid.DEFAULT_ALGORITHMSis asymmetric-only.IdentityResolver— bounded (timeouts + size cap) fetch ofjwks.json/vcs.json.vcs.jsonis returned raw (AGNTCY VC envelope still settling upstream per W3C VCDM 2.0); the cryptographic verify is the stable, standards-grounded core.agents-kt-identity(packageagents_engine.agntcy.identity) so the JOSE dependency stays out of core — theagents-kt-ragpattern. Lockfile + sha256 verification-metadata fornimbus-jose-jwt:10.3(no transitives).Gates
Full
./gradlew buildgreen across all modules (incl. the new module, detekt,DocsConsistencyTest, internals-agent validation, dependency-verification). 8 tests.README + CHANGELOG + PRD §12.6 + internals adjunct updated. Remaining #4517 subtasks: DIR client (#4520), OASF import/validate (#4519).
🤖 Generated with Claude Code