Tarun Koyalwar 7f5e4e2336
aws signer: fix missing x-content-sha256 header (#3601)
* fix missing x-content-sha256 header

* fix variable priority in self-contained templates

* remove debug statement

* adds generic raw request parser for self-contained req

* more integration tests

* bug fix: 10x faster race requests

* fix failing integration test
2023-05-01 12:15:35 +05:30

25 lines
1.1 KiB
Go

package variables
// There are total 5 sources of variables
// 1. VariablesMap - Variables defined in the template (available at Request.options.Variables in protocols)
// 2. PayloadsMap - Payloads defined in the template (available at Request.generator in protocols)
// 3. OptionsMap - Variables passed using CLI Options (+ Env) (available at generators.BuildPayloadFromOptions)
// 4. DynamicMap - Variables Obtained by extracting data from templates (available at Request.ExecuteWithResults + merged with previous internalEvent)
// 5. ProtocolMap - Variables generated by Evaluation Request / Responses of xyz protocol (available in Request.Make)
// As we can tell , all variables sources are not linear i.e why they need to re-evaluated
// consider example
// variables:
// - name: "username@{{Host}}"
// Linear Sources (once obtained no need to re-evaluate)
// simply put they don't contain references to other variables
// 1. OptionsMap
// 2. DynamicMap
// 3. ProtocolMap
// Non-Linear Sources (need to re-evaluate)
// 1. VariablesMap
// 2. PayloadsMap
// Everytime Linear Sources are updated , Non-Linear Sources need to be re-evaluated