Skip to content

Commit 1a9db4a

Browse files
authored
Adding multiple options for terminating TLS directly in a forge runtime (#21)
* Adding multiple options for terminating TLS directly in a forge app instead of deferring that to an external application, like a reverse proxy. I personally tend to deploy my load balancers on a separate machine from my application servers and I want end-to-end encryption as part of a zero-trust architecture. You can't get that if your app sends unencrypted traffic even if it's over a private subnet. * Add optional TLS termination to the gateway Enable [gateway.tls] with cert_path + key_path in forge.toml to serve HTTPS directly from the runtime. Both paths set → TLS on; neither set → plain HTTP; setting only one is a startup error. Uses rustls via the tls-listener crate, whose axum feature implements axum::serve::Listener directly, so the gateway keeps a single axum::serve hotpath for HTTP and HTTPS. rustls-pemfile parses the certificate and key; the ring crypto provider is installed once at startup. For deployments behind a load balancer or on private subnets, a throwaway cert is one command: openssl req -x509 -newkey rsa:2048 -nodes -days 365 \ -keyout key.pem -out cert.pem -subj "/CN=app.internal" Not a public TLS terminator — no HSTS, OCSP stapling, ACME, or hot reload. Put a load balancer or CDN with a real CA-issued cert in front for internet-facing deployments. * TLS PR updates. * Normalize Dioxus signal API and improve SQL migration parsing * Normalize Dioxus signal API and improve SQL migration parsing * Add PeerAddr::ip() method and use it instead of .0.0 field access * Downgrade forge check strict validation to warning when env vars are unresolved
1 parent 5323fff commit 1a9db4a

21 files changed

Lines changed: 870 additions & 264 deletions

.sqlx/query-1c1f9cc065c703b106c0c0016efe14ab025f21832d278d906b7bbecbc5aa92ed.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

.sqlx/query-2d31153b54e489d4bdce6c083ccd1789ba586f2127a5f5402853400726352644.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.sqlx/query-33008ea2604e0b68e3a4f50a5e008e538d6f7e81744f14e1f901320bf2baa4fb.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

.sqlx/query-8e22c20af4721b3971677e360ebdfde412ceb07ff3644fe2c0518513da4c5dfa.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-be6b8b058840c007ffb5dbcfca5e3ccec11d8af3c11a75b6ce110a490a9d7956.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

.sqlx/query-c7ba6b99c14fe4ccb7c96f2eb44d0b74b1b1475f7e1052b9ba5c1e2e66c1eaab.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

.sqlx/query-d25978f7900e37aca78428e1d59fd791d5d631bc56c0643fa783ffcebd0cae1b.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

.sqlx/query-e00bf1e53bc7bbfb0d6a3a300314fbfdbcdbf67aedb16749c1e0d04485d400d1.json

Lines changed: 0 additions & 44 deletions
This file was deleted.

.sqlx/query-e3430b82d9fd678b65d4f1e48da956c824c3011ddd0a1182dab3f012aae06e08.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)