Skip to content

Commit 258d74f

Browse files
authored
Add a structured output to the CLI tool (#43)
1 parent 7e6978d commit 258d74f

File tree

2 files changed

+255
-96
lines changed

2 files changed

+255
-96
lines changed

crates/http-signature-directory/README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,30 @@ Options:
3737
-V, --version Print version
3838
3939
40-
$ http-signature-directory https://http-message-signatures-example.research.cloudflare.com/.well-known/http-message-signatures-directory
41-
HTTP signature directory is valid!
42-
43-
# debug logging enabled
4440
$ RUST_LOG=debug http-signature-directory https://http-message-signatures-example.research.cloudflare.com/.well-known/http-message-signatures-directory
45-
[2025-06-18T13:23:57Z DEBUG http_signature_directory] Extracted the following @authority component: "http-message-signatures-example.research.cloudflare.com"
46-
[2025-06-18T13:23:57Z DEBUG reqwest::connect] starting new connection: https://http-message-signatures-example.research.cloudflare.com/
47-
[2025-06-18T13:23:58Z DEBUG http_signature_directory] Found the following Signature headers: ["binding0=:phQjWRDPBioZR672wQCWGSEChJUXk9zUiWNQlqLw1HVRjGw+n0xefZA0nqk4GbHUSpEKntvpGqfJSn0iqdGfCw==:"]
48-
[2025-06-18T13:23:58Z DEBUG http_signature_directory] Found the following Signature-Input headers: ["binding0=(\"@authority\");created=1750253037;keyid=\"poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U\";alg=\"ed25519\";expires=1750253337;tag=\"http-message-signatures-directory\""]
49-
[2025-06-18T13:23:58Z INFO http_signature_directory] Analyzing key with thumbprint poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U
50-
[2025-06-18T13:23:58Z INFO http_signature_directory] Key was identified as an Ed25519 key
51-
HTTP signature directory is valid!
41+
[2025-06-27T16:10:36Z DEBUG http_signature_directory] Extracted the following @authority component: "http-message-signatures-example.research.cloudflare.com"
42+
[2025-06-27T16:10:36Z DEBUG reqwest::connect] starting new connection: https://http-message-signatures-example.research.cloudflare.com/
43+
[2025-06-27T16:10:36Z DEBUG http_signature_directory] Found the following Signature headers: ["binding0=:kgzhyjU+BoBv/I0xF5vGipUbYL4CqNA5G1fxPk61bC3ZBxjM3PnwcySgHzFCSbX5d5DU8Mjd8l/O3Nl4yV0gCw==:"]
44+
[2025-06-27T16:10:36Z DEBUG http_signature_directory] Found the following Signature-Input headers: ["binding0=(\"@authority\");created=1751040636;keyid=\"poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U\";alg=\"ed25519\";expires=1751040936;tag=\"http-message-signatures-directory\""]
45+
[2025-06-27T16:10:36Z INFO http_signature_directory] Analyzing key with thumbprint poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U
46+
[2025-06-27T16:10:36Z INFO http_signature_directory] Key was identified as an Ed25519 key
47+
{
48+
"success": true,
49+
"message": "HTTP signature directory is valid!",
50+
"details": {
51+
"url": "https://http-message-signatures-example.research.cloudflare.com/.well-known/http-message-signatures-directory",
52+
"keys_count": 1,
53+
"validated_keys": [
54+
{
55+
"thumbprint": "poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U",
56+
"valid": true,
57+
"signature_verified": true,
58+
"error": null
59+
}
60+
],
61+
"errors": [],
62+
"warnings": []
63+
}
5264
```
5365

5466
## Security Considerations

0 commit comments

Comments
 (0)