Aws auth fixes (#9825)

* Bring over PSIRT-37 changes from ENT

* Add additional allowed headers

* Already had this one

* Change to string slice comma separated parsing

* Add allowed_sts_header_values to read output

* Only validate AWS related request headers

* one per line

* Import ordering

* Update test

* Add X-Amz-Credential

* Reorder imports
This commit is contained in:
Scott Miller
2020-08-25 17:37:59 -05:00
committed by GitHub
parent cca11493ce
commit ade448cd47
5 changed files with 129 additions and 12 deletions

View File

@@ -17,6 +17,15 @@ import (
cache "github.com/patrickmn/go-cache"
)
const amzHeaderPrefix = "X-Amz-"
var defaultAllowedSTSRequestHeaders = []string{
"X-Amz-Date",
"X-Amz-Credential",
"X-Amz-Security-Token",
"X-Amz-Algorithm",
"X-Amz-Signature",
"X-Amz-SignedHeaders"}
func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error) {
b, err := Backend(conf)
if err != nil {