proxy: add support for logging http request headers (#4388)

* config: add customization options for logging

* config: validate log fields

* proxy: add support for logging http request headers

* log subset of headers

* fix test name

* dont use log.HTTPHeaders for access logs

* canonicalize http/2 headers
This commit is contained in:
Caleb Doxsey 2023-07-25 09:46:42 -06:00 committed by GitHub
parent 4698e4661a
commit 638d9f3d6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 172 additions and 13 deletions

View file

@ -422,11 +422,11 @@ func TestEvaluator(t *testing.T) {
}{
{map[string]string{}, ""},
{map[string]string{
http.CanonicalHeaderKey(httputil.HeaderPomeriumJWTAssertion): "identity-a",
httputil.CanonicalHeaderKey(httputil.HeaderPomeriumJWTAssertion): "identity-a",
}, "identity-a"},
{map[string]string{
http.CanonicalHeaderKey(httputil.HeaderPomeriumJWTAssertionFor): "identity-a",
http.CanonicalHeaderKey(httputil.HeaderPomeriumJWTAssertion): "identity-b",
httputil.CanonicalHeaderKey(httputil.HeaderPomeriumJWTAssertionFor): "identity-a",
httputil.CanonicalHeaderKey(httputil.HeaderPomeriumJWTAssertion): "identity-b",
}, "identity-a"},
}
for _, tc := range tcs {