Skip to content

SOLR-18270: cert auth plugin : add request attribute parametrization#4479

Open
heitzjm wants to merge 4 commits into
apache:mainfrom
heitzjm:SOLR_18270_CERT_AUTH_PLUGIN_REQUEST_ATTRIBUTE_PARAM
Open

SOLR-18270: cert auth plugin : add request attribute parametrization#4479
heitzjm wants to merge 4 commits into
apache:mainfrom
heitzjm:SOLR_18270_CERT_AUTH_PLUGIN_REQUEST_ATTRIBUTE_PARAM

Conversation

@heitzjm
Copy link
Copy Markdown

@heitzjm heitzjm commented May 30, 2026

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

Description

The parameter used by the cert auth plugin to get the SSL client certificate can be configured in security.json, as the attribute name changed (java EE => jakarta EE)

Solution

This PR adds the parameter and its usage, as well as adds some tests, and updates the documentation.

Tests

Class solr/core/src/test/org/apache/solr/security/CertAuthPluginRequestAttributeTest.java : adds parametrized test to ensure that the default value works, and that a custom value is taken into account. The class heavily borrows code from solr/core/src/test/org/apache/solr/security/CertAuthPluginTest.java

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
> Task :solr:core:test
:solr:core:test (FAILURE): 5586 test(s), 1 failure(s), 183 skipped

5586 tests completed, 1 failed, 183 skipped

> Task :solr:solr-ref-guide:test
:solr:solr-ref-guide:test (SUCCESS): 40 test(s)
 
...

ERROR: The following test(s) have failed:
  - org.apache.solr.TestDistributedGrouping.test (:solr:core)
    Test history: https://develocity.apache.org/scans/tests?search.rootProjectNames=solr-root&tests.container=org.apache.solr.TestDistributedGrouping&tests.test=test http://fucit.org/solr-jenkins-reports/history-trend-of-recent-failures.html#series/org.apache.solr.TestDistributedGrouping.test
    Test output: /tmp/SOLR/solr/core/build/test-results/test/outputs/OUTPUT-org.apache.solr.TestDistributedGrouping.txt
    Reproduce with: ./gradlew :solr:core:test --tests "org.apache.solr.TestDistributedGrouping.test" "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=34687A3DF4AB53C4 -Ptests.useSecurityManager=true -Ptests.file.encoding=ISO-8859-1

The test failed because of a timeout. I reran the test only after that, and it then succeeded.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests cat:security labels May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:security documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant