[ 
https://issues.apache.org/jira/browse/IGNITE-29212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anton Vinogradov updated IGNITE-29212:
--------------------------------------
    Description: 
Operators configure HTTPS for Ignite's HTTP REST endpoint in {{jetty.xml}}. 
They should be able to replace its keys or trusted certificates and run 
{{control.sh --ssl reload}} without restarting the node.

h3. Use Jetty's reload API

On each node serving HTTPS, use the TLS factory of the running Jetty connector. 
Call {{SslContextFactory.reload(...)}} on that instance so the factory loads 
the replacement from its configured source. This keeps the existing Jetty TLS 
settings and works with custom factories. If the factory supports automatic 
updates and they are enabled, it should also apply replacements without a 
command.

Jetty 12.1.14's standard factory clears its active TLS state before loading the 
replacement. If loading fails, the endpoint can lose the ability to accept new 
HTTPS connections. Keep the last working TLS state available until the 
replacement succeeds, so the endpoint can recover even if the configured store 
is still unreadable.

h3. Expected behavior

Established connections stay open. A new HTTPS connection may briefly fail 
while a reload is in progress. Once the attempt finishes:
* On success, new connections use the replacement. The command reports {{HTTP 
REST}} as reloaded on that node.
* On failure, new connections work again with the previous certificate and 
trust settings. Recovery is automatic. The command reports the affected node 
and the cause of the failed reload, even if recovery succeeded.

Verify with a running HTTPS endpoint that presents certificate A. Replace its 
key store with an unreadable one and run the command. While that file is still 
in place, a fresh HTTPS client must be able to connect and see A. Then install 
a valid store containing certificate B and rerun the command. A fresh client 
must see B.

  was:
Operators configure HTTPS for Ignite's HTTP REST endpoint in {{jetty.xml}}. 
They should be able to rotate its certificates without restarting the node, 
using the TLS settings and factory already configured there.

After replacing keys or trusted certificates in the configured source, an 
operator can run {{control.sh --ssl reload}}. On each node serving HTTPS, the 
command should report {{HTTP REST}} as reloaded only after the factory 
completes the reload. If it fails, the result should identify the node and the 
cause.

After a successful reload, new HTTPS connections use the replacement 
certificates and established connections stay open. When the configured factory 
supports automatic updates and they are enabled, new connections should also 
pick up replacements without a command.

Verify the rotation by checking the certificate presented to a new HTTPS 
client. Document how to recover if a reload fails. With the standard Jetty 
factory, recovery can require restoring a valid store and running the command 
again.


> Reload HTTP REST certificates from the Jetty configuration
> ----------------------------------------------------------
>
>                 Key: IGNITE-29212
>                 URL: https://issues.apache.org/jira/browse/IGNITE-29212
>             Project: Ignite
>          Issue Type: Sub-task
>            Reporter: Anton Vinogradov
>            Assignee: Anton Vinogradov
>            Priority: Major
>              Labels: ise
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> Operators configure HTTPS for Ignite's HTTP REST endpoint in {{jetty.xml}}. 
> They should be able to replace its keys or trusted certificates and run 
> {{control.sh --ssl reload}} without restarting the node.
> h3. Use Jetty's reload API
> On each node serving HTTPS, use the TLS factory of the running Jetty 
> connector. Call {{SslContextFactory.reload(...)}} on that instance so the 
> factory loads the replacement from its configured source. This keeps the 
> existing Jetty TLS settings and works with custom factories. If the factory 
> supports automatic updates and they are enabled, it should also apply 
> replacements without a command.
> Jetty 12.1.14's standard factory clears its active TLS state before loading 
> the replacement. If loading fails, the endpoint can lose the ability to 
> accept new HTTPS connections. Keep the last working TLS state available until 
> the replacement succeeds, so the endpoint can recover even if the configured 
> store is still unreadable.
> h3. Expected behavior
> Established connections stay open. A new HTTPS connection may briefly fail 
> while a reload is in progress. Once the attempt finishes:
> * On success, new connections use the replacement. The command reports {{HTTP 
> REST}} as reloaded on that node.
> * On failure, new connections work again with the previous certificate and 
> trust settings. Recovery is automatic. The command reports the affected node 
> and the cause of the failed reload, even if recovery succeeded.
> Verify with a running HTTPS endpoint that presents certificate A. Replace its 
> key store with an unreadable one and run the command. While that file is 
> still in place, a fresh HTTPS client must be able to connect and see A. Then 
> install a valid store containing certificate B and rerun the command. A fresh 
> client must see B.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to