feat(server-ng): serve HTTPS on the REST listener#3672
Open
hubcio wants to merge 1 commit into
Open
Conversation
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.
Codecov Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
numinnex
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.