mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
builtins: Add AWS Sig v4 signing builtin. (#5376)
This commit adds initial support for AWS's SigV4 request signing system, which will allow OPA's existing `http.send` builtin to be used to more conveniently query cloud resources. It automates away most of the pain around signing the request headers and body, and is designed to compose with `http.send` directly. Internally, this also refactors AWS SigV4 request signing, so that the signing logic is shared between the builtin and the REST plugin for AWS. Fixes: #3749 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit is contained in:
@@ -3074,6 +3074,50 @@
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "providers.aws.sign_req",
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rand.intn",
|
||||
"decl": {
|
||||
|
||||
Reference in New Issue
Block a user