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 e554d8545f Add CMake support for building uri_signing plugin (#10702)
e554d8545f is described below

commit e554d8545f07d4375399b010d238b7bee3be20f3
Author: Brian Olsen <[email protected]>
AuthorDate: Thu Nov 2 09:23:33 2023 -0600

    Add CMake support for building uri_signing plugin (#10702)
    
    * add CMakeLists for uri_signing and unit tests
    
    * add cmake finders for cjose/jansson
    
    * check if cjose/jansson found
    
    * uri_signing remove pcre and make jansson public
    
    * get the uri_signing uni t test to build
    
    * uri_signing: refactor the main continuation to remove all but fail goto
    
    * add back in libraries that make the unit test link
---
 CMakeLists.txt                                     |   2 +
 .../CMakeLists.txt => cmake/Findcjose.cmake        |  58 ++++---
 cmake/Findjansson.cmake                            |  49 ++++++
 plugins/experimental/CMakeLists.txt                |   3 +
 .../experimental/{ => uri_signing}/CMakeLists.txt  |  52 +++---
 .../uri_signing/unit_tests/CMakeLists.txt          |  51 ++++++
 .../uri_signing/unit_tests/uri_signing_test.cc     |   4 +
 plugins/experimental/uri_signing/uri_signing.cc    | 183 +++++++++------------
 .../pluginTest/uri_signing/uri_signing.test.py     |   4 +-
 9 files changed, 248 insertions(+), 158 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84a49f340a..7e50734a5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,6 +104,8 @@ auto_option(
 )
 auto_option(LUAJIT PACKAGE_DEPENDS LuaJIT)
 auto_option(UNWIND FEATURE_VAR TS_USE_REMOTE_UNWINDING PACKAGE_DEPENDS unwind)
+auto_option(CJOSE PACKAGE_DEPENDS cjose)
+auto_option(JANSSON PACKAGE_DEPENDS jansson)
 
 option(ENABLE_ASAN "Use address sanitizer (default OFF)")
 option(ENABLE_FUZZING "Enable fuzzing (default OFF)")
diff --git a/plugins/experimental/CMakeLists.txt b/cmake/Findcjose.cmake
similarity index 51%
copy from plugins/experimental/CMakeLists.txt
copy to cmake/Findcjose.cmake
index 539c502f4c..641eb302ee 100644
--- a/plugins/experimental/CMakeLists.txt
+++ b/cmake/Findcjose.cmake
@@ -15,29 +15,35 @@
 #
 #######################
 
-add_subdirectory(access_control)
-add_subdirectory(block_errors)
-add_subdirectory(cache_fill)
-add_subdirectory(cert_reporting_tool)
-add_subdirectory(cookie_remap)
-add_subdirectory(custom_redirect)
-add_subdirectory(fq_pacing)
-add_subdirectory(geoip_acl)
-add_subdirectory(header_freq)
-add_subdirectory(hook-trace)
-add_subdirectory(http_stats)
-add_subdirectory(icap)
-add_subdirectory(inliner)
-add_subdirectory(maxmind_acl)
-add_subdirectory(memcache)
-add_subdirectory(memory_profile)
-add_subdirectory(money_trace)
-add_subdirectory(mp4)
-add_subdirectory(rate_limit)
-add_subdirectory(redo_cache_lookup)
-add_subdirectory(sslheaders)
-add_subdirectory(stek_share)
-add_subdirectory(stream_editor)
-add_subdirectory(system_stats)
-add_subdirectory(tls_bridge)
-add_subdirectory(url_sig)
+# Findcjose.cmake
+#
+# This will define the following variables
+#
+#     cjose_FOUND
+#     cjose_LIBRARY
+#     cjose_INCLUDE_DIRS
+#
+# and the following imported targets
+#
+#     cjose::cjose
+#
+
+find_library(cjose_LIBRARY NAMES cjose)
+find_path(cjose_INCLUDE_DIR NAMES cjose/cjose.h)
+
+mark_as_advanced(cjose_FOUND cjose_LIBRARY cjose_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(cjose
+    REQUIRED_VARS cjose_LIBRARY cjose_INCLUDE_DIR
+)
+
+if(cjose_FOUND)
+    set(cjose_INCLUDE_DIRS ${cjose_INCLUDE_DIR})
+endif()
+
+if(cjose_FOUND AND NOT TARGET cjose::cjose)
+    add_library(cjose::cjose INTERFACE IMPORTED)
+    target_include_directories(cjose::cjose INTERFACE ${cjose_INCLUDE_DIRS})
+    target_link_libraries(cjose::cjose INTERFACE "${cjose_LIBRARY}")
+endif()
diff --git a/cmake/Findjansson.cmake b/cmake/Findjansson.cmake
new file mode 100644
index 0000000000..ce00d4d873
--- /dev/null
+++ b/cmake/Findjansson.cmake
@@ -0,0 +1,49 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional 
information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache 
License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the 
License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software 
distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+#  or implied. See the License for the specific language governing permissions 
and limitations under
+#  the License.
+#
+#######################
+
+# Findjansson.cmake
+#
+# This will define the following variables
+#
+#     jansson_FOUND
+#     jansson_LIBRARY
+#     jansson_INCLUDE_DIRS
+#
+# and the following imported targets
+#
+#     jansson::jansson
+#
+
+find_library(jansson_LIBRARY NAMES jansson)
+find_path(jansson_INCLUDE_DIR NAMES jansson.h)
+
+mark_as_advanced(jansson_FOUND jansson_LIBRARY jansson_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(jansson
+    REQUIRED_VARS jansson_LIBRARY jansson_INCLUDE_DIR
+)
+
+if(jansson_FOUND)
+    set(jansson_INCLUDE_DIRS ${jansson_INCLUDE_DIR})
+endif()
+
+if(jansson_FOUND AND NOT TARGET jansson::jansson)
+    add_library(jansson::jansson INTERFACE IMPORTED)
+    target_include_directories(jansson::jansson INTERFACE 
${jansson_INCLUDE_DIRS})
+    target_link_libraries(jansson::jansson INTERFACE "${jansson_LIBRARY}")
+endif()
diff --git a/plugins/experimental/CMakeLists.txt 
b/plugins/experimental/CMakeLists.txt
index 539c502f4c..d33511ca98 100644
--- a/plugins/experimental/CMakeLists.txt
+++ b/plugins/experimental/CMakeLists.txt
@@ -40,4 +40,7 @@ add_subdirectory(stek_share)
 add_subdirectory(stream_editor)
 add_subdirectory(system_stats)
 add_subdirectory(tls_bridge)
+if(USE_CJOSE AND USE_JANSSON)
+  add_subdirectory(uri_signing)
+endif()
 add_subdirectory(url_sig)
diff --git a/plugins/experimental/CMakeLists.txt 
b/plugins/experimental/uri_signing/CMakeLists.txt
similarity index 52%
copy from plugins/experimental/CMakeLists.txt
copy to plugins/experimental/uri_signing/CMakeLists.txt
index 539c502f4c..3a711eeaa0 100644
--- a/plugins/experimental/CMakeLists.txt
+++ b/plugins/experimental/uri_signing/CMakeLists.txt
@@ -15,29 +15,29 @@
 #
 #######################
 
-add_subdirectory(access_control)
-add_subdirectory(block_errors)
-add_subdirectory(cache_fill)
-add_subdirectory(cert_reporting_tool)
-add_subdirectory(cookie_remap)
-add_subdirectory(custom_redirect)
-add_subdirectory(fq_pacing)
-add_subdirectory(geoip_acl)
-add_subdirectory(header_freq)
-add_subdirectory(hook-trace)
-add_subdirectory(http_stats)
-add_subdirectory(icap)
-add_subdirectory(inliner)
-add_subdirectory(maxmind_acl)
-add_subdirectory(memcache)
-add_subdirectory(memory_profile)
-add_subdirectory(money_trace)
-add_subdirectory(mp4)
-add_subdirectory(rate_limit)
-add_subdirectory(redo_cache_lookup)
-add_subdirectory(sslheaders)
-add_subdirectory(stek_share)
-add_subdirectory(stream_editor)
-add_subdirectory(system_stats)
-add_subdirectory(tls_bridge)
-add_subdirectory(url_sig)
+project(uri_signing)
+
+add_atsplugin(
+  uri_signing
+  common.cc
+  config.cc
+  cookie.cc
+  jwt.cc
+  match.cc
+  normalize.cc
+  parse.cc
+  timing.cc
+  uri_signing.cc
+)
+
+target_link_libraries(
+  uri_signing
+  PRIVATE
+  cjose::cjose
+  PUBLIC
+  jansson::jansson
+)
+
+if(BUILD_TESTING)
+  add_subdirectory(unit_tests)
+endif()
diff --git a/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt 
b/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt
new file mode 100644
index 0000000000..7130ac97bf
--- /dev/null
+++ b/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt
@@ -0,0 +1,51 @@
+#######################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+#  agreements.  See the NOTICE file distributed with this work for additional 
information regarding
+#  copyright ownership.  The ASF licenses this file to you under the Apache 
License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with the 
License.  You may obtain
+#  a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software 
distributed under the License
+#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+#  or implied. See the License for the specific language governing permissions 
and limitations under
+#  the License.
+#
+#######################
+
+add_executable(
+  uri_signing_test
+  uri_signing_test.cc
+  ${PROJECT_SOURCE_DIR}/jwt.cc
+  ${PROJECT_SOURCE_DIR}/common.cc
+  ${PROJECT_SOURCE_DIR}/config.cc
+  ${PROJECT_SOURCE_DIR}/cookie.cc
+  ${PROJECT_SOURCE_DIR}/jwt.cc
+  ${PROJECT_SOURCE_DIR}/match.cc
+  ${PROJECT_SOURCE_DIR}/normalize.cc
+  ${PROJECT_SOURCE_DIR}/parse.cc
+  ${PROJECT_SOURCE_DIR}/timing.cc
+  ${PROJECT_SOURCE_DIR}/uri_signing.cc
+  ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+  uri_signing_test
+  PRIVATE
+  catch2::catch2
+  jansson::jansson
+  cjose::cjose
+  ts::tsapi
+  ts::http
+  ts::hdrs
+  ts::proxy
+  ts::configmanager
+  ts::logging
+  ts::inknet
+  OpenSSL::SSL
+  OpenSSL::Crypto
+)
+add_test(NAME uri_signing_test COMMAND uri_signing_test)
diff --git a/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc 
b/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc
index a2e882ddfc..aaf02588fc 100644
--- a/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc
+++ b/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc
@@ -34,6 +34,10 @@ extern "C" {
 #include "../match.h"
 #include "../config.h"
 
+#include "tscore/Version.h"
+
+AppVersionInfo appVersionInfo;
+
 static char const *const testConfig =
   R"(
 {
diff --git a/plugins/experimental/uri_signing/uri_signing.cc 
b/plugins/experimental/uri_signing/uri_signing.cc
index 32b40f5d68..00c40a6e80 100644
--- a/plugins/experimental/uri_signing/uri_signing.cc
+++ b/plugins/experimental/uri_signing/uri_signing.cc
@@ -154,17 +154,10 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, 
TSRemapRequestInfo *rri)
 {
   static char const *const package = "URISigningPackage";
 
-  struct timer t;
-  start_timer(&t);
-
-  const int max_cpi          = 20;
-  int64_t checkpoints[20]    = {0};
-  int cpi                    = 0;
   int url_ct                 = 0;
   const char *url            = nullptr;
   char *strip_uri            = nullptr;
   TSRemapStatus status       = TSREMAP_NO_REMAP;
-  bool checked_auth          = false;
   struct jwt *jwt            = nullptr;
   int checked_cookies        = 0;
   size_t client_cookie_sz_ct = 0;
@@ -174,29 +167,31 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, 
TSRemapRequestInfo *rri)
   size_t strip_ct            = 0;
   cjose_jws_t *jws           = nullptr;
 
-  auto check_cookies = [&](bool more) -> bool {
-    if (!more) {
-      /* There is no valid token in the url */
+  // check the pristine url for a jws, strip if requested
+  // continue if valid auth_directive found (passthrough)
+  // check url for valid jwt
+  // else check all cookies for valid jwt
+  // else 403
+
+  // caller must check
+  auto check_next_cookie = [&]() -> bool {
+    if (0 == checked_cookies) { // first call
+      // There is no valid token in the url
       strncpy(strip_uri, url, url_ct);
       strip_ct = url_ct;
       ++checked_cookies;
 
-      TSMLoc field;
-      TSMBuffer buffer;
-      TSMLoc hdr;
+      TSMBuffer buffer = nullptr;
+      TSMLoc hdr       = TS_NULL_MLOC;
 
       if (TSHttpTxnClientReqGet(txnp, &buffer, &hdr) == TS_ERROR) {
         return false;
       }
 
-      field = TSMimeHdrFieldFind(buffer, hdr, "Cookie", 6);
+      TSMLoc field = TSMimeHdrFieldFind(buffer, hdr, "Cookie", 6);
       if (field == TS_NULL_MLOC) {
         TSHandleMLocRelease(buffer, TS_NULL_MLOC, hdr);
-        if (!checked_auth) {
-          return true;
-        } else {
-          return false;
-        }
+        return false;
       }
 
       client_cookie = TSMimeHdrFieldValueStringGet(buffer, hdr, field, 0, 
&client_cookie_ct);
@@ -205,34 +200,29 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, 
TSRemapRequestInfo *rri)
       TSHandleMLocRelease(buffer, TS_NULL_MLOC, hdr);
 
       if (!client_cookie || !client_cookie_ct) {
-        if (!checked_auth) {
-          return true;
-        } else {
-          return false;
-        }
+        return false;
       }
       client_cookie_sz_ct = client_cookie_ct;
     }
-    if (cpi < max_cpi) {
-      checkpoints[cpi++] = mark_timer(&t);
-    }
     jws = get_jws_from_cookie(&client_cookie, &client_cookie_sz_ct, package);
     return true;
   };
 
-  TSMBuffer mbuf;
-  TSMLoc ul;
-  TSReturnCode rc = TSHttpTxnPristineUrlGet(txnp, &mbuf, &ul);
+  // function start
+
+  // Check the pristine url
+  TSMBuffer mbuf        = NULL;
+  TSMLoc ul             = TS_NULL_MLOC;
+  TSReturnCode const rc = TSHttpTxnPristineUrlGet(txnp, &mbuf, &ul);
   if (rc != TS_SUCCESS) {
     PluginError("Failed call to TSHttpTxnPristineUrlGet()");
     goto fail;
   }
-  url = TSUrlStringGet(mbuf, ul, &url_ct);
 
+  url = TSUrlStringGet(mbuf, ul, &url_ct);
   TSHandleMLocRelease(mbuf, TS_NULL_MLOC, ul);
 
   PluginDebug("Processing request for %.*s.", url_ct, url);
-  checkpoints[cpi++] = mark_timer(&t);
 
   strip_size = url_ct + 1;
   strip_uri  = static_cast<char *>(TSmalloc(strip_size));
@@ -240,57 +230,50 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, 
TSRemapRequestInfo *rri)
 
   jws = get_jws_from_uri(url, url_ct, package, strip_uri, strip_size, 
&strip_ct);
 
-  checkpoints[cpi++] = mark_timer(&t);
-  if (!jws) {
-    if (!check_cookies(false)) {
-      goto fail;
-    }
-  } else {
-    /* There has been a JWS found in the url */
-    /* Strip the token from the URL for upstream if configured to do so */
-    if (config_strip_token(static_cast<struct config *>(ih))) {
-      if (static_cast<int>(strip_ct) != url_ct) {
-        int map_url_ct      = 0;
-        char *map_url       = nullptr;
-        char *map_strip_uri = nullptr;
-        map_url             = TSUrlStringGet(rri->requestBufp, 
rri->requestUrl, &map_url_ct);
-
-        PluginDebug("Stripping Token from requestUrl: %s", map_url);
-
-        int map_strip_size = map_url_ct + 1;
-        map_strip_uri      = static_cast<char *>(TSmalloc(map_strip_size));
-        memset(map_strip_uri, 0, map_strip_size);
-        size_t map_strip_ct = 0;
-
-        cjose_jws_t *map_jws = get_jws_from_uri(map_url, map_url_ct, package, 
map_strip_uri, map_strip_size, &map_strip_ct);
-        cjose_jws_release(map_jws);
-
-        char const *strip_uri_start = map_strip_uri;
-
-        /* map_strip_uri is null terminated */
-        size_t const mlen         = strlen(strip_uri_start);
-        char const *strip_uri_end = strip_uri_start + mlen;
-
-        PluginDebug("Stripping token from upstream url to: %.*s", (int)mlen, 
strip_uri_start);
-
-        TSParseResult parse_rc = TSUrlParse(rri->requestBufp, rri->requestUrl, 
&strip_uri_start, strip_uri_end);
-        if (map_url != nullptr) {
-          TSfree(map_url);
-        }
-        if (map_strip_uri != nullptr) {
-          TSfree(map_strip_uri);
-        }
-
-        if (parse_rc != TS_PARSE_DONE) {
-          PluginDebug("Error in TSUrlParse");
-          goto fail;
-        }
-        status = TSREMAP_DID_REMAP;
+  // if jws found in uri strip if configured
+  if (nullptr != jws) {
+    if (config_strip_token(static_cast<struct config *>(ih)) && 
static_cast<int>(strip_ct) != url_ct) {
+      int map_url_ct      = 0;
+      char *map_url       = nullptr;
+      char *map_strip_uri = nullptr;
+      map_url             = TSUrlStringGet(rri->requestBufp, rri->requestUrl, 
&map_url_ct);
+
+      PluginDebug("Stripping Token from requestUrl: %s", map_url);
+
+      int map_strip_size = map_url_ct + 1;
+      map_strip_uri      = static_cast<char *>(TSmalloc(map_strip_size));
+      memset(map_strip_uri, 0, map_strip_size);
+      size_t map_strip_ct = 0;
+
+      cjose_jws_t *map_jws = get_jws_from_uri(map_url, map_url_ct, package, 
map_strip_uri, map_strip_size, &map_strip_ct);
+      cjose_jws_release(map_jws);
+
+      char const *strip_uri_start = map_strip_uri;
+
+      /* map_strip_uri is null terminated */
+      size_t const mlen         = strlen(strip_uri_start);
+      char const *strip_uri_end = strip_uri_start + mlen;
+
+      PluginDebug("Stripping token from upstream url to: %.*s", (int)mlen, 
strip_uri_start);
+
+      TSParseResult parse_rc = TSUrlParse(rri->requestBufp, rri->requestUrl, 
&strip_uri_start, strip_uri_end);
+      if (map_url != nullptr) {
+        TSfree(map_url);
       }
+      if (map_strip_uri != nullptr) {
+        TSfree(map_strip_uri);
+      }
+
+      if (parse_rc != TS_PARSE_DONE) {
+        PluginDebug("Error in TSUrlParse");
+        goto fail;
+      }
+      status = TSREMAP_DID_REMAP;
     }
   }
-  /* Check auth_dir and pass through if configured */
-  if (uri_matches_auth_directive(static_cast<struct config *>(ih), url, 
url_ct)) {
+
+  // Check auth_dir and pass through if configured
+  if (uri_matches_auth_directive((struct config *)ih, url, url_ct)) {
     PluginDebug("Auth directive matched for %.*s", url_ct, url);
     if (url != nullptr) {
       TSfree((void *)url);
@@ -300,32 +283,32 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, 
TSRemapRequestInfo *rri)
     }
     return TSREMAP_NO_REMAP;
   }
-  checked_auth = true;
 
-  if (!jws) {
-    goto fail;
-  }
-
-  if (cpi < max_cpi) {
-    checkpoints[cpi++] = mark_timer(&t);
+  // check if valid jwt can be found in the uri jws
+  if (nullptr != jws) {
+    jwt = validate_jws(jws, static_cast<struct config *>(ih), strip_uri, 
strip_ct);
+    cjose_jws_release(jws);
+    jws = nullptr;
   }
 
-  jwt = validate_jws(jws, static_cast<struct config *>(ih), strip_uri, 
strip_ct);
-  cjose_jws_release(jws);
+  // if no jws in url, check all cookies
+  while (nullptr == jwt) {
+    // no more cookies or no more jws from the cookie
+    if (!check_next_cookie() || nullptr == jws) {
+      goto fail;
+    }
 
-  if (cpi < max_cpi) {
-    checkpoints[cpi++] = mark_timer(&t);
+    jwt = validate_jws(jws, static_cast<struct config *>(ih), strip_uri, 
strip_ct);
+    cjose_jws_release(jws);
+    jws = nullptr;
   }
-  if (jwt || check_cookies(checked_cookies)) {
-    /* There has been a validated JWT found in either the cookie or url */
 
+  // There has been a validated JWT found in either the cookie or url
+  if (nullptr != jwt) {
     struct signer *signer = config_signer(static_cast<struct config *>(ih));
     char *cookie          = renew(jwt, signer->issuer, signer->jwk, 
signer->alg, package, strip_uri, strip_ct);
     jwt_delete(jwt);
 
-    if (cpi < max_cpi) {
-      checkpoints[cpi++] = mark_timer(&t);
-    }
     if (cookie) {
       PluginDebug("Scheduling cookie callback for %.*s", url_ct, url);
       TSCont cont = cont_new(cookie);
@@ -334,13 +317,6 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, 
TSRemapRequestInfo *rri)
       PluginDebug("No cookie scheduled for %.*s", url_ct, url);
     }
 
-    int64_t last_mark = 0;
-    for (int i = 0; i < cpi; ++i) {
-      PluginDebug("Spent %" PRId64 " ns in checkpoint %d.", checkpoints[i] - 
last_mark, i);
-      last_mark = checkpoints[i];
-    }
-    PluginDebug("Spent %" PRId64 " ns uri_signing verification of %.*s.", 
mark_timer(&t), url_ct, url);
-
     TSfree((void *)url);
     if (strip_uri != nullptr) {
       TSfree(strip_uri);
@@ -351,7 +327,6 @@ fail:
   TSHttpTxnStatusSet(txnp, TS_HTTP_STATUS_FORBIDDEN);
   if (url != nullptr) {
     PluginDebug("Invalid JWT for %.*s", url_ct, url);
-    PluginDebug("Spent %" PRId64 " ns uri_signing verification of %.*s.", 
mark_timer(&t), url_ct, url);
     TSfree((void *)url);
   }
   if (strip_uri != nullptr) {
diff --git a/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py 
b/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py
index 1208cbf632..78cb908f55 100644
--- a/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py
+++ b/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py
@@ -77,7 +77,8 @@ ts = Test.MakeATSProcess("ts", enable_cache=False)
 ts.Disk.records_config.update({
     'proxy.config.diags.debug.enabled': 1,
     'proxy.config.diags.debug.tags': 'uri_signing|http',
-    #  'proxy.config.diags.debug.tags': 'uri_signing',
+    # 'proxy.config.plugin.dynamic_reload_mode': 0,
+    # 'proxy.config.diags.debug.tags': 'uri_signing',
 })
 
 # Use unchanged incoming URL.
@@ -204,7 +205,6 @@ ps.Streams.stderr = "gold/200.gold"
 tr.StillRunningAfter = server
 tr.StillRunningAfter = ts
 
-
 # 12 - Check missing iss from the payload
 tr = Test.AddTestRun("Missing iss field in the payload")
 ps = tr.Processes.Default

Reply via email to