Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.6] Fix the condition for logging empty JWK sets. (#91675) #91678

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ public void close() {
}

private void logWarnIfAuthenticationWillAlwaysFail() {
final boolean hasUsableJwksAndAlgorithms = (hmacJwtSignatureValidator != null && hmacJwtSignatureValidator.jwksAlgs.isEmpty())
|| (pkcJwtSignatureValidator != null && pkcJwtSignatureValidator.jwkSetLoader.getContentAndJwksAlgs().jwksAlgs().isEmpty());
final boolean hasUsableJwksAndAlgorithms = (hmacJwtSignatureValidator != null
&& false == hmacJwtSignatureValidator.jwksAlgs.isEmpty())
|| (pkcJwtSignatureValidator != null
&& false == pkcJwtSignatureValidator.jwkSetLoader.getContentAndJwksAlgs().jwksAlgs().isEmpty());
if (false == hasUsableJwksAndAlgorithms) {
logger.warn(
"No available JWK and algorithm for HMAC or PKC. JWT realm authentication expected to fail until this is fixed."
Expand Down