package aws
import "github.com/open-policy-agent/opa/internal/providers/aws"
modified from github.com/aws/aws-sdk-go-v2/internal/v4a@7a32d707af
Index ¶
- Constants
- func SetRandomSource(reader io.Reader)
- func SignV4(headers map[string][]string, method string, theURL *url.URL, body []byte, service string, awsCreds Credentials, theTime time.Time) (string, map[string]string)
- func SignV4a(headers map[string][]string, method string, theURL *url.URL, body []byte, service string, awsCreds Credentials, theTime time.Time) map[string][]string
- type Credentials
Constants ¶
const ( // AmzRegionSetKey represents the region set header used for sigv4a AmzRegionSetKey = "X-Amz-Region-Set" )
Functions ¶
func SetRandomSource ¶
SetRandomSource used for testing to override rand so tests can expect stable output
func SignV4 ¶
func SignV4(headers map[string][]string, method string, theURL *url.URL, body []byte, service string, awsCreds Credentials, theTime time.Time) (string, map[string]string)
SignV4 modifies a map[string][]string of headers to generate an AWS V4 signature + headers based on the config/credentials provided.
func SignV4a ¶
func SignV4a(headers map[string][]string, method string, theURL *url.URL, body []byte, service string, awsCreds Credentials, theTime time.Time) map[string][]string
SignV4a returns a map[string][]string of headers, including an added AWS V4a signature based on the config/credentials provided.
Types ¶
type Credentials ¶
func CredentialsFromObject ¶
func CredentialsFromObject(v ast.Object) Credentials
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal/providers/aws/crypto | |
internal/providers/aws/v4 |
- Version
- v0.49.0
- Published
- Feb 7, 2023
- Platform
- linux/amd64
- Imports
- 23 packages
- Last checked
- 46 minutes ago –
Tools for package owners.