Skip to content

Conversation

@janhoy
Copy link
Contributor

@janhoy janhoy commented Jan 14, 2026

https://issues.apache.org/jira/browse/SOLR-18073

Thanks to Tony Panza for bug report with failing unit test

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the JWT Authentication plugin where non-string claims (such as boolean values) could not be matched during authentication. The fix converts claim values to strings before pattern matching, enabling support for boolean and other non-string claim types as specified in the OIDC specification.

Changes:

  • Modified claim matching logic to handle non-string claim values by converting them to strings
  • Added test coverage for boolean claim matching scenarios
  • Added changelog entry documenting the bug fix

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
solr/modules/jwt-auth/src/java/org/apache/solr/security/jwt/JWTAuthPlugin.java Changed from getStringClaimValue() to getClaimValue() with String.valueOf() conversion to support non-string claims
solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginTest.java Added boolean claims to test data and comprehensive test method for boolean claim matching
changelog/unreleased/SOLR-18073-jwt-bool-claims.yml Added changelog entry for the bug fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants