Skip to content

IGNITE-29212 Configure HTTPS for HTTP REST with a reloadable SSL context factory - #13854

Open
anton-vinogradov wants to merge 19 commits into
apache:masterfrom
anton-vinogradov:ignite-29212-impl
Open

anton-vinogradov wants to merge 19 commits into
apache:masterfrom
anton-vinogradov:ignite-29212-impl

Conversation

@anton-vinogradov

@anton-vinogradov anton-vinogradov commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

IGNITE-29212 lets HTTP REST serve HTTPS from an SSL context factory, so that the TLS reload command and automatic hot reload apply to it like to the TCP transports.

Configuration

  • ConnectorConfiguration.httpSslFactory enables HTTPS on the built-in HTTP connector or on the connector of the Jetty XML configuration. That connector must serve plain HTTP and must not configure TLS itself.
  • ConnectorConfiguration.httpSslClientAuth requires a client certificate that the factory trusts.
  • The node fails to start before the connector opens if the connector configures TLS, if its default protocol is not HTTP, or if httpSslClientAuth is set without httpSslFactory.
  • HTTPS configured directly in Jetty XML keeps working as before and stays outside reload.

Behavior

  • Jetty takes the current context of the factory for each new connection. During a reload and after a failed one, new connections use the previous context. After a successful reload they use the replacement, and established connections stay open.
  • Once HTTP REST has started, it is registered as the HTTP REST transport. The reload command reports it, and automatic hot reload schedules it when the factory supports hot reload and has it enabled. If Jetty cannot bind any port, HTTP REST is not registered.
  • Connections enable exactly the protocols and cipher suites that the factory enables.
  • Jetty checks the request host against the server certificate unless the Jetty XML configuration has a secure request customizer that turns the check off.
  • The node starts and stops a LifecycleAware HTTP REST factory once, also when binary REST uses the same instance.

API changes

New ConnectorConfiguration properties:

public Factory<SSLContext> getHttpSslFactory()
public ConnectorConfiguration setHttpSslFactory(Factory<SSLContext> httpSslFactory)
public boolean isHttpSslClientAuth()
public ConnectorConfiguration setHttpSslClientAuth(boolean httpSslClientAuth)

Documentation

restapi.adoc describes the new settings, the host check, reload, and how to move HTTPS from Jetty XML to a factory with a restart. ssl-tls.adoc and control-script.adoc include HTTP REST in manual reload and hot reload.

Tests

JettyRestHttpsTest runs real nodes and TLS connections. It covers both connector configurations, the host check, key and trust rotation with mutual TLS, a failed reload, a scheduled renewal with a connection that stays open, exact protocols and cipher suites, rejected configurations that never serve plain HTTP, unchanged HTTPS from Jetty XML, and HTTP REST that did not start.

GridLifecycleAwareSelfTest checks that the node starts and stops an HTTP REST factory once, both a separate one and one shared with binary REST.

🤖 Generated with Claude Code

…ext factory

ConnectorConfiguration.httpSslFactory enables HTTPS on the built-in HTTP connector or on the plain HTTP
connector of the Jetty XML configuration. httpSslClientAuth requires a trusted client certificate. Jetty
takes the current context of the factory for each new connection, and HTTP REST joins the TLS reload
command and automatic hot reload once it has started. Connections enable exactly the protocols and
cipher suites of the factory.

The node fails to start if the Jetty connector configures TLS itself, if its default protocol is not
HTTP, or if client authentication is set without the factory. A factory shared with binary REST starts
and stops once. HTTPS configured directly in Jetty XML stays as it is and outside reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anton-vinogradov and others added 18 commits November 18, 2026 15:40
…y REST

The node starts the HTTP REST factory only if binary REST does not use the same instance. The check
now has a name that states this, so the reader does not need to work it out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g the binary REST factory

The node adds the HTTP REST factory to its lifecycle list like any other configuration object and skips
repeated instances. A factory that HTTP and binary REST share starts and stops once. The lifecycle test
moves to GridLifecycleAwareSelfTest, which also checks a separate HTTP REST factory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry directly

Only the binary REST factory can repeat the HTTP REST factory in the lifecycle list, so a direct
comparison replaces the general check for repeated instances. Other configuration objects keep their
current lifecycle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test waits until the factory publishes a new context. Before, it waited for the new hot reload time,
which the factory sets just before it publishes the context, so a new connection could still get the
previous certificate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ies on

Each test names the CA and the host of the server certificate and the trust store that it creates,
instead of taking them from shared helpers. The Host check test also sends a request with the matching
Host, so the rejected request differs from it only in the Host. The Jetty XML fixture without the Host
check is named after that property.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anton-vinogradov

Copy link
Copy Markdown
Contributor Author

/runall

@ignite-pr-checker

Copy link
Copy Markdown

@anton-vinogradov 🔎 No blockers found · full verdict

1 suite gave no result, same as on master:

Next: nothing to do for this PR.

RunAll 9509536 · 888d761 · glossary

♻️ Settled after 2 auto re-run waves: #1 — 2 suites that failed mid-run; #2 — 2 suites (1 with blockers, 1 broken).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants