You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that rather than parsing these types of "text" configs once, we parse it over and over again (strcmp()) on each transaction hitting this code:
std::string_view
HttpSM::get_outbound_sni() const
{
using namespace ts::literals;
ts::TextView zret;
ts::TextView policy{t_state.txn_conf->ssl_client_sni_policy, ts::TextView::npos};
if (policy.empty() || !strcmp(policy, "host"_tv)) {
// By default the host header field value is used for the SNI.
int len;
char const *ptr = t_state.hdr_info.server_request.host_get(&len);
zret.assign(ptr, len);
} else if (ua_txn && !strcmp(policy, "server_name"_tv)) {
zret.assign(ua_txn->get_netvc()->get_server_name(), ts::TextView::npos);
} else if (policy.front() == '@') { // guaranteed non-empty from previous clause
zret = policy.remove_prefix(1);
} else {
// If other is specified, like "remap" and "verify_with_name_source", the remapped origin name is used for the SNI value
zret.assign(t_state.server_info.name, ts::TextView::npos);
}
return zret;
}
The tricky bit here is the value is not strictly an enumeration. It can have an arbitrary value as long as that value starts with "@". In such a case, the "@" is removed and the literal value is used as the outbound SNI. This means a string is required in some cases. What would be needed is an enumeration and a string, with the string set only when it's explicitly specified by a plugin.
This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.
Activity
masaori335 commentedon Mar 16, 2021
set_tls_optionshas the same issue (proxy.config.ssl.client.verify.server.policy/proxy.config.ssl.client.verify.server.properties), I think.trafficserver/proxy/http/HttpSM.cc
Lines 4810 to 4849 in d4fc16f
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
SolidWallOfCode commentedon Mar 29, 2021
The tricky bit here is the value is not strictly an enumeration. It can have an arbitrary value as long as that value starts with "@". In such a case, the "@" is removed and the literal value is used as the outbound SNI. This means a string is required in some cases. What would be needed is an enumeration and a string, with the string set only when it's explicitly specified by a plugin.
ywkaras commentedon Mar 29, 2021
Agreed https://github.com/ywkaras/trafficserver/blob/e21287f4da9bdb7b670e94c97736f5dd30b2a8ac/include/tscpp/util/CodeOrStr.h#L456 .
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
Fix for issue apache#7607
ywkaras commentedon Mar 29, 2021
It's unclear to me how using this function,
trafficserver/proxy/http/HttpConfig.cc
Line 74 in 6b28f19
github-actions commentedon Mar 31, 2022
This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.