SOLR-18235 Remove support for old PKI auth v1#4405
SOLR-18235 Remove support for old PKI auth v1#4405janhoy wants to merge 4 commits intoapache:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Removes the deprecated PKI Authentication protocol v1 (used for Solr 8.x -> 9.x rolling upgrades), leaving only the v2 SolrAuthV2 header/signature mechanism for inter-node authentication and updating docs/changelog accordingly.
Changes:
- Remove v1 protocol negotiation (sysprops
solr.pki.sendVersion,solr.pki.acceptVersions), v1 header handling (SolrAuth), and associated token generation/parsing code paths. - Simplify inter-node authentication detection and always emit/expect
SolrAuthV2. - Update/refocus tests and reference guide / upgrade notes; add changelog entry.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc | Adds Solr 10.1 upgrade note about PKI v1 removal; minor formatting cleanup. |
| solr/solr-ref-guide/modules/deployment-guide/pages/authentication-and-authorization-plugins.adoc | Removes v1 protocol documentation and describes v2 header format. |
| solr/core/src/test/org/apache/solr/security/TestPKIAuthenticationPlugin.java | Removes v1-related test logic and adds a legacy-header rejection test. |
| solr/core/src/test/org/apache/solr/cloud/TestRSAKeyPair.java | Deletes RSA encrypt/decrypt roundtrip test (previously used for v1-related crypto behavior). |
| solr/core/src/java/org/apache/solr/util/CryptoKeys.java | Removes RSA “raw” encrypt/decrypt helpers and key-size plumbing only used by v1. |
| solr/core/src/java/org/apache/solr/servlet/AuthenticationFilter.java | Treats only SolrAuthV2 as the internode PKI marker. |
| solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java | Removes v1 support paths/constants/caches; always generates and validates v2 tokens. |
| changelog/unreleased/SOLR-18235-remove-pki-v1.yml | Adds unreleased changelog entry for v1 removal and sysprop deprecation removal. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| There are currently two versions of the PKI Authentication protocol available in Solr. For each outgoing request `PKIAuthenticationPlugin` adds a special header which carries the request timestamp and user principal. | ||
| When a node receives a request with this special header, it will verify to message using the corresponding source node's public key. | ||
| For each outgoing request `PKIAuthenticationPlugin` adds a `SolrAuthV2` header which contains: the source node name, user principal, request timestamp, and a base64-encoded RSA signature. |
There was a problem hiding this comment.
Will someone brand new to solr be confused by a SolrAuthV2 property and ownder about SolrAuthV1. Do we need a tip or a link to the upgrade notes? I guess we can't just use the name SolrAuth eitehr...
There was a problem hiding this comment.
I do like that our Ref Guide isn't littered with a ton of "history lessons" ;-). So.. maybe this is just a nit.
There was a problem hiding this comment.
I think they can check changelog if they are curous :)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
https://issues.apache.org/jira/browse/SOLR-18235
The v1 feature was only needed for 8.x->9.x upgrades, and have been printing deprecation warnings in logs when in use. Safe to remove. Lots of code going away!
PR developed with AI assistance, plus manual review and some manual rewrite of the upgrade note