You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-128
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,18 @@
1
-
# `mod_tls` - memory safety for TLS in Apache
1
+
# `mod_tls` - rust based TLS for Apache httpd
2
2
3
3
This repository contains `mod_tls`, a module for Apache httpd that uses
4
4
[rustls](https://github.com/ctz/rustls) to provide a memory safe TLS
5
5
implementation in Rust.
6
6
7
-
This project is sponsored by the [ISRG](https://www.abetterinternet.org).
8
-
[Read what they said about it.](https://www.abetterinternet.org/post/memory-safe-tls-apache/).
9
-
10
-
11
7
## Status
12
8
13
-
In development/beta test. See [beta testing](#beta-testing) for instructions how to use the recent release.
14
-
15
-
You need Apache httpd version 2.4.48 or newer to run this module. Also you need [rustls-ffi](https://github.com/rustls/rustls-ffi), either the `main` branch or a version at least 0.8.2.
9
+
The current state is compatible with **rustls-ffi v0.13.0** and needs at least Apache 2.4.48 for the
10
+
necessary infrastructure. A new release with support for rustls-ffi v0.14.0 is in the making.
16
11
17
12
`mod_tls` gives you:
18
13
19
14
* a memory safe TLS via [rustls](https://docs.rs/rustls/0.19.1/rustls/).
20
-
* TLS v1.2 and TLS v1.3, features as supported in [rustls](https://docs.rs/rustls/0.19.1/rustls/).
15
+
* TLS v1.2 and TLS v1.3
21
16
* Configuration similar to Apache's own `mod_ssl`.
22
17
* Similar performance as `mod_ssl`, better in some areas.
23
18
* Frontend TLS for your clients
@@ -32,8 +27,8 @@ There is a [comparison table with mod_ssl functionality](#comparison-with-mod_ss
32
27
33
28
## Platforms
34
29
30
+
* rustls-ffi v0.13.0
35
31
* Apache 2.4.48 or later
36
-
* OS: wherever apache and (c)rustls are available
37
32
* build system: autoconf/automake
38
33
39
34
### Installation from source
@@ -50,107 +45,6 @@ Run the usual autoconf/automake magic incantations.
50
45
> make
51
46
```
52
47
53
-
### Docker Test Image
54
-
55
-
There is support for building a Docker image based on `debian sid` to run the test suite in.
56
-
57
-
```
58
-
> docker-compose build debian-test
59
-
> docker-compose run debian-test
60
-
```
61
-
62
-
This clones the git repository `rustls-ffi` and builds a copy of the local `mod_tls` sources. If you want to setup your own build on this platform, you'll find the instructions in `docker/debian-test/bin/update.sh`.
63
-
64
-
## Beta Testing
65
-
66
-
The releases v0.7.x are beta release that lets you run `mod_tls` inside the Apache web server. What your need:
67
-
68
-
*[Apache httpd](https://httpd.apache.org) 2.4.48 (earlier versions will **not** work).
* Frontend TLS (v1.2 + v1.3) for the clients connecting to Apache
74
-
* ACME certificates (via Apache's `mod_md`)
75
-
* OCSP stapling (via Apache's `mod_md`)
76
-
* TLS session handling
77
-
* multiple certificates per virtual host, SNI, ALPN
78
-
79
-
#### Detailed Instructions
80
-
81
-
At the time of this writing Apache 2.4.48 was not generally available as package, but expect that to change soon. When you have it, it usually is accompanied by a `apache2-dev` package that includes all header files and binaries to build `mod_tls`.
82
-
83
-
When you have that, you need to checkout and build `rustls-ffi`. It has [its own build instructions](https://github.com/rustls/rustls-ffi#build). Basically, you need the `Rust` tool set installed and the run `make` which will pull in the components needed.
84
-
85
-
After you have the `apache2-dev` package, the tool `apxs` is installed (also when you build apache2 from source yourself). `apxs` is useful to give information about the environment and parameters apache2 was built with. For example:
86
-
87
-
```
88
-
> apxs -q exec_prefix
89
-
/usr
90
-
```
91
-
will tell you the directory underneath everything else is placed. When you have built `rustls-ffi` you need to install it in this location with
92
-
93
-
```
94
-
rustls-ffi> make install DESTDIR=/usr
95
-
```
96
-
97
-
which copies the header file and library. Then get the `mod_tls` release, unpack it somewhere and run:
98
-
99
-
```
100
-
mod_tls-0.7.x> ./configure
101
-
```
102
-
103
-
It should find the `apxs` tool in the path. If not, you can give it:
Some installations do it differently. `Debian` has a directory `/etc/apache2/mods-available` where you create 2 files `mod_tls.conf` and `mod_tls.load`. The first one can be empty, the second one just has the `LoadModule` instruction as shown above. To enable the module, you then type:
140
-
141
-
```
142
-
> /usr/sbin/a2enmod tls
143
-
```
144
-
which creates some symlinks in `/etc/apache2/mods-enabled`.
145
-
146
-
Then you start/reload your server. If your server logs on level `info` you will see an entry like:
And otherwise it will just do nothing! You need to configure where in your server `mod_tls` should be active and there are several [descriptions below](#configuration) on how to do that.
153
-
154
48
#### OCSP Stapling with mod_tls
155
49
156
50
`mod_tls` adds OCSP responses to TLS handshakes (this is what "Stapling" is), **when** someone provides these responses. It has no own implementation to retrieve these responses, like `mod_ssl` does.
@@ -168,34 +62,23 @@ handler by [`mod_status`](https://httpd.apache.org/docs/2.4/mod/mod_status.html)
168
62
169
63
## Tests
170
64
171
-
### Functional Tests
172
-
173
65
If you want to run the test suite, you need:
174
66
175
67
*`curl` and `openssl` in your path
176
-
* Some Python packages: `pytest`, `pyopenssl`
68
+
* Some Python packages: `pytest`, `cryptography`
177
69
178
70
```
179
71
> make test
180
72
```
181
73
182
-
### Load Tests
183
-
184
-
There are load tests for putting the module under a bit of pressure and getting some numbers.
185
-
All benchmarks are limited in how they can be applied to reality. It is terribly easy in
186
-
these limited tests to hit a sweet spot on your system where CPU+Disc caches align and
187
-
you see wonderful numbers. But they will not apply to a production server.
74
+
## History
188
75
189
-
To run these, you nee:
76
+
This project has been sponsored in 2020 by the [ISRG](https://www.abetterinternet.org)
77
+
([Read what they said about it.](https://www.abetterinternet.org/post/memory-safe-tls-apache/)). It had been added as an *experimental* module into the Apache httpd project. However, the `rustls-ffi`API proved to be unstable, mostly due to `rustls` own ongoing development. This requires rework of `mod_tls` on new releases and the schedule of that does not fit into the release schedule of the httpd project.
190
78
191
-
*`h2load` from the exceptional [nghttp2](https://nghttp2.org).
192
-
* Python package: `tqdm`
193
-
194
-
```
195
-
> make loadtest
196
-
```
79
+
In September 2024, I chose to give the module a standalone github location with its own releases and removed it from the Apache httpd project again. This will make maintenance and participation easier.
197
80
198
-
This runs one test. There are several defined in `test/load_test.py` which you can invoke via arguments.
81
+
Should rustls one day become stable, we can consider merging it to the httpd project again.
0 commit comments