fix test access token signing key to 2048bit+ for valid testing #2339
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
Upgrade signing keys less than 2048bit to 2048bit or more used for Access Token Testing.
Background
The test we initially wanted to conduct is one where the signature verification fails because the key used for the signature differs from the
kid
in the Access Token header.However, because the test key was less than 2048bit, the signature verification was failing with the following error. As the test is expecting the signature verification to fail, the test is considered a success.
The tests in question are as follows.
athenz/clients/java/zpe/src/test/java/com/yahoo/athenz/zpe/TestAuthZpe.java
Lines 1418 to 1433 in 76882ee
athenz/clients/java/zpe/src/test/java/com/yahoo/athenz/zpe/TestAuthZpe.java
Lines 973 to 987 in 76882ee
The error we were expecting is as follows:
The signing key impacted this time is
unit_test_zts_private_k1.pem
. Upgrading other test keys to 2048 bits or more might be worth considering, but we have not made any adjustments since these keys are not being used as the Access Token's signing key and therefore, not strictly necessary.