diff options
author | Jill <kokakiwi@deuxfleurs.fr> | 2022-01-17 10:55:31 +0100 |
---|---|---|
committer | Alex <alex@adnab.me> | 2022-01-17 10:55:31 +0100 |
commit | b45dcc1925d76f3f7dcae7deea0391953ba548e5 (patch) | |
tree | 85600f90c41532dc0b50e395e6ea85ca8ba08f53 /src/api/api_server.rs | |
parent | 60c0033c8bbd3dbc18f8c91f15674a60fd8acdc0 (diff) | |
download | garage-b45dcc1925d76f3f7dcae7deea0391953ba548e5.tar.gz garage-b45dcc1925d76f3f7dcae7deea0391953ba548e5.zip |
Support STREAMING-AWS4-HMAC-SHA256-PAYLOAD (#64) (#156)
Closes #64.
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/156
Co-authored-by: Jill <kokakiwi@deuxfleurs.fr>
Co-committed-by: Jill <kokakiwi@deuxfleurs.fr>
Diffstat (limited to 'src/api/api_server.rs')
-rw-r--r-- | src/api/api_server.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/api_server.rs b/src/api/api_server.rs index ea1990d9..c4606226 100644 --- a/src/api/api_server.rs +++ b/src/api/api_server.rs @@ -15,7 +15,7 @@ use garage_model::garage::Garage; use garage_model::key_table::Key; use crate::error::*; -use crate::signature::check_signature; +use crate::signature::payload::check_payload_signature; use crate::helpers::*; use crate::s3_bucket::*; @@ -90,7 +90,7 @@ async fn handler( } async fn handler_inner(garage: Arc<Garage>, req: Request<Body>) -> Result<Response<Body>, Error> { - let (api_key, content_sha256) = check_signature(&garage, &req).await?; + let (api_key, content_sha256) = check_payload_signature(&garage, &req).await?; let authority = req .headers() @@ -176,7 +176,7 @@ async fn handler_inner(garage: Arc<Garage>, req: Request<Body>) -> Result<Respon .await } Endpoint::PutObject { key, .. } => { - handle_put(garage, req, bucket_id, &key, content_sha256).await + handle_put(garage, req, bucket_id, &key, &api_key, content_sha256).await } Endpoint::AbortMultipartUpload { key, upload_id, .. } => { handle_abort_multipart_upload(garage, bucket_id, &key, &upload_id).await |