oscerd opened a new pull request, #31350: URL: https://github.com/apache/camel/pull/31350
# Description Fixes [CAMEL-28106](https://issues.apache.org/jira/browse/CAMEL-28106). In `camel-pqc`, `MAYO` and `SNOVA` are supported signature algorithms in `PQCSignatureAlgorithms` with named defaults in `PQCDefaultMAYOMaterial` (`mayo5`) and `PQCDefaultSNOVAMaterial` (`SNOVA_24_5_5_SHAKE_SSK`), but `KeyAlgorithmSupport.getDefaultParameterSpec(String)` omitted both algorithms and fell back to `initialize(256, ...)` on Bouncy Castle `KeyPairGenerator` implementations that only accept named `AlgorithmParameterSpec` instances. Changes: - Add `MAYO` (`mayo5`) and `SNOVA` (`SNOVA_24_5_5_SHAKE_SSK`) default parameter spec mappings in `KeyAlgorithmSupport.getDefaultParameterSpec(String)`. - Replace the `256`-bit integer key size fallback in `KeyAlgorithmSupport.generateKeyPair` with an explicit `IllegalArgumentException` when no default parameter spec is available for an algorithm. - Delegate `AwsSecretsManagerKeyLifecycleManager.generateKeyPair` and `HashicorpVaultKeyLifecycleManager.generateKeyPair` to `KeyAlgorithmSupport.generateKeyPair` so all five `KeyLifecycleManager` implementations share the same key-generation path. - Update `rotateKey` in `AwsSecretsManagerKeyLifecycleManager`, `HashicorpVaultKeyLifecycleManager`, `InMemoryKeyLifecycleManager`, `FileBasedKeyLifecycleManager`, and `AzureKeyVaultKeyLifecycleManager` to generate the replacement key pair before marking the existing key `DEPRECATED`. - Add `KeyAlgorithmSupportTest` verifying default parameter spec coverage across all `PQCSignatureAlgorithms` and `PQCKeyEncapsulationAlgorithms` values, `MAYO`/`SNOVA` key generation and rotation, and fail-closed behavior for unmapped algorithms. # Testing - Ran `components/camel-pqc` unit tests (`../../mvnw -B test` with private local repository): `Tests run: 482, Failures: 0, Errors: 0, Skipped: 1`. - Full reactor build was not run in this step. # Target - [x] I checked that my changes are compatible with the targeted branch (`main`). _Antigravity on behalf of oscerd_ -- 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]
