thruster 0.1.8 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -19
  3. data/lib/thruster/version.rb +1 -1
  4. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5286aa0c2a89a9280a9673aab530638bbbbced90c3957c748112595f34953265
4
- data.tar.gz: 23838c29af4438332aeedfd94139a0ad34b2be1846b17a68231d514af4b8b4fd
3
+ metadata.gz: 17f7c47629bdf83f9fdbf0516da851218ec63e2b0e904ec2f6ed062f157a12ac
4
+ data.tar.gz: 44321789f31c3e47580a2949aaf39087312f4d92ef40e090e6b7e68d55aeb100
5
5
  SHA512:
6
- metadata.gz: 9686635fc5f1029fe26f32571b04c13053d2d0125060be0e2abb1c2b49fddb0037c19ec0fea2030412256006b756e88223c5c16c1770ed48a490c4f9034c9370
7
- data.tar.gz: 354098f5ca579081bc039aa294a68865ee3898e8018ad2743165bd9fef624481faedb93b471d0764b7f988347f989c0f87d32735eee9277a0d64501ef4fd31d4
6
+ metadata.gz: 720978d3f236fcb18f9710f784a89e89f1876d21275f9b99fe2844b05821a0e7d65de1bccaf595645489e60854dd3a1def2c902d8f9a4919c2b41a549cf24ecc
7
+ data.tar.gz: ed002cd511d7e22ac8936cd21394350c8bc905d2d4e5e0214030639ab676fc99160b33da2d98a18342d31b57fdb5745a10b7494f40ad095f3f604707d75d2cd3
data/README.md CHANGED
@@ -73,27 +73,43 @@ configuration. But if you need to customize its behavior, there are a few
73
73
  environment variables that you can set.
74
74
 
75
75
  | Variable Name | Description | Default Value |
76
- |-----------------------|---------------------------------------------------------|---------------|
77
- | `TLS_DOMAIN` | Comma-separated list of domain names to use for TLS provisioning. If not set, TLS will be disabled. | None |
78
- | `TARGET_PORT` | The port that your Puma server should run on. Thruster will set `PORT` to this value when starting your server. | 3000 |
79
- | `CACHE_SIZE` | The size of the HTTP cache in bytes. | 64MB |
80
- | `MAX_CACHE_ITEM_SIZE` | The maximum size of a single item in the HTTP cache in bytes. | 1MB |
81
- | `X_SENDFILE_ENABLED` | Whether to enable X-Sendfile support. Set to `0` or `false` to disable. | Enabled |
82
- | `MAX_REQUEST_BODY` | The maximum size of a request body in bytes. Requests larger than this size will be refused; `0` means no maximum size is enforced. | `0` |
83
- | `STORAGE_PATH` | The path to store Thruster's internal state. Provisioned TLS certificates will be stored here, so that they will not need to be requested every time your application is started. | `./storage/thruster` |
84
- | `BAD_GATEWAY_PAGE` | Path to an HTML file to serve when the backend server returns a 502 Bad Gateway error. If there is no file at the specific path, Thruster will serve an empty 502 response instead. Because Thruster boots very quickly, a custom page can be a useful way to show that your application is starting up. | `./public/502.html` |
85
- | `HTTP_PORT` | The port to listen on for HTTP traffic. | 80 |
86
- | `HTTPS_PORT` | The port to listen on for HTTPS traffic. | 443 |
87
- | `HTTP_IDLE_TIMEOUT` | The maximum time in seconds that a client can be idle before the connection is closed. | 60 |
88
- | `HTTP_READ_TIMEOUT` | The maximum time in seconds that a client can take to send the request headers and body. | 30 |
89
- | `HTTP_WRITE_TIMEOUT` | The maximum time in seconds during which the client must read the response. | 30 |
90
- | `ACME_DIRECTORY` | The URL of the ACME directory to use for TLS certificate provisioning. | `https://acme-v02.api.letsencrypt.org/directory` (Let's Encrypt production) |
91
- | `EAB_KID` | The EAB key identifier to use when provisioning TLS certificates, if required. | None |
92
- | `EAB_HMAC_KEY` | The Base64-encoded EAB HMAC key to use when provisioning TLS certificates, if required. | None |
93
- | `FORWARD_HEADERS` | Whether to forward X-Forwarded-* headers from the client. | Disabled when running with TLS; enabled otherwise |
94
- | `DEBUG` | Set to `1` or `true` to enable debug logging. | Disabled |
76
+ |-----------------------------|---------------------------------------------------------|---------------|
77
+ | `TLS_DOMAIN` | Comma-separated list of domain names to use for TLS provisioning. If not set, TLS will be disabled. | None |
78
+ | `TARGET_PORT` | The port that your Puma server should run on. Thruster will set `PORT` to this value when starting your server. | 3000 |
79
+ | `CACHE_SIZE` | The size of the HTTP cache in bytes. | 64MB |
80
+ | `MAX_CACHE_ITEM_SIZE` | The maximum size of a single item in the HTTP cache in bytes. | 1MB |
81
+ | `GZIP_COMPRESSION_ENABLED` | Whether to enable gzip compression for responses. Set to `0` or `false` to disable. | Enabled |
82
+ | `GZIP_COMPRESSION_DISABLE_ON_AUTH` | If set to `true`, disable gzip compression for authenticated requests with `Cookie`, `Authorization`, or `X-Csrf-Token` headers. | `false` |
83
+ | `GZIP_COMPRESSION_JITTER` | The amount of random jitter (in bytes) to add to the compressed response size to mitigate BREACH attacks. Set to `0` to disable. | 32 |
84
+ | `X_SENDFILE_ENABLED` | Whether to enable X-Sendfile support. Set to `0` or `false` to disable. | Enabled |
85
+ | `MAX_REQUEST_BODY` | The maximum size of a request body in bytes. Requests larger than this size will be refused; `0` means no maximum size is enforced. | `0` |
86
+ | `STORAGE_PATH` | The path to store Thruster's internal state. Provisioned TLS certificates will be stored here, so that they will not need to be requested every time your application is started. | `./storage/thruster` |
87
+ | `BAD_GATEWAY_PAGE` | Path to an HTML file to serve when the backend server returns a 502 Bad Gateway error. If there is no file at the specific path, Thruster will serve an empty 502 response instead. Because Thruster boots very quickly, a custom page can be a useful way to show that your application is starting up. | `./public/502.html` |
88
+ | `HTTP_PORT` | The port to listen on for HTTP traffic. | 80 |
89
+ | `HTTPS_PORT` | The port to listen on for HTTPS traffic. | 443 |
90
+ | `HTTP_IDLE_TIMEOUT` | The maximum time in seconds that a client can be idle before the connection is closed. | 60 |
91
+ | `HTTP_READ_TIMEOUT` | The maximum time in seconds that a client can take to send the request headers and body. | 30 |
92
+ | `HTTP_WRITE_TIMEOUT` | The maximum time in seconds during which the client must read the response. | 30 |
93
+ | `H2C_ENABLED` | Set to `1` or `true` to enable h2c (http/2 cleartext) | Disabled |
94
+ | `ACME_DIRECTORY` | The URL of the ACME directory to use for TLS certificate provisioning. | `https://acme-v02.api.letsencrypt.org/directory` (Let's Encrypt production) |
95
+ | `EAB_KID` | The EAB key identifier to use when provisioning TLS certificates, if required. | None |
96
+ | `EAB_HMAC_KEY` | The Base64-encoded EAB HMAC key to use when provisioning TLS certificates, if required. | None |
97
+ | `FORWARD_HEADERS` | Whether to forward X-Forwarded-* headers from the client. | Disabled when running with TLS; enabled otherwise |
98
+ | `LOG_REQUESTS` | Log all requests. Set to `0` or `false` to disable request logging | Enabled |
99
+ | `DEBUG` | Set to `1` or `true` to enable debug logging. | Disabled |
95
100
 
96
101
  To prevent naming clashes with your application's own environment variables,
97
102
  Thruster's environment variables can optionally be prefixed with `THRUSTER_`.
98
103
  For example, `TLS_DOMAIN` can also be written as `THRUSTER_TLS_DOMAIN`. Whenever
99
104
  a prefixed variable is set, it will take precedence over the unprefixed version.
105
+
106
+ ## Security
107
+
108
+ ### BREACH Mitigation
109
+
110
+ Thruster includes built-in mitigation for the [BREACH attack](https://breachattack.com/), which allows attackers to extract secrets from compressed encrypted traffic.
111
+
112
+ 1. **Random Jitter (Enabled by Default)**: Thruster adds a random amount of "jitter" (padding) to the size of compressed responses. This makes it significantly harder for attackers to infer the content based on the compressed size. The default jitter is 32 bytes, controlled by `GZIP_COMPRESSION_JITTER`.
113
+ 2. **Compression Guard (Optional)**: For higher security, you can disable compression entirely for authenticated requests (requests containing `Cookie`, `Authorization`, or `X-Csrf-Token` headers) by setting `GZIP_COMPRESSION_DISABLE_ON_AUTH=true`. This eliminates the side-channel entirely for sensitive traffic but may increase bandwidth usage.
114
+
115
+ By default, Thruster prioritizes performance while providing baseline protection via jitter. Operators with strict security requirements should consider enabling the Compression Guard.
@@ -1,3 +1,3 @@
1
1
  module Thruster
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.17"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thruster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin McConnell
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-08-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: A zero-config HTTP/2 proxy for lightweight production deployments
14
13
  email: kevin@37signals.com
@@ -28,7 +27,6 @@ licenses:
28
27
  metadata:
29
28
  homepage_uri: https://github.com/basecamp/thruster
30
29
  rubygems_mfa_required: 'true'
31
- post_install_message:
32
30
  rdoc_options: []
33
31
  require_paths:
34
32
  - lib
@@ -43,8 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
41
  - !ruby/object:Gem::Version
44
42
  version: '0'
45
43
  requirements: []
46
- rubygems_version: 3.5.3
47
- signing_key:
44
+ rubygems_version: 3.6.9
48
45
  specification_version: 4
49
46
  summary: Zero-config HTTP/2 proxy
50
47
  test_files: []