[ 
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, call {{SslContextFactory.reload(...)}} on the TLS 
factory of the running Jetty connector. Preserve the TLS settings from 
{{jetty.xml}}. The command asks the configured factory to load and apply the 
current keys and trust settings immediately. A custom factory can obtain its 
keys from an external source. If automatic updates are enabled, it can also 
apply keys delivered by that source without waiting for a command or fetching 
the same keys again.

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. After a manual or automatic reload:
* On success, new connections use the replacement.
* On failure, the endpoint automatically resumes accepting connections with the 
certificate and trust settings from the most recent successful update.

For a manual reload, report {{HTTP REST}} as reloaded on that node only after 
the replacement takes effect. If the reload fails, report the node and cause 
even when recovery succeeds.

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.

For a custom factory, start with certificate A and have its source deliver B. 
Verify that a fresh HTTPS client sees B. Then make the trust store unreadable 
and run the command. After it reports the error, a fresh client must still see 
B while the store is unreadable.

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


> 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, call {{SslContextFactory.reload(...)}} on the TLS 
> factory of the running Jetty connector. Preserve the TLS settings from 
> {{jetty.xml}}. The command asks the configured factory to load and apply the 
> current keys and trust settings immediately. A custom factory can obtain its 
> keys from an external source. If automatic updates are enabled, it can also 
> apply keys delivered by that source without waiting for a command or fetching 
> the same keys again.
> 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. After a manual or automatic reload:
> * On success, new connections use the replacement.
> * On failure, the endpoint automatically resumes accepting connections with 
> the certificate and trust settings from the most recent successful update.
> For a manual reload, report {{HTTP REST}} as reloaded on that node only after 
> the replacement takes effect. If the reload fails, report the node and cause 
> even when recovery succeeds.
> 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.
> For a custom factory, start with certificate A and have its source deliver B. 
> Verify that a fresh HTTPS client sees B. Then make the trust store unreadable 
> and run the command. After it reports the error, a fresh client must still 
> see B while the store is unreadable.



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

Reply via email to