Skip to content

Commit

Permalink
feat: add delete to allowed subresources
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Timmer committed Aug 13, 2024
1 parent 3d59660 commit 117b203
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion lib/ex_aws/auth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule ExAws.Auth do

@moduledoc false

@allowed_subresources ~w(acl cors lifecycle location logging notification partNumber policy requestPayment uploadId uploads versionId versioning versions website)
@allowed_subresources ~w(acl cors delete lifecycle location logging notification partNumber policy requestPayment uploadId uploads versionId versioning versions website)
@unsignable_headers ["x-amzn-trace-id"]
@unsignable_headers_multi_case ["x-amzn-trace-id", "X-Amzn-Trace-Id"]

Expand Down
15 changes: 0 additions & 15 deletions test/ex_aws/auth/signatures_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,4 @@ defmodule ExAws.Auth.SignaturesTest do
assert signature == "f8TffUgcy9sMw70uXsnqdim8aiw="
end
end

describe "generate_signature_v2/4" do
test "with a basic string to sign" do
config = ExAws.Config.new(:s3, [
access_key_id: "AKIAIOSFODNN7EXAMPLE",
secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
region: "us-east-1"
])
datetime = {{2016,8,29},{19,41,33}}

signature = Signatures.generate_signature_v2("s3", config, datetime, "hello world")

assert signature == "f8TffUgcy9sMw70uXsnqdim8aiw="
end
end
end

0 comments on commit 117b203

Please sign in to comment.