[trafficserver-ingress-controller] branch master updated: ATS 9.1.0 upgrade (#93)

2021-08-18 Thread kichan
This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/trafficserver-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
 new 0fac8c4  ATS 9.1.0 upgrade (#93)
0fac8c4 is described below

commit 0fac8c4101af1418a4726548c9302eb69d5dc76a
Author: Kit Chan 
AuthorDate: Wed Aug 18 16:55:01 2021 -0700

ATS 9.1.0 upgrade (#93)
---
 Dockerfile | 4 ++--
 README.md  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index e1f445f..c934ea0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -33,8 +33,8 @@ RUN addgroup -Sg 1000 ats
 RUN adduser -S -D -H -u 1000 -h /tmp -s /sbin/nologin -G ats -g ats ats
 
 # download and build ATS
-RUN curl -L 
https://downloads.apache.org/trafficserver/trafficserver-9.0.2.tar.bz2 | bzip2 
-dc | tar xf - \
-  && cd trafficserver-9.0.2/ \
+RUN curl -L 
https://downloads.apache.org/trafficserver/trafficserver-9.1.0.tar.bz2 | bzip2 
-dc | tar xf - \
+  && cd trafficserver-9.1.0/ \
   && autoreconf -if \
   && ./configure --enable-debug=yes --prefix=/opt/ats --with-user=ats \
   && make \
diff --git a/README.md b/README.md
index 1242508..438ec79 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ ATS Kubernetes Ingress Controller
 
 ## Versions of Software Used
 - Alpine 3.12.7
-- Apache Traffic Server 9.0.2
+- Apache Traffic Server 9.1.0
 - LuaJIT 2.0.4 / Lua 5.1.4
 - Go 1.15.11
 - Other Packages


[trafficserver] branch master updated: Doc: Notes of setting Environment Variables for traffic_server (#8258)

2021-08-18 Thread masaori
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 45f155f  Doc: Notes of setting Environment Variables for 
traffic_server (#8258)
45f155f is described below

commit 45f155f28a455a9f2599e5e1540bc3b5bdef82a2
Author: Masaori Koshiba 
AuthorDate: Thu Aug 19 07:46:02 2021 +0900

Doc: Notes of setting Environment Variables for traffic_server (#8258)
---
 doc/admin-guide/files/records.config.en.rst | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/doc/admin-guide/files/records.config.en.rst 
b/doc/admin-guide/files/records.config.en.rst
index 2b7470d..0ff2048 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -191,6 +191,16 @@ System Variables
 
The name of the executable that runs the :program:`traffic_server` process.
 
+   If you want to set Environment Variables for :program:`traffic_server` 
process, use a wrapper script like below. ::
+
+ CONFIG proxy.config.proxy_binary STRING start_traffic_server.sh
+
+   ::
+
+ #!/bin/sh
+ export ASAN_OPTIONS=detect_leaks=1
+ /opt/ats/bin/traffic_server "$@"
+
 .. ts:cv:: CONFIG proxy.config.proxy_binary_opts STRING -M
 
The :ref:`command-line options ` for starting |TS|.


[trafficserver] branch master updated (968dae9 -> 7800364)

2021-08-18 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 968dae9  uri_signing: address memory leak with the internal jwt struct 
(#8229)
 add 7800364  Allow for graceful handling of ip_allow.yaml format errors 
(#8257)

No new revisions were added by this update.

Summary of changes:
 proxy/IPAllow.cc | 29 ++---
 1 file changed, 22 insertions(+), 7 deletions(-)


[trafficserver] branch master updated (0e98156 -> 968dae9)

2021-08-18 Thread bnolsen
This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 0e98156  Add some header tests (#8221)
 add 968dae9  uri_signing: address memory leak with the internal jwt struct 
(#8229)

No new revisions were added by this update.

Summary of changes:
 plugins/experimental/uri_signing/jwt.c |  3 +-
 plugins/experimental/uri_signing/jwt.h |  1 +
 plugins/experimental/uri_signing/parse.c   | 18 +++
 .../uri_signing/unit_tests/uri_signing_test.cc | 37 ++
 4 files changed, 31 insertions(+), 28 deletions(-)


[trafficserver] branch master updated: Add some header tests (#8221)

2021-08-18 Thread shinrich
This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 0e98156  Add some header tests (#8221)
0e98156 is described below

commit 0e981565cf8267199d3c20f7a790f824e5952a40
Author: Susan Hinrichs 
AuthorDate: Wed Aug 18 10:03:01 2021 -0500

Add some header tests (#8221)
---
 .../gold_tests/headers/good_request_after_bad.test.py | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/tests/gold_tests/headers/good_request_after_bad.test.py 
b/tests/gold_tests/headers/good_request_after_bad.test.py
index f65d542..1e5ca87 100644
--- a/tests/gold_tests/headers/good_request_after_bad.test.py
+++ b/tests/gold_tests/headers/good_request_after_bad.test.py
@@ -92,6 +92,25 @@ tr.Processes.Default.Command = 'printf "GET / 
HTTP/1.1\r\nhost: bob\r\ntransfer-
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.Streams.stdout = 'gold/bad_te_value.gold'
 
+tr = Test.AddTestRun("Another unsupported Transfer Encoding value")
+tr.Processes.Default.Command = 'printf "GET / HTTP/1.1\r\nhost: 
bob\r\ntransfer-encoding: \x08chunked\r\n\r\nGET / HTTP/1.1\r\nHost: 
boa\r\n\r\n" | nc  127.0.0.1 {}'.format(
+ts.Variables.port)
+tr.Processes.Default.ReturnCode = 0
+tr.Processes.Default.Streams.stdout = 'gold/bad_te_value.gold'
+
+tr = Test.AddTestRun("Extra characters in content-length")
+tr.Processes.Default.Command = 'printf "GET / HTTP/1.1\r\nhost: 
bob\r\ncontent-length:+3\r\n\r\nGET / HTTP/1.1\r\nHost: boa\r\n\r\n" | nc  
127.0.0.1 {}'.format(
+ts.Variables.port)
+tr.Processes.Default.ReturnCode = 0
+tr.Processes.Default.Streams.stdout = 'gold/bad_good_request_header.gold'
+
+tr = Test.AddTestRun("Different extra characters in content-length")
+tr.Processes.Default.Command = 'printf "GET / HTTP/1.1\r\nhost: 
bob\r\ncontent-length:\x0c3\r\n\r\nGET / HTTP/1.1\r\nHost: boa\r\n\r\n" | nc  
127.0.0.1 {}'.format(
+ts.Variables.port)
+tr.Processes.Default.ReturnCode = 0
+tr.Processes.Default.Streams.stdout = 'gold/bad_good_request_header.gold'
+
+
 # TRACE request with a body
 tr = Test.AddTestRun("Trace request with a body")
 tr.Processes.Default.Command = 'printf "TRACE /foo HTTP/1.1\r\nHost: 
bob\r\nContent-length:2\r\n\r\nokGET / HTTP/1.1\r\nHost: boa\r\n\r\n" | nc  
127.0.0.1 {}'.format(


[trafficserver] branch master updated: Fix log filters for IP conditions. (#8249)

2021-08-18 Thread bnolsen
This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 945452d  Fix log filters for IP conditions. (#8249)
945452d is described below

commit 945452d82eac3ccbc78d2ec3bd652562391b3ca6
Author: Brian Neradt 
AuthorDate: Wed Aug 18 07:52:46 2021 -0500

Fix log filters for IP conditions. (#8249)

Our log filter mechanism for IP addresses did not compare the filter's
specified IP address with the log field's IP address correctly. This
fixes that matching mechanism.

Fixes #6405
---
 proxy/logging/LogFilter.cc  | 16 +++-
 tests/gold_tests/logging/log-filter.test.py | 28 
 2 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/proxy/logging/LogFilter.cc b/proxy/logging/LogFilter.cc
index c15e02f..0dcfcd3 100644
--- a/proxy/logging/LogFilter.cc
+++ b/proxy/logging/LogFilter.cc
@@ -833,11 +833,17 @@ LogFilterIP::is_match(LogAccess *lad)
   bool zret = false;
 
   if (m_field && lad) {
-LogFieldIpStorage value;
-m_field->marshal(lad, reinterpret_cast());
-// This is bad, we abuse the fact that the initial layout of 
LogFieldIpStorage and IpAddr
-// are identical. We should look at converting the log stuff to use IpAddr 
directly.
-zret = m_map.contains(reinterpret_cast(value));
+LogFieldIpStorage field_ip_storage;
+m_field->marshal(lad, reinterpret_cast(_ip_storage));
+
+// Convert to the IpAddr type that the map holds.
+IpAddr field_ip;
+if (field_ip_storage._ip._family == AF_INET) {
+  field_ip = field_ip_storage._ip4._addr;
+} else if (field_ip_storage._ip._family == AF_INET6) {
+  field_ip = field_ip_storage._ip6._addr;
+}
+zret = m_map.contains(reinterpret_cast(field_ip));
   }
 
   return zret;
diff --git a/tests/gold_tests/logging/log-filter.test.py 
b/tests/gold_tests/logging/log-filter.test.py
index ee1f6b3..1257680 100644
--- a/tests/gold_tests/logging/log-filter.test.py
+++ b/tests/gold_tests/logging/log-filter.test.py
@@ -28,6 +28,9 @@ server = Test.MakeVerifierServerProcess("server", replay_file)
 nameserver = Test.MakeDNServer("dns", default='127.0.0.1')
 
 ts.Disk.records_config.update({
+'proxy.config.diags.debug.enabled': 1,
+'proxy.config.diags.debug.tags': 'log',
+
 'proxy.config.net.connections_throttle': 100,
 'proxy.config.dns.nameservers': f"127.0.0.1:{nameserver.Variables.Port}",
 'proxy.config.dns.resolv_conf': 'NULL'
@@ -41,17 +44,34 @@ ts.Disk.logging_yaml.AddLines(
 '''
 logging:
   filters:
+- name: only_localhost
+  action: accept
+  condition: chi MATCH 127.0.0.1
+
+- name: not_localhost
+  action: accept
+  condition: chi MATCH 3.3.3.3
+
 - name: queryparamescaper_cquuc
   action: WIPE_FIELD_VALUE
   condition: cquuc CASE_INSENSITIVE_CONTAIN 
password,secret,access_token,session_redirect,cardNumber,code,query,search-query,prefix,keywords,email,handle
+
   formats:
 - name: custom
   format: '%'
+
   logs:
 - filename: filter-test
   format: custom
   filters:
   - queryparamescaper_cquuc
+  - only_localhost
+
+- filename: should-not-be-written
+  format: custom
+  filters:
+  - queryparamescaper_cquuc
+  - not_localhost
 '''.split("\n")
 )
 
@@ -75,3 +95,11 @@ test_run.Processes.Default.Command = (
 os.path.join(ts.Variables.LOGDIR, 'filter-test.log')
 )
 test_run.Processes.Default.ReturnCode = 0
+
+# We already waited for the above, so we don't have to wait for this one.
+test_run = Test.AddTestRun()
+test_run.Processes.Default.Command = (
+os.path.join(Test.Variables.AtsTestToolsDir, 'condwait') + ' 1 1 -f ' +
+os.path.join(ts.Variables.LOGDIR, 'should-not-be-written.log')
+)
+test_run.Processes.Default.ReturnCode = 1