An audit was performed to verify the usage of JWT extraction functions across the Lianxi codebase, specifically focusing on extract_jti_from_jwt and decode_jwt_claims.
Findings:
decode_jwt_claims(and its wrapper functions likeextract_jti_from_jwt) correctly decode the payload section without performing cryptographic signature validation.- All instances of
decode_jwt_claimsandextract_jti_from_jwtacrosstrust_gateway,agent_in_a_box/host, andssi_mcp_runtimewere reviewed. - None of these functions are used for making authorization decisions. They are strictly used for identity extraction, correlation (JTI nonce store), and auditing purposes.
- All authorization decisions are correctly delegated to the
ssi_vaultor upstream identity providers where signature verification occurs.
Action Taken:
- Added a
#[must_use]attribute to all JWT extraction functions inidentity_contextto prevent accidental misuse. - Added explicit documentation to
decode_jwt_claimswarning developers that the function does not verify signatures and thatssi_vaultmust be used for authorization.