Skip to content

feat(server-ng): serve HTTPS on the REST listener#3672

Open
hubcio wants to merge 1 commit into
masterfrom
feat/server-ng-http-tls
Open

feat(server-ng): serve HTTPS on the REST listener#3672
hubcio wants to merge 1 commit into
masterfrom
feat/server-ng-http-tls

Conversation

@hubcio

@hubcio hubcio commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

http.tls.enabled was read but never acted on: the REST listener
always bound plaintext, so bearer tokens and passwords crossed
the wire in clear despite TLS being configured.

Terminate TLS with the compio-native rustls substrate the binary
transports already use, rather than pulling tokio via axum-server.
Handshakes run off the accept path behind a bounded channel so a
slow peer cannot stall accept. Connections are served through a
hand-rolled hyper-util auto loop over HyperStream::new_tls;
cyper_axum::serve only wraps plaintext streams, and splitting the
TLS stream deadlocks full-duplex HTTP on compio's BiLock. ALPN
advertises h2 and http/1.1 for parity with the legacy server.
Credential errors surface as ListenerCredentials instead of a
panic, and enabling TLS with an empty cert_file or key_file now
fails config validation at boot.

An integration test spawns iggy-server-ng with http.tls enabled
and asserts /ping and /users/login return 200 over HTTP/2,
proving certificate loading, the handshake pump, and ALPN end to
end. reqwest's http2 feature is now pinned instead of enabled
transitively via testcontainers.

http.tls.enabled was read but never acted on: the REST listener
always bound plaintext, so bearer tokens and passwords crossed
the wire in clear despite TLS being configured.

Terminate TLS with the compio-native rustls substrate the binary
transports already use, rather than pulling tokio via axum-server.
Handshakes run off the accept path behind a bounded channel so a
slow peer cannot stall accept. Connections are served through a
hand-rolled hyper-util auto loop over HyperStream::new_tls;
cyper_axum::serve only wraps plaintext streams, and splitting the
TLS stream deadlocks full-duplex HTTP on compio's BiLock. ALPN
advertises h2 and http/1.1 for parity with the legacy server.
Credential errors surface as ListenerCredentials instead of a
panic, and enabling TLS with an empty cert_file or key_file now
fails config validation at boot.

An integration test spawns iggy-server-ng with http.tls enabled
and asserts /ping and /users/login return 200 over HTTP/2,
proving certificate loading, the handshake pump, and ALPN end to
end. reqwest's http2 feature is now pinned instead of enabled
transitively via testcontainers.
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.89116% with 106 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.82%. Comparing base (c42eca7) to head (4f84bcc).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
core/server-ng/src/http/tls.rs 17.75% 88 Missing ⚠️
core/server-ng/src/http.rs 0.00% 18 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3672       +/-   ##
=============================================
- Coverage     73.60%   58.82%   -14.79%     
  Complexity      937      937               
=============================================
  Files          1297     1296        -1     
  Lines        143769   131701    -12068     
  Branches     119329   107334    -11995     
=============================================
- Hits         105822    77469    -28353     
- Misses        34582    50800    +16218     
- Partials       3365     3432       +67     
Components Coverage Δ
Rust Core 55.61% <27.89%> (-18.24%) ⬇️
Java SDK 62.44% <ø> (ø)
C# SDK 71.04% <ø> (-1.16%) ⬇️
Python SDK 92.17% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.22% <ø> (-0.13%) ⬇️
Go SDK 42.71% <ø> (+0.43%) ⬆️
Files with missing lines Coverage Δ
core/configs/src/server_ng_config/validators.rs 52.89% <100.00%> (+10.46%) ⬆️
core/server-ng/src/http.rs 53.93% <0.00%> (-1.35%) ⬇️
core/server-ng/src/http/tls.rs 17.75% <17.75%> (ø)

... and 263 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants