diff options
author | Alex Auvolat <alex@adnab.me> | 2020-07-08 13:33:02 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-07-08 13:33:02 +0200 |
commit | 86fb7bbba5aefc797f359bd84676637f0232b709 (patch) | |
tree | 22e90454f0c5ccd50a0e9dbdeec516ddd7955edf /src/api/signature.rs | |
parent | f22ecb60a8e1848de95e1bd3104b0ceec7058f0c (diff) | |
download | garage-86fb7bbba5aefc797f359bd84676637f0232b709.tar.gz garage-86fb7bbba5aefc797f359bd84676637f0232b709.zip |
Apply cargo fmt; add trace output when request signature is bad
Diffstat (limited to 'src/api/signature.rs')
-rw-r--r-- | src/api/signature.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/signature.rs b/src/api/signature.rs index 65f31f21..798ba7fb 100644 --- a/src/api/signature.rs +++ b/src/api/signature.rs @@ -91,6 +91,9 @@ pub async fn check_signature(garage: &Garage, request: &Request<Body>) -> Result let signature = hex::encode(hmac.result().code()); if authorization.signature != signature { + trace!("Canonical request: ``{}``", canonical_request); + trace!("String to sign: ``{}``", string_to_sign); + trace!("Expected: {}, got: {}", signature, authorization.signature); return Err(Error::Forbidden(format!("Invalid signature"))); } |