-
Notifications
You must be signed in to change notification settings - Fork 851
add host_override to parent.config and other sni name fixes #12868
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR updates parent/SNI handling so ATS can override the outbound Host/SNI name when using a parent (e.g., another CDN), and adds a gold test + TLS fixtures to validate parent failover behavior.
Changes:
- Add
host_overridesupport toparent.configparsing and expose it onParentResult. - Update Host header override behavior in parent selection / next-hop strategy paths, and harden SNI server_name handling.
- Add a TLS parent-failover gold test plus associated cert/key fixtures and helper scripts.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gold_tests/tls/valgrind.sh | Helper script to run Traffic Server under valgrind for TLS gold tests. |
| tests/gold_tests/tls/tls_sni_parent_failover.test.py | New gold test for SNI/Host behavior during parent failover with host override. |
| tests/gold_tests/tls/ssl/server-foo.pem | TLS cert fixture for foo.com origin. |
| tests/gold_tests/tls/ssl/server-foo.key | TLS private key fixture for foo.com origin. |
| tests/gold_tests/tls/ssl/server-bar.pem | TLS cert fixture for bar.com origin. |
| tests/gold_tests/tls/ssl/server-bar.key | TLS private key fixture for bar.com origin. |
| tests/gold_tests/tls/ssl/gen_foobar_certs.sh | Script for regenerating the foo/bar TLS fixtures used by the new test. |
| src/proxy/http/remap/NextHopSelectionStrategy.cc | Adjust Host header override to target the correct request header depending on state. |
| src/proxy/http/HttpTransact.cc | Apply Host override when parent.config selects a parent with host_override=true. |
| src/proxy/http/HttpSM.cc | Null/empty handling fix for outbound SNI when policy is server_name. |
| src/proxy/ParentSelection.cc | Parse host_override from parent.config. |
| include/proxy/http/remap/NextHopSelectionStrategy.h | Remove redundant include (via HttpTransact) after new host_override handling. |
| include/proxy/ParentSelection.h | Add host_override flag to ParentRecord and accessor on ParentResult. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes to sni name handling when using another CDN as parent.
This adds "host_override" to parent.config and has some fixes for the strategies handling of same option.