Fix a key location comparison in case of HS256 #819
Merged
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.
Fixes #817.
It is a minor follow up to #815.
In case of
HS256
the code onmain
checks if the resolvedLocation has been assigned to the MP JWT (public) key location property and fails if it is the case. But in #815, a newsmallrye.jwt.verify.secretkey
property is used thus the resolved location, even though it remains assigned by default to the MP JWT location, isNONE
.So this PR adds an extra check. Unfortunately tests in
testsuite/basic
for #815 are not using application.properties and it was missed. Tested at quarkusio/quarkus#42629, though as suggested earlier, some good clean up of tests and also of the initial bootstrap code would have to be done at some point