[
https://issues.apache.org/jira/browse/TS-4468?focusedWorklogId=28824&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28824
]
ASF GitHub Bot logged work on TS-4468:
--------------------------------------
Author: ASF GitHub Bot
Created on: 12/Sep/16 17:18
Start Date: 12/Sep/16 17:18
Worklog Time Spent: 10m
Work Description: Github user jpeach commented on a diff in the pull
request:
https://github.com/apache/trafficserver/pull/1000#discussion_r78414549
--- Diff: proxy/http/HttpSessionManager.cc ---
@@ -98,7 +113,10 @@ ServerSessionPool::acquireSession(sockaddr const *addr,
INK_MD5 const &hostname_
// Otherwise we need to scan further matches to match the host name as
well.
// Note we don't have to check the port because it's checked as part
of the IP address key.
if (TS_SERVER_SESSION_SHARING_MATCH_IP != match_style) {
- while (loc && loc->hostname_hash != hostname_hash) {
+ while (loc) {
+ if (loc->hostname_hash == hostname_hash && match_sni(sm,
loc->get_netvc())) {
--- End diff --
I don't think this is the right approach. ``match_sni`` should do exactly
what it's name claims and we should check in the caller whether we are looking
for a TLS session. I think that having ``match_sni`` make assumptions about the
match is spooky action at a distance that makes this harder to understand than
is necessary.
Issue Time Tracking
-------------------
Worklog Id: (was: 28824)
Time Spent: 1h (was: 50m)
> http.server_session_sharing.match = both unsafe with HTTPS
> ----------------------------------------------------------
>
> Key: TS-4468
> URL: https://issues.apache.org/jira/browse/TS-4468
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP, SSL
> Affects Versions: 6.1.1
> Reporter: Jered Floyd
> Assignee: Susan Hinrichs
> Fix For: 7.0.0
>
> Attachments: TS-4468.patch
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> proxy.config.http.server_session_sharing.match has a default value of "both",
> which compares IP address, port, and FQDN when determining whether a
> connection can be reused for further user agent requests.
> The "host" (FQDN) matching does not behave safely when ATS is operating as a
> reverse proxy. The compared value is the origin server FQDN after mapping,
> rather than the initial "Host" target.
> If multiple Hosts map to the same origin server and the scheme is HTTPS, ATS
> will attempt to reuse a connection that may have an SNI Host that does not
> match the HTTP Host. With Apache 2.4 origin servers this results in 400 Bad
> Request to the user agent.
> PROBLEM REPRODUCTION:
> You can observe this behavior with two mapping rules such as:
> map https://example.com/ https://origin.example.com/
> map https://www.example.com/ https://origin.example.com/
> Non-caching clients alternately fetching URIs from the two targets will see
> 400 Bad Request responses intermittently.
> WORKAROUND:
> proxy.config.http.server_session_sharing.match should have a default value of
> "none" when proxy.config.reverse_proxy.enabled is "1"
> SUGGESTED FIXES:
> In order of completeness:
> 1) Do not share server sessions on reverse_proxy requests.
> 2) Do not share server sessions on reverse_proxy requests where scheme is
> HTTPS.
> 3) Compare target host (SNI host) rather than replacement host when
> determining if reuse of server session is allowed (when
> server_session_sharing.match is set to "host" or "both").
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)