-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a test case on input contract validation #3315
Conversation
7c90924
to
7316b8f
Compare
7316b8f
to
7da400c
Compare
👍 |
filters/openpolicyagent/opaauthorizerequest/opaauthorizerequest_test.go
Outdated
Show resolved
Hide resolved
for name, values := range ti.removeHeaders { | ||
for _, value := range values { | ||
req.Header.Add(name, value) //adding the headers to validate removal. | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be unused by the test cases. Lets remove all unused testcase fields and introduce them later along with testcases that utilize them.
for name, values := range ti.requestHeaders { | ||
for _, value := range values { | ||
req.Header.Add(name, value) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can simply assign here like req.Header = ti.requestHeaders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to not do this as it internally initiated with default values—including the "User-Agent: Go-http-client/1.1" header leading to some hidden side effects.
filters/openpolicyagent/opaauthorizerequest/opaauthorizerequest_test.go
Outdated
Show resolved
Hide resolved
filters/openpolicyagent/opaauthorizerequest/opaauthorizerequest_test.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
c34d422
to
12e45e9
Compare
Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
12e45e9
to
f76b2e0
Compare
👍 |
1 similar comment
👍 |
Confirm the included cases of envoy input format included in Skipper.
HTTP2 headers are not supported yet.
Also below items are not supported though available in the envoy input format.
input.attributes.request.http.protocol == "HTTP/1.1" input.attributes.destination.address.socketAddress.address == "10.25.95.68" input.attributes.destination.address.socketAddress.portValue == 8000 input.attributes.source.address.socketAddress.address == "10.25.95.69" input.attributes.source.address.socketAddress.portValue == 33772 input.attributes.request.http.headers[":authority"] == "example-app"