[
https://issues.apache.org/jira/browse/IGNITE-29212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anton Vinogradov updated IGNITE-29212:
--------------------------------------
Description:
h3. Goal
Let operators reload the keys and trusted certificates that Jetty uses for
Ignite’s HTTP REST endpoint. An operator can update the configured source and
run {{control.sh --ssl reload}} without restarting the node.
h3. Design decisions and constraints
* *Keep the existing Jetty configuration.* Use the TLS factory already serving
HTTPS, with its settings from {{jetty.xml}}. This applies to both standard and
custom factories. Operators should not have to configure HTTPS a second time in
Ignite.
* *Let the factory load its keys.* The command requests an immediate reload. If
the factory supports automatic updates and they are enabled, it also applies
replacements from its source. A source can deliver new keys directly without
the factory having to fetch them again.
* *Recover from a failed reload.* Established connections stay open. A new
connection may briefly fail during reload. After a failure, HTTPS must
automatically accept new connections with the last working keys and trust
settings, even while the source remains unreadable. If an automatic update
installed certificate B, clients must still see B after a failed manual reload.
* *Report what happened on each node.* The command reports {{HTTP REST}} as
reloaded once new connections can use the replacement. On failure it reports
the node and the cause, even if HTTPS recovered. The operator can fix the
source and retry the same command.
h3. Implementation idea
On each node serving HTTPS, obtain the TLS factory from the running Jetty
connector and call {{SslContextFactory.reload(...)}} on that instance. Jetty
12.1.14’s standard factory clears its active TLS state before loading the
replacement. One way to recover is to retain the last working keys and trust
settings and reuse them if loading fails.
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, 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.
> 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
>
> h3. Goal
> Let operators reload the keys and trusted certificates that Jetty uses for
> Ignite’s HTTP REST endpoint. An operator can update the configured source and
> run {{control.sh --ssl reload}} without restarting the node.
> h3. Design decisions and constraints
> * *Keep the existing Jetty configuration.* Use the TLS factory already
> serving HTTPS, with its settings from {{jetty.xml}}. This applies to both
> standard and custom factories. Operators should not have to configure HTTPS a
> second time in Ignite.
> * *Let the factory load its keys.* The command requests an immediate reload.
> If the factory supports automatic updates and they are enabled, it also
> applies replacements from its source. A source can deliver new keys directly
> without the factory having to fetch them again.
> * *Recover from a failed reload.* Established connections stay open. A new
> connection may briefly fail during reload. After a failure, HTTPS must
> automatically accept new connections with the last working keys and trust
> settings, even while the source remains unreadable. If an automatic update
> installed certificate B, clients must still see B after a failed manual
> reload.
> * *Report what happened on each node.* The command reports {{HTTP REST}} as
> reloaded once new connections can use the replacement. On failure it reports
> the node and the cause, even if HTTPS recovered. The operator can fix the
> source and retry the same command.
> h3. Implementation idea
> On each node serving HTTPS, obtain the TLS factory from the running Jetty
> connector and call {{SslContextFactory.reload(...)}} on that instance. Jetty
> 12.1.14’s standard factory clears its active TLS state before loading the
> replacement. One way to recover is to retain the last working keys and trust
> settings and reuse them if loading fails.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)