Repository navigation
IGNITE-29212 Reload HTTP REST certificates from the Jetty configuration - #13874
Open
anton-vinogradov wants to merge 6 commits into
Open
anton-vinogradov wants to merge 6 commits into
anton-vinogradov wants to merge 6 commits into
Conversation
The reload command and the hourly hot reload check now reload the TLS factory of the Jetty HTTPS connector. The whole reload runs under the factory's lock. If loading fails, the factory gets its previous context back, so new connections never see a factory without keys. Hot reload runs for every factory without settings. A certificate is due before it expires by a third of its lifetime, but by no more than 7 days. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed reload now makes the Jetty factory load its previous key and trust stores from memory. Giving it back the previous SSLContext skipped Jetty's SNI tables, so with sniRequired every handshake failed. The reload holds the factory's lock through unload(...), so a custom reload(...) runs once per successful reload. The hot reload date is read from the keys that new connections use, so it follows replacements that the factory installed by itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The adapter no longer caches the hot reload date or handles a factory that a reload outside Ignite left without keys: the date is read from the factory, and such a factory is reported as a failure. The stores to restore are plain local variables. The tests drop the node-level check of a failed hot reload, which runs the same code as a failed manual reload, and merge the two hot reload date tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each registered factory gets its reload operations when it is registered: an Ignite factory through a small adapter, the Jetty factory as is. The hourly check and the reload command use these entries, so the registry no longer checks factory types in several places, and the command no longer passes factories back for a lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the HTTPS test ReloadableSslFactory now serves every registered factory, so its javadoc no longer limits it to non-Ignite factories, and the date it returns is the one of the keys that new connections use. A factory registered by a second transport keeps its reload operations. The metrics page no longer mentions hot reload configuration. The HTTPS test explains why it sets IGNITE_JETTY_PORT and builds its only standalone factory inline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IGNITE-29212 lets operators reload the keys and trusted certificates of the HTTP REST endpoint that Jetty serves over HTTPS, without restarting the node.
control.sh --ssl reloadand automatic hot reload now cover this endpoint, and hot reload runs for every factory without settings.Behavior
HTTP REST. The reload command and the hourly hot reload check call the factory'sreload(...)once per reload. The factory keeps itsjetty.xmlsettings and reads its own source, so standard and custom Jetty factories work the same way.SSLContextand its key and trust stores before it releases the Jetty factory lock. Jetty selects the certificate for each SNI host from that key store. Recovery works even while the source is unavailable. The next attempt uses the sources configured injetty.xml, including any stores supplied directly.KeyStoreScanner.HTTP REST: reloaded, or the node and the cause. Hot reload logs its attempts forHTTP RESTand counts them in thesslmetrics, like other transports.KeyStoreScanner, has left the factory without keys, the command and hot reload report it as a failure. That mechanism recovers the factory once its source is fixed.Hot reload without settings
API changes
Removed from
AbstractSslContextFactory. None of them has been released. Configurations that set these properties, for example in Spring XML, must drop them:Tests
JettyRestHttpsReloadTeststarts a node with HTTPS from Jetty XML and checks the certificate that a new HTTPS client sees:reload(...)once.The core tests check the new lead time rule and the registry without the hot reload switch.
🤖 Generated with Claude Code