WKD tester is available in two variants:
wkd-testera CLI toolwkd-tester-serveran API and Frontend
Both use the same library for testing and debugging OpenPGP Web Key Directory (WKD).
You can find wkd-tester-server hosted by Alexis Lowe <alexis.lowe@chimbosonic.com> at https://wkd.dp42.dev
Clone this repo and go to the folder then run:
$ cargo install --path cli## CLI: Usage
$ wkd-tester --help
A CLI tool for testing and debugging OpenPGP Web Key Directory (WKD)
Usage: wkd-tester --user-id <USER_ID>
Options:
-u, --user-id <USER_ID> The GPG User ID to look up (example: Joe.Doe@example.org)
-h, --help Print help
-V, --version Print versionNo Errors example:
$ wkd-tester -u alexis.lowe@chimbosonic.com
Advanced method URI: https://openpgpkey.chimbosonic.com/.well-known/openpgpkey/chimbosonic.com/hu/z9naq3iddua5t55b3hp1w3hwz8eyrc7n?l=alexis.lowe
Direct method URI: https://chimbosonic.com/.well-known/openpgpkey/hu/z9naq3iddua5t55b3hp1w3hwz8eyrc7n?l=alexis.lowe
Advanced method fetch was successful
Advanced method key loading succeed with fingerprint: AC48BC1F029B6188D97E2D807C855DB4466DF0C6
Direct method fetch was successful
Direct method key loading succeed with fingerprint: AC48BC1F029B6188D97E2D807C855DB4466DF0C6Warnings example:
$ wkd-tester -u alexis.lowe@chimbosonic.com
Advanced method URI: https://openpgpkey.chimbosonic.com/.well-known/openpgpkey/chimbosonic.com/hu/z9naq3iddua5t55b3hp1w3hwz8eyrc7n?l=alexis.lowe
Direct method URI: https://chimbosonic.com/.well-known/openpgpkey/hu/z9naq3iddua5t55b3hp1w3hwz8eyrc7n?l=alexis.lowe
Advanced method fetch was successful with warnings:
wkd_fetch
! Content-Type header is not set to 'application/octet-stream'. This may cause issues
| with parsing
wkd_fetch
! Access-Control-Allow-Origin header is not set to '*'. This may cause issues with
| CORS
Advanced method key loading succeed with fingerprint: AC48BC1F029B6188D97E2D807C855DB4466DF0C6
Direct method fetch was successful with warnings:
wkd_fetch
! Content-Type header is not set to 'application/octet-stream'. This may cause issues
| with parsing
wkd_fetch
! Access-Control-Allow-Origin header is not set to '*'. This may cause issues with
| CORS
Direct method key loading succeed with fingerprint: AC48BC1F029B6188D97E2D807C855DB4466DF0C6Errors example:
$ wkd-tester -u alexis.lowe@example.org
Advanced method URI: https://openpgpkey.example.org/.well-known/openpgpkey/example.org/hu/z9naq3iddua5t55b3hp1w3hwz8eyrc7n?l=alexis.lowe
Direct method URI: https://example.org/.well-known/openpgpkey/hu/z9naq3iddua5t55b3hp1w3hwz8eyrc7n?l=alexis.lowe
Advanced method fetch failed with error:
wkd_fetch
x WKD URI provided is not a valid URL
|-> error sending request for url (https://openpgpkey.example.org/.well-known/
| openpgpkey/example.org/hu/z9naq3iddua5t55b3hp1w3hwz8eyrc7n?l=alexis.lowe)
|-> client error (Connect)
|-> dns error: failed to lookup address information: Name or service not known
`-> failed to lookup address information: Name or service not known
Direct method fetch failed with error:
wkd_fetch
x Status code is not 200Clone the repo, make sure to update server/src/config.rs
root_pathdoes not change server routing. It only affects paths referenced in generated/static content.root_pathmust not end with/.- Use
""for the site root. - If you proxy the server under a subpath (e.g.
https://example.org/wkd), setroot_pathto/wkd.
- Use
Swagger UI note: If root_path != "", the Swagger UI page will break because it hardcodes /api-docs/openapi.json. I wasn’t able to get utoipa to change the path used in the frontend.
and then build the server container:
docker build -t wkd-tester .Then run it with:
docker run -it --rm -p 7070:7070 wkd-testerTo enable tracing for the wkd library run the server with the following:
cd server/
export RUST_LOG="info,wkd=trace"; cargo watch -x run --features oteland in another terminal:
docker run -p 4317:4317 -p 16686:16686 jaegertracing/all-in-one:latest