Zeke Fast 3bb755d8d9 Split hagrid::web::tests::maintenance() to individual tests and move them to modules with route declarations.
Changes:
- Split hagrid::web::tests::maintenance() tests to the following:
  - hagrid::routes::vks:tests::get_upload:::maintenance()
  - hagrid::routes::manage::tests::get_manage::maintenance()
  - hagrid::routes::vks:tests::get_verify_token:::maintenance()
  - hagrid::routes::pks::tests::post_pks_add_multipart_form_data::maintenance()
  - hagrid::routes::api::rest::vks::tests::post_vks_v1_upload::maintenance()
  - hagrid::routes::api::rest::vks::tests::post_vks_v1_request_verify_json::maintenance()
  - hagrid::routes::vks::tests::put_root::maintenance()
- Fix tests' endpoints to make them more accurate and actually match
  existing endpoints:
  - GET /verify -> GET /verify/<token>
  - GET /pks/add -> POST /pks/add/ [Content-Type: multipart/form-data]
  - GET /vks/v1/upload -> POST /vks/v1/upload
  - GET /vks/v1/request-verify -> POST /vks/v1/request-verify
- Verify that maintenance state has dissapeared after maintenance file
  removal in each individual test with the same endpoint on which we
  asserted maintenance mesage.
  Previous tests checked only maintenance message disappearance on GET /upload,
  which wasn't completely correct.
- Introduce new fixtures at hagrid::routes::tests::common:
  - token
  - serialized_cert
  - key_multipart_form_data
- Introduce new test module: hagrid::routes::tests::common::test.
  The module is going to accumulate common tests which define common
  workflow for the test and can be called from other tests to check for
  specific behaviour of concreate function or HTTP endpoint.
- Generalize functionality of maintenance test. Move it to module with
  shared tests: hagrid::routes::tests::common::test::maintenance().
2025-09-28 01:27:27 +00:00
2020-11-06 11:25:40 +00:00
2025-07-10 16:26:53 +02:00
2025-03-15 13:59:50 +01:00
2022-01-04 12:17:18 +01:00
2025-02-28 22:05:32 +01:00
2019-05-03 11:10:34 +02:00
2025-08-01 10:05:50 +02:00
2025-06-17 10:17:01 +02:00
2025-06-17 10:17:01 +02:00
2025-08-20 21:17:36 +02:00

Hagrid

Hagrid is a verifying OpenPGP key server.

You can find general instructions and an API documentation at the running instance at https://keys.openpgp.org.

Please note that Hagrid is built and maintained only for the service at keys.openpgp.org. It is not maintained or officially supported as deployable software.

Compatibility note: Hagrid v2.0 uses an sqlite certificate store instead of the previous file based database. This means that it also no longer supports serving certificates directly via reverse proxy. You can us hagridctl to dump and import an old database.

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/.

Quick Start

Building Hagrid requires a working stable Rust toolchain. The easiest way to get the toolchain is to download rustup.

Additionally, some external dependencies are required. Get them (on Debian or Ubuntu) with

sudo apt install gnutls-bin libssl-dev gcc llvm-dev libclang-dev build-essential pkg-config gettext libsqlite3-dev

After Rust and the other dependencies are installed, copy the config file (or run just init), then simply compile and run:

cd hagrid
cp Rocket.toml.dist Rocket.toml
cargo run

This will spawn a web server listening on port 8080.

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.

Development Dependencies

List of dependencies which are required or could be helpful for contribution to the project.

Category Type Name Version Verified Version Notes
Shell Obligatory Zsh >= 5.9 5.9 Required for translated templates generation script.
Shell Preferrable Bash >= 5.2.15 5.2.15 Required for scripts embedded into justfile. If you don't want to use just you probably don't need this shell.
Command Runner Preferrable just >= 1.40.0 1.40.0 All commands from justfile could be run without just, but it makes development more convenient.
SQlite Prompt Preferrable sqlite3 >= 3.40.1 3.40.1 Used by just db recipe to open interactive prompt to SQlite database of the project.

Community

We're in #hagrid on OFTC IRC, also reachable via Matrix as #hagrid:stratum0.org.

Description
No description provided
Readme 4.2 MiB
Languages
Rust 91.6%
Just 3.5%
CSS 2%
Nix 1.2%
Python 1.1%
Other 0.6%