urunni88 commented on PR #30151:
URL: https://github.com/apache/camel/pull/30151#issuecomment-6914935999

   Thanks @davsclaus, the points are addressed in 9a776e4:
   
   1. Fail fast: `assertJwtKeystoreHasKey` throws an `IllegalArgumentException` 
at startup, in the same style as `assertIssuerOrAudienceConfigured`.
   2. It calls `keyStore.getEntry(<alg>, new 
KeyStore.PasswordProtection(password))` for the algorithms of `JWK.load`, and 
fails when none returns an entry.
   3. A keystore that is not found or cannot be loaded now fails too.
   4. `KeyStore.getDefaultType()` is used when `jwtKeystoreType` is not set.
   5. Added an entry to the 4.24 upgrade guide.
   6. `JWTKeystoreAliasesTest` writes the keystores in a `@TempDir`: no 
matching alias, a key with another password (a JCEKS file for that case), type 
not set, a valid keystore, and a keystore that is not found.
   
   Nits: the classpath lookup tries the TCCL first, and the hint now says "the 
algorithm of the key, for example RS256 for an RSA key".
   
   One more thing came up: the keystore of the existing JWT tests had its key 
under the alias `test-camel-main-auth-jwt`, so those tests ran in unsecured 
mode and never checked a signature. I renamed the alias to `RS256`, and the 
tests now sign their tokens with RS256.


-- 
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