Mercurial > stress-tester
changeset 1019:b2e6ddf33fff
Http filters prefix changed "http." "http"
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpBasicAuthLoginFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpBasicAuthLoginFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -34,7 +34,7 @@ private static final Logger LOGGER = LogManager.getLogger(HttpBasicAuthLoginFilter.class); - public static final String TYPE = "http.basicLogin"; + public static final String TYPE = "httpBasicLogin"; private static final Charset ASCII = Charset.forName("US-ASCII"); private static final ByteString BASIC = ByteString.create("Basic ");
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpCsrfFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpCsrfFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -199,7 +199,7 @@ } } - public static final String TYPE = "http.csrf"; + public static final String TYPE = "httpCsrf"; public static final String SESSION_KEY = "_csrfTokens";
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpCsrfFormFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpCsrfFormFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -35,7 +35,7 @@ "text/html", "application/xhtml+xml" )); - public static final String TYPE = "http.csrfForm"; + public static final String TYPE = "httpCsrfForm"; public static final String SESSION_KEY = "_csrfFormTokens";
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpDateFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpDateFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -15,7 +15,7 @@ @Plugin(name = HttpDateFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpDateFilter extends HttpFilter { - public static final String TYPE = "http.date"; + public static final String TYPE = "httpDate"; private TimeGenerator generator = TimeGenerator.getDefaultGenerator();
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpDigestAuthLoginFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpDigestAuthLoginFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -38,7 +38,7 @@ private static final Logger LOGGER = LogManager.getLogger(HttpDigestAuthLoginFilter.class); - public static final String TYPE = "http.digestLogin"; + public static final String TYPE = "httpDigestLogin"; public static final ByteString ALGO_MD5 = ByteString.create("MD5"); public static final ByteString ALGO_MD5_SESS = ByteString.create("MD5-sess");
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpDumper.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpDumper.java Wed Mar 25 14:01:15 2020 +0100 @@ -21,7 +21,7 @@ @Plugin(name = HttpDumper.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpDumper extends HttpFilter { - public static final String TYPE = "http.dumper"; + public static final String TYPE = "httpDumper"; private static final int MSG_REQ_ORIG = 0; private static final int MSG_REQ_PROC = 1;
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpFormLoginFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpFormLoginFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -32,7 +32,7 @@ private static final Logger LOGGER = LogManager.getLogger(HttpFormLoginFilter.class); - public static final String TYPE = "http.formLogin"; + public static final String TYPE = "httpFormLogin"; private final HttpMessageHelper helper = new HttpMessageHelper(false); // used in outbound only, instance per filter is OK private CharSequence userField;
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpHostRewriterFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpHostRewriterFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -29,7 +29,7 @@ @Plugin(name = HttpHostRewriterFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpHostRewriterFilter extends HttpFilter { - public static final String TYPE = "http.host"; + public static final String TYPE = "httpHost"; private static final Logger LOGGER = LogManager.getLogger(HttpHostRewriterFilter.class);
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpLogoutFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpLogoutFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -27,7 +27,7 @@ @Plugin(name = HttpLogoutFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpLogoutFilter extends HttpFilter { - public static final String TYPE = "http.logout"; + public static final String TYPE = "httpLogout"; private boolean invalidateSession = true;
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpMarkFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpMarkFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -35,7 +35,7 @@ @Plugin(name = HttpMarkFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpMarkFilter extends HttpFilter { - public static final String TYPE = "http.marker"; + public static final String TYPE = "httpMarker"; private static final int DEFAULT_MARKERS_CAPACITY = 2;
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpMessageModificationFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpMessageModificationFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -35,7 +35,7 @@ private static final Logger LOGGER = LogManager.getLogger(HttpMessageModificationFilter.class); - public static final String TYPE = "http.modifyMessage"; + public static final String TYPE = "httpModifyMessage"; private final List<Operation> operations = new ArrayList<>();
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpRequestCacheHeadersCleanerFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpRequestCacheHeadersCleanerFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -12,7 +12,7 @@ @Plugin(name = HttpRequestCacheHeadersCleanerFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpRequestCacheHeadersCleanerFilter extends HttpAbstractCleanerFilter { - public static final String TYPE = "http.requestCacheHeadersCleaner"; + public static final String TYPE = "httpRequestCacheHeadersCleaner"; public static final ByteString[] CACHE_HEADERS = { IF_MODIFIED_SINCE, IF_NONE_MATCH
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpRequestProxyHeadersCleanerFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpRequestProxyHeadersCleanerFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -12,7 +12,7 @@ @Plugin(name = HttpRequestProxyHeadersCleanerFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpRequestProxyHeadersCleanerFilter extends HttpAbstractCleanerFilter { - public static final String TYPE = "http.requestProxyHeadersCleaner"; + public static final String TYPE = "httpRequestProxyHeadersCleaner"; public static final ByteString[] PROXY_HEADERS = { FORWARDED, PROXY_AUTHORIZATION, PROXY_CONNECTION,
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -32,7 +32,7 @@ @Plugin(name = HttpScopeModificationFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpScopeModificationFilter extends HttpFilter { - public static final String TYPE = "http.modifyScope"; + public static final String TYPE = "httpModifyScope"; public static abstract class Operation {
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpSessionBlockerFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpSessionBlockerFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -21,7 +21,7 @@ @Plugin(name = HttpSessionBlockerFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpSessionBlockerFilter extends HttpFilter { - public static final String TYPE = "http.sessionBlocker"; + public static final String TYPE = "httpSessionBlocker"; public static final int DEFAULT_MAX_REQUESTS_COUNT = 10;
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpSessionCookieFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpSessionCookieFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -30,7 +30,7 @@ @Plugin(name = HttpSessionCookieFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public final class HttpSessionCookieFilter extends HttpFilter { - public static final String TYPE = "http.session"; + public static final String TYPE = "httpSession"; private static final Logger LOGGER = LogManager.getLogger(HttpSessionCookieFilter.class);
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpZoneFilter.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpZoneFilter.java Wed Mar 25 14:01:15 2020 +0100 @@ -35,7 +35,7 @@ @Plugin(name = HttpZoneFilter.TYPE, category = PluginConstants.CATEGORY_FLOW_FILTER) public class HttpZoneFilter extends HttpFilter { - public static final String TYPE = "http.zone"; + public static final String TYPE = "httpZone"; public static class Rule {
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpBasicAuthLoginFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpBasicAuthLoginFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -125,7 +125,7 @@ @Test public void testConfigureAndFilterOutbound() throws Exception { String filterConfig = "filters:\n" - + " - type: http.basicLogin\n" + + " - type: httpBasicLogin\n" + " applyIf:\n" + " \"@req.uri\": {$contains: \"index2\"}\n" + " provider:\n"
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpCsrfFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpCsrfFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -139,7 +139,7 @@ @Test public void testConfigure() throws Exception { String filterConfig = "filters:\n" - + " - type: http.csrf\n" + + " - type: httpCsrf\n" + " extract:\n" + " header: \"csrf-header\"\n" + " cookie: \"csrf-cookie\"\n"
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpCsrfFormFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpCsrfFormFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -71,7 +71,7 @@ @Test public void testConfigure() throws IOException, NodeException { String filterConfig = "filters:\n" - + " - type: http.csrfForm\n" + + " - type: httpCsrfForm\n" + " inputName: '_token'\n" + " contentTypesToScan: ['text/html', 'application/xhtml+xml', 'application/xml']\n";
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpHostRewriterFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpHostRewriterFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -85,7 +85,7 @@ @Test public void testConfigure() throws Exception { String filterConfig = "filters:\n" - + " - type: http.host\n" + + " - type: httpHost\n" + " hostMap:\n" + " \"example.com\": \"example.org:8088\"\n" + " \"example.com:8080\": \"example.org\"\n";
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpLogoutFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpLogoutFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -84,7 +84,7 @@ @Test public void testConfigure() throws Exception { String filterConfig = "filters:\n" - + " - type: http.logout\n" + + " - type: httpLogout\n" + " invalidateSession: false\n" + " applyIf: {\"@req.uri\": \"/logout\"}\n";
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMarkFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMarkFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -53,7 +53,7 @@ @Test public void testConfigure() throws Exception { String filterConfig = "filters:\n" - + " - type: http.marker\n" + + " - type: httpMarker\n" + " rules:\n" + " - category: category1\n" + " message: message1\n"
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -176,7 +176,7 @@ @Test(enabled = true) public void testConfigureAndFilterOutbound() throws Exception { String filterConfig = "filters:\n" - + " - type: http.modifyMessage\n" + + " - type: httpModifyMessage\n" + " operations:\n" + " removeHeader: Header1\n" + " addHeader: \n" @@ -229,12 +229,12 @@ public void testConfigureAndFilterOutbound_firstLineOps() throws Exception { String filterConfig = "filters:\n" - + " - type: http.modifyMessage\n" + + " - type: httpModifyMessage\n" + " operations:\n" + " setMethod: HEAD\n" + " setVersion: 'HTTP/1.1'\n" + " setUri: '/aaa/bbb/ccc?q1x=v1x'\n" - + " - type: http.modifyMessage\n" + + " - type: httpModifyMessage\n" + " operations:\n" + " setUrlQuery: 'qqq=vvv'\n" + " setUrlRef: anchor\n" @@ -275,7 +275,7 @@ ); String filterConfig = "filters:\n" - + " - type: http.modifyMessage\n" + + " - type: httpModifyMessage\n" + " operations:\n" + " setHeader: \n" + " Header1: '@req.url.path'\n" @@ -306,7 +306,7 @@ @Test(enabled = true) public void testComplexExpression() throws Exception { String filterConfig = "filters:\n" - + " - type: http.modifyMessage\n" + + " - type: httpModifyMessage\n" + " operations:\n" + " setQueryParam: \n" + " v1: {$expr: \"sessionParams.get('testParam2') or 'aaa'\"}\n" @@ -336,7 +336,7 @@ .build(); String filterConfig = "filters:\n" - + " - type: http.modifyMessage\n" + + " - type: httpModifyMessage\n" + " applyIf:\n" + " \"@req.uri\": /path/test\n" + " operations:\n"
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -208,7 +208,7 @@ @Test public void testSetGlobalParamOperation_Extractors() throws Exception { String filterConfig = "filters:\n" - + " - type: http.modifyScope\n" + + " - type: httpModifyScope\n" + " operations:\n" + " setGlobalParam: \n" + " NewGlobalParam1: '@req.uri'\n" @@ -273,7 +273,7 @@ @Test public void testConfiguration() throws Exception { String filterConfig = "filters:\n" - + " - type: http.modifyScope\n" + + " - type: httpModifyScope\n" + " dir: both\n" + " operations:\n" + " removeSession: ~\n" @@ -298,7 +298,7 @@ @Test public void testConfiguration_expressions() throws Exception { String filterConfig = "filters:\n" - + " - type: http.modifyScope\n" + + " - type: httpModifyScope\n" + " dir: both\n" + " operations:\n" + " removeSession: ~\n"
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSessionCookieFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSessionCookieFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -259,7 +259,7 @@ @Test public void testConfigure() throws Exception { String filterConfig = "filters:\n" - + " - type: http.session\n" + + " - type: httpSession\n" + " sessionCookieNames: [aaa, bbb]\n" + " removeInvalidSessionId: true\n";
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpZoneFilterTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpZoneFilterTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -55,7 +55,7 @@ @Test public void testConfigure() throws Exception { String filterConfig = "filters:\n" - + " - type: http.zone\n" + + " - type: httpZone\n" + " zones:\n" + " \"zone1\": {req.url: {$contains: \"test\"}}\n";
--- a/stress-tester/src/test/java/com/passus/st/config/ClientConfiguratorTest.java Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/java/com/passus/st/config/ClientConfiguratorTest.java Wed Mar 25 14:01:15 2020 +0100 @@ -41,7 +41,7 @@ + "collectMetrics: true\n" + "workers: 4\n" + "filters:\n" - + " - type: http.formLogin\n" + + " - type: httpFormLogin\n" + " active: true\n" + " loginCheckUrl: /login\n" + " userField: username\n"
--- a/stress-tester/src/test/resources/com/passus/st/client/http/filter/http_message_modify_filter.yml Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/resources/com/passus/st/client/http/filter/http_message_modify_filter.yml Wed Mar 25 14:01:15 2020 +0100 @@ -1,5 +1,5 @@ filters: - - type: http.modifyMessage + - type: httpModifyMessage operations: removeHeader: Test addHeader: @@ -12,9 +12,9 @@ setCookie: CookieName: CookieValue - - type: http.requestProxyHeadersCleaner + - type: httpRequestProxyHeadersCleaner - - type: http.basicLogin + - type: httpBasicLogin applyIf: "@req.url": {$contains: "test"} provider:
--- a/stress-tester/src/test/resources/com/passus/st/config/test_job_config.yml Wed Mar 25 13:51:03 2020 +0100 +++ b/stress-tester/src/test/resources/com/passus/st/config/test_job_config.yml Wed Mar 25 14:01:15 2020 +0100 @@ -36,7 +36,7 @@ workers: 4 filters: - - type: http.requestCacheHeadersCleaner + - type: httpRequestCacheHeadersCleaner lookups: - type: csvFile