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

[1.8] Fix issues around tlsRedirect (#29895) #30134

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

howardjohn
Copy link
Member

This partially reverts #24958. This
PR did two things - allow using httpsRedirect without VirtualServices
(good) and remove all routes when using httpsRedirect (bad). The latter
breaks in two cases: when a user has an HTTPS server and they put
httpsRedirect, it previously was silently ignored - after the PR, all
the routes were dropped. With this change, these routes are added, and
users will get a warning at validation time since the config is not
useful.

The other case is that a user can have an HTTP server but still "bypass"
the httpsRedirect with X-Forward-Proto and num_trusted_hops, so removing
the routes breaks this.

Both of these cases have unit and integration tests.

Additionally, the original PR indirectly caused httpsRedirect=true to
take precedence during Gateway conflicts. Previously, the last gateway
won, which caused weird behavior. I kept the behavior of the original PR
here; during conflict we will keep the httpsRedirect. This isn't ideal,
since it interferes with cert-manager ACME requests. Longer term we will
want to make httpsRedirect per-route most likely. See
#27643 (comment) for
more info.

  • note

  • Fixes

  • fix lint

  • fix echo

(cherry picked from commit 56d740a)

Please provide a description for what this PR is for.

And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.

[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Pull Request Attributes

Please check any characteristics that apply to this pull request.

[ ] Does not have any changes that may affect Istio users.

@howardjohn howardjohn requested a review from a team January 15, 2021 23:05
@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Jan 15, 2021
@istio-testing istio-testing added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 15, 2021
* Fix issues around tlsRedirect

* Fixes istio#27315
* Fixes istio#27157

This partially reverts istio#24958. This
PR did two things - allow using httpsRedirect without VirtualServices
(good) and remove all routes when using httpsRedirect (bad). The latter
breaks in two cases: when a user has an HTTPS server and they put
httpsRedirect, it previously was silently ignored - after the PR, all
the routes were dropped. With this change, these routes are added, and
users will get a warning at validation time since the config is not
useful.

The other case is that a user can have an HTTP server but still "bypass"
the httpsRedirect with X-Forward-Proto and num_trusted_hops, so removing
the routes breaks this.

Both of these cases have unit and integration tests.

Additionally, the original PR indirectly caused httpsRedirect=true to
take precedence during Gateway conflicts. Previously, the last gateway
won, which caused weird behavior. I kept the behavior of the original PR
here; during conflict we will keep the httpsRedirect. This isn't ideal,
since it interferes with cert-manager ACME requests. Longer term we will
want to make httpsRedirect per-route most likely. See
istio#27643 (comment) for
more info.

* note

* Fixes

* fix lint

* fix echo

(cherry picked from commit 56d740a)
@howardjohn
Copy link
Member Author

/retest

@howardjohn howardjohn changed the title Fix issues around tlsRedirect (#29895) [1.8] Fix issues around tlsRedirect (#29895) Jan 19, 2021
@istio-testing istio-testing merged commit ce76abc into istio:release-1.8 Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants