Skip to content

SOLR-18235 Remove support for old PKI auth v1#4405

Open
janhoy wants to merge 4 commits intoapache:mainfrom
janhoy:SOLR-18235-remove-pki-v1
Open

SOLR-18235 Remove support for old PKI auth v1#4405
janhoy wants to merge 4 commits intoapache:mainfrom
janhoy:SOLR-18235-remove-pki-v1

Conversation

@janhoy
Copy link
Copy Markdown
Contributor

@janhoy janhoy commented May 8, 2026

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

Copy link
Copy Markdown
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

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.

Comment thread solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc Outdated

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do like that our Ref Guide isn't littered with a ton of "history lessons" ;-). So.. maybe this is just a nit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think they can check changelog if they are curous :)

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants