-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: support sigv4 signing --------- Signed-off-by: obanby <[email protected]>
- Loading branch information
Showing
9 changed files
with
826 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package sigv4 | ||
|
||
const ( | ||
// Amazon Managed Service for Prometheus | ||
awsServiceName = "aps" | ||
|
||
signingAlgorithm = "AWS4-HMAC-SHA256" | ||
|
||
authorizationHeaderKey = "Authorization" | ||
amzDateKey = "X-Amz-Date" | ||
|
||
// emptyStringSHA256 is the hex encoded sha256 value of an empty string | ||
emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` | ||
|
||
// timeFormat is the time format to be used in the X-Amz-Date header or query parameter | ||
timeFormat = "20060102T150405Z" | ||
|
||
// shortTimeFormat is the shorten time format used in the credential scope | ||
shortTimeFormat = "20060102" | ||
|
||
// contentSHAKey is the SHA256 of request body | ||
contentSHAKey = "X-Amz-Content-Sha256" | ||
) |
Oops, something went wrong.