Skip to content
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

Forwarded header #4376

Merged
merged 7 commits into from
Jun 21, 2019
Merged

Conversation

tanzeeb
Copy link
Contributor

@tanzeeb tanzeeb commented Jun 15, 2019

Fixes #3112

Proposed Changes

Add a ForwardedShimHandler to the queue-proxy chain, which constructs a forwarded http header from the information available in the x-forwarded-* headers.

Release Note

The `forwarded` header will be set on requests based on the information in the `x-forwarded-for`, `x-forwarded-host` and `x-forwarded-proto` headers. If the request already has a `forwarded` header set, it will be used instead. 

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 15, 2019
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 15, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tanzeeb: 0 warnings.

In response to this:

Fixes #3112

Proposed Changes

Add a ForwardedShimHandler to the queue-proxy chain, which constructs a forwarded http header from the information available in the x-forwarded-* headers.

Release Note

The `forwarded` header will be set on requests based on the information in the `x-forwarded-for`, `x-forwarded-host` and `x-forwarded-proto` headers. If the request already has a `forwarded` header set, it will be used instead.  Note: IPv6 addresses in `x-forwarded-for` are not supported.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added area/networking area/test-and-release It flags unit/e2e/conformance/perf test issues for product features labels Jun 15, 2019
@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 15, 2019

/assign @dgerd

@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 17, 2019

/assign @mattmoor

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple nits. I'll leave the rest to Dan or Nghia

/assign @tcnghia

@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 17, 2019

/test pull-knative-serving-upgrade-tests

1 similar comment
@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 17, 2019

/test pull-knative-serving-upgrade-tests

@dgerd
Copy link

dgerd commented Jun 18, 2019

Let's get an issue open for the IPv6 support in addition to the TODO, but aside from the comments already here I am happy with this.

Thanks for picking this up Tanzeeb!

@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 19, 2019

/hold

I'll take a stab at IPv6 in this PR.

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 19, 2019
@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 19, 2019

Hey @vagababov thanks for the review, but do you mind marking the nits as such?

It helps me figure out if I'm missing something critical or if it's more of an opinion or stylistic change.

@vagababov
Copy link
Contributor

Hey @vagababov thanks for the review, but do you mind marking the nits as such?

It helps me figure out if I'm missing something critical or if it's more of an opinion or stylistic change.

The issues I left outside of tests, are not nits, IMO.

@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 19, 2019

/hold cancel

Hey folks, updated with IPv6 address support

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 19, 2019
@tanzeeb
Copy link
Contributor Author

tanzeeb commented Jun 19, 2019

/test pull-knative-serving-upgrade-tests
/test pull-knative-serving-smoke-tests
/test pull-knative-serving-integration-tests

@tcnghia
Copy link
Contributor

tcnghia commented Jun 20, 2019

/retest

@tcnghia
Copy link
Contributor

tcnghia commented Jun 20, 2019

/lgtm
/approve

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 20, 2019
@tcnghia
Copy link
Contributor

tcnghia commented Jun 20, 2019

/test pull-knative-serving-upgrade-tests
/test pull-knative-serving-unit-tests

@tanzeeb tanzeeb force-pushed the forwarded-header branch from c4e2fab to ce7a470 Compare June 20, 2019 23:04
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 20, 2019
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/queue/forwarded_shim.go Do not exist 100.0%

@tcnghia
Copy link
Contributor

tcnghia commented Jun 21, 2019

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tanzeeb, tcnghia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mattmoor
Copy link
Member

/retest

@knative-prow-robot knative-prow-robot merged commit 870ad26 into knative:master Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/networking area/test-and-release It flags unit/e2e/conformance/perf test issues for product features cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Forwarded" header not set as specified in runtime contract
9 participants