-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins/rest: SigV4 Signing for any AWS service
This adds a new `service` option to the `s3_signing` config, allowing for other AWS services (such as API Gateway endpoints) to be used for bundles, decision logs etc. For example: ``` services: decision-log-service: url: https://myrestapi.execute-api.ap-southeast-2.amazonaws.com/prod/ credentials: s3_signing: service: execute-api environment_credentials: {} decision_logs: service: decision-log-service reporting: min_delay_seconds: 300 max_delay_seconds: 600 ``` If no service is specified, we default to `s3` to maintain backwards compatibility. This updates the sigv4 signer to include the specified service in the signature, and to sign all request headers for better compatibility with other AWS services, except an explicit ignore list, as per https://github.com/aws/aws-sdk-go/blob/master/aws/signer/v4/v4.go#L92 Additionally, this fixes a bug in the signer where the body ReadCloser was consumed and not reset, meaning requests that were signed were always sent with an empty body! Fixes #3193 Signed-off-by: Jack Stevenson <jacsteve@amazon.com>
- Loading branch information
Showing
5 changed files
with
241 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.