oscerd opened a new pull request, #25307:
URL: https://github.com/apache/camel/pull/25307

   Backport of #25259 (CAMEL-24319) to `camel-4.18.x`, following the sibling 
`expectedAudience` opt-in that was backported to 4.18.4 (CAMEL-23875, #24540).
   
   Adds two **opt-in**, default-off settings to `KeycloakSecurityPolicy`:
   - **`expectedTokenTypes`** — allow-list of accepted `typ` values (guards 
against token-type confusion, e.g. an ID/refresh token used as an access token)
   - **`expectedAuthorizedParty`** — expected `azp` value (token issued for the 
expected client)
   
   Both are enforced on **all three** token-validation paths 
(`authenticateToken`, `validateRoles`, `validatePermissions`), for both local 
JWT verification and token introspection — including the `validatePermissions` 
coverage that gnodet's review of #25259 added.
   
   Non-breaking (disabled by default). Tests green 
(`KeycloakSecurityHelperTest` 27, `KeycloakSecurityProcessorTest` 11). The 
documentation page is main-only, so no doc change here (consistent with the 
4.18.x aud backport).
   
   Jira: https://issues.apache.org/jira/browse/CAMEL-24319
   
   ---
   _Authored by Claude Code on behalf of Andrea Cosentino._
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to