2018-11-22 10:40:59 -05:00
|
|
|
Hagrid
|
|
|
|
======
|
2018-08-16 14:35:19 -04:00
|
|
|
|
2019-06-15 13:49:59 -04:00
|
|
|
Hagrid is a verifying OpenPGP key server.
|
|
|
|
|
|
|
|
You can find general instructions and an API documentation at the running
|
2019-09-06 13:21:32 -04:00
|
|
|
instance at [https://keys.openpgp.org](https://keys.openpgp.org).
|
2018-09-19 16:27:25 -04:00
|
|
|
|
2019-05-03 05:10:34 -04:00
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
Hagrid is free software: you can redistribute it and/or modify it
|
|
|
|
under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Hagrid is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
|
|
|
License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public
|
|
|
|
License along with Hagrid. If not, see
|
|
|
|
<https://www.gnu.org/licenses/>.
|
|
|
|
|
2018-09-19 16:27:25 -04:00
|
|
|
Quick Start
|
|
|
|
-----------
|
|
|
|
|
2022-02-06 17:33:33 -05:00
|
|
|
Building Hagrid requires a working stable Rust toolchain.
|
|
|
|
The easiest way to get the toolchain is to download [rustup](https://rustup.rs).
|
2020-02-17 16:13:10 -05:00
|
|
|
|
2022-02-06 17:33:33 -05:00
|
|
|
Additionally, some external dependencies are required.
|
|
|
|
Get them (on Debian or Ubuntu) with
|
2020-02-17 16:13:10 -05:00
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt install gnutls-bin nettle-dev gcc llvm-dev libclang-dev build-essential pkg-config gettext
|
|
|
|
```
|
|
|
|
|
2022-02-06 17:33:33 -05:00
|
|
|
After Rust and the other dependencies are installed, copy the config file, then simply compile and run:
|
2018-10-18 10:54:00 -04:00
|
|
|
|
|
|
|
```bash
|
2019-02-12 08:09:06 -05:00
|
|
|
cd hagrid
|
2019-06-15 13:49:59 -04:00
|
|
|
cp Rocket.toml.dist Rocket.toml
|
|
|
|
cargo run
|
2018-10-18 10:54:00 -04:00
|
|
|
```
|
|
|
|
|
2019-06-15 13:49:59 -04:00
|
|
|
This will spawn a web server listening on port 8080.
|
2018-10-18 10:54:00 -04:00
|
|
|
|
2019-06-15 13:49:59 -04:00
|
|
|
For deployment, a release build should be used (`cargo build --release`). This
|
|
|
|
will be statically built, and can be copied anywhere. You will also need to
|
|
|
|
adjust `Rocket.toml` accordingly. Hagrid uses `sendmail` for mailing, so you
|
|
|
|
also need a working local mailer setup.
|
2018-11-22 10:40:59 -05:00
|
|
|
|
2019-01-09 08:56:51 -05:00
|
|
|
Reverse Proxy
|
|
|
|
-------------
|
|
|
|
|
2021-07-13 05:08:55 -04:00
|
|
|
Hagrid is designed to defer lookups to reverse proxy server like Nginx.
|
|
|
|
Lookups via `/vks/v1/by-finingerprint`, `/vks/v1/by-keyid`, and
|
|
|
|
`/vks/v1/by-email` can be handled by a robust and performant HTTP server.
|
|
|
|
A sample configuration for nginx is part of the repository (`nginx.conf`,
|
2019-06-15 13:49:59 -04:00
|
|
|
`hagrid-routes.conf`).
|
2021-07-13 05:08:55 -04:00
|
|
|
Note that we make use of
|
|
|
|
[ngx_http_lua_module](https://github.com/openresty/lua-nginx-module) to
|
|
|
|
perform some request rewrites.
|
2019-01-09 08:56:51 -05:00
|
|
|
|
2018-11-22 10:40:59 -05:00
|
|
|
Community
|
|
|
|
---------
|
|
|
|
|
2021-07-13 05:08:55 -04:00
|
|
|
We're in `#hagrid` on OFTC IRC, also reachable via Matrix as `#hagrid:stratum0.org`.
|