Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add presign-url client support #888

Merged
merged 24 commits into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9a86474
java codegen changes to generate presign clients for each valid servi…
skotambkar Nov 11, 2020
d8198fa
register runtime client plugin
skotambkar Nov 11, 2020
fdb62b4
modify java codegen for existing rds autofill customization to use ne…
skotambkar Nov 11, 2020
552f0c5
internal/presignedURL pkg changes to support new design. This is inte…
skotambkar Nov 11, 2020
ab85f51
add a build middleware to handle s3 use of expires option for presign…
skotambkar Nov 11, 2020
0430dfb
fix formatting
skotambkar Nov 11, 2020
c7da365
generated s3, rds, ec2 client for verification
skotambkar Nov 11, 2020
9817fbc
go mod changes for pkgs that depend on s3 and now presigned url pkgs
skotambkar Nov 11, 2020
2c1a79b
feedback changes
skotambkar Nov 16, 2020
b090abd
generated service changes
skotambkar Nov 16, 2020
ec29d82
feedback changes
skotambkar Nov 17, 2020
e55671e
regenerated client for s3, ec2, rds
skotambkar Nov 17, 2020
fe3e6b5
fix test
skotambkar Nov 17, 2020
78f6e3e
fix method that disables content sha256 computation from s3 streaming…
skotambkar Nov 17, 2020
ba5730c
add handwritten presigning test for s3
skotambkar Nov 17, 2020
0d0e272
regenerated s3 client
skotambkar Nov 17, 2020
0574c9c
add go mod for feature test module
skotambkar Nov 17, 2020
5844f2c
add presign integration test
skotambkar Nov 18, 2020
5e56d2b
adds integration test for presign url and moves the unit test to serv…
skotambkar Nov 18, 2020
a6b12b5
revert the integration plugin order change
skotambkar Nov 18, 2020
cee7c26
go lint fix
skotambkar Nov 18, 2020
e4df8b6
add support for s3 GetObject presigned url
skotambkar Nov 19, 2020
b542d1b
updates integ test and unit test
skotambkar Nov 19, 2020
8db7d37
enable empty body test for presign
skotambkar Nov 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions aws/signer/v4/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error {
return stack.Build.Add(&computePayloadSHA256{}, middleware.After)
}

// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the
// operation middleware stack
func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error {
_, err := stack.Build.Remove(computePayloadHashMiddlewareID)
return err
}

// ID is the middleware name
func (m *computePayloadSHA256) ID() string {
return computePayloadHashMiddlewareID
Expand Down Expand Up @@ -159,6 +166,13 @@ func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
return stack.Build.Insert(&contentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
}

// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware
// from the operation middleware stack
func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
_, err := stack.Build.Remove((*contentSHA256Header)(nil).ID())
return err
}

// ID returns the ContentSHA256HeaderMiddleware identifier
func (m *contentSHA256Header) ID() string {
return "SigV4ContentSHA256Header"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ software.amazon.smithy.aws.go.codegen.customization.PresignURLAutoFill
software.amazon.smithy.aws.go.codegen.FilterStreamingOperations
software.amazon.smithy.aws.go.codegen.RequestResponseLogging
software.amazon.smithy.aws.go.codegen.customization.S3ControlEndpointResolver
software.amazon.smithy.aws.go.codegen.AwsHttpPresignURLClientGenerator
2 changes: 2 additions & 0 deletions example/service/s3/listObjects/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ replace github.com/aws/aws-sdk-go-v2/service/sts => ../../../../service/sts/
replace github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => ../../../../service/internal/accept-encoding/

replace github.com/aws/aws-sdk-go-v2/service/internal/s3shared => ../../../../service/internal/s3shared/

replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../../../../service/internal/presigned-url/
2 changes: 2 additions & 0 deletions example/service/s3/listObjects/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ github.com/awslabs/smithy-go v0.3.1-0.20201108010311-62c2a93810b4/go.mod h1:hPOQ
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
4 changes: 3 additions & 1 deletion feature/s3/manager/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v0.3.1 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v0.29.0
github.com/awslabs/smithy-go v0.3.1-0.20201108010311-62c2a93810b4
github.com/google/go-cmp v0.4.1
github.com/google/go-cmp v0.5.2
)

replace github.com/aws/aws-sdk-go-v2 => ../../../
Expand All @@ -26,3 +26,5 @@ replace github.com/aws/aws-sdk-go-v2/service/sts => ../../../service/sts/
replace github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => ../../../service/internal/accept-encoding/

replace github.com/aws/aws-sdk-go-v2/service/internal/s3shared => ../../../service/internal/s3shared/

replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../../../service/internal/presigned-url/
2 changes: 2 additions & 0 deletions feature/s3/manager/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
Expand Down
76 changes: 76 additions & 0 deletions service/ec2/api_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 48 additions & 59 deletions service/ec2/api_op_CopySnapshot.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions service/internal/integrationtest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/wafv2 v0.29.0
github.com/aws/aws-sdk-go-v2/service/workspaces v0.29.0
github.com/awslabs/smithy-go v0.3.1-0.20201120010914-c02b9493fe20
github.com/google/go-cmp v0.5.2
)

go 1.15
Expand Down
Loading