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

NET-6821 Disable Terminating Gateway Auto Host Header Rewrite #20802

Merged
merged 6 commits into from
Mar 12, 2024

Conversation

sarahalsmiller
Copy link
Member

@sarahalsmiller sarahalsmiller commented Mar 6, 2024

Description

  • Exposing configuration to allow users of the terminating gateway to turn off host header rewrites at the service level

Testing & Reproduction steps

  • build local consul
  • apply the following terminating gateway
Kind = "terminating-gateway"
Name = "test-gateway"
Services = [
 {
   Name = "default-behavior"
 },
 {
   Name = "default-behavior-1"
   DisableAutoHostRewrite = true
 }
]

Observe the generated XDS and note that the default behavior is to auto host rewrite, but not when DisableAutoHostRewrite is set to true.

Links

PR Checklist

  • [ X ] updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

@sarahalsmiller sarahalsmiller requested a review from a team as a code owner March 6, 2024 22:04
@github-actions github-actions bot added theme/api Relating to the HTTP API interface theme/envoy/xds Related to Envoy support labels Mar 6, 2024
@blake blake linked an issue Mar 6, 2024 that may be closed by this pull request
@sarahalsmiller sarahalsmiller requested a review from a team as a code owner March 7, 2024 17:03
CAFile: svc.CAFile,
SNI: svc.SNI,
ServiceKind: kind,
AutoHostRewrite: !svc.DisableAutoHostRewrite,
Copy link
Member Author

Choose a reason for hiding this comment

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

My logic here is that by making this a flag you have to set to true it won't change any existing behavior in existing terminating gateway setups.

Copy link
Contributor

@boruszak boruszak left a comment

Choose a reason for hiding this comment

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

I reviewed the edits to terminating-gateway.mdx and left one suggestion.

Approving on behalf of consul-docs.

@david-yu
Copy link
Contributor

david-yu commented Mar 8, 2024

@sarahalsmiller Will an accompanying PR to update CRDs also follow? Looking forward this PR being merged!

@sarahalsmiller
Copy link
Member Author

@sarahalsmiller Will an accompanying PR to update CRDs also follow? Looking forward this PR being merged!

Yes it will. In my experience its just easier to wait until the original PR merges into core so you don't accidentally point the go.mod file at a commit that doesn't exist in main.

Copy link
Contributor

@missylbytes missylbytes left a comment

Choose a reason for hiding this comment

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

LGTM when all tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/api Relating to the HTTP API interface theme/envoy/xds Related to Envoy support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Host header autorewrite on terminating-gateway breaks some http flows
4 participants