diff --git a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/AuthenticationFilterTest.java b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/AuthenticationFilterTest.java index a48992a381..9aece58d7b 100644 --- a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/AuthenticationFilterTest.java +++ b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/AuthenticationFilterTest.java @@ -56,17 +56,17 @@ public static Collection authenticationFilterParams() { final Map goodAuthentication = new HashMap(); goodAuthentication.put(WebConstants.SECURITY_TOKEN, MockNodeService.GOOD_SECURITY_TOKEN); goodAuthentication.put(WebConstants.NODE_ID, MockNodeService.GOOD_NODE_ID); - return Arrays.asList(new Object[][] { { "GET", "/ack", goodAuthentication }, { "POST", "/ack", goodAuthentication }, - { "PUT", "/ack", goodAuthentication }, { "DELETE", "/ack", goodAuthentication }, - { "TRACE", "/ack", goodAuthentication }, { "OPTIONS", "/ack", goodAuthentication }, - { "HEAD", "/ack", goodAuthentication }, { "GET", "/pull", goodAuthentication }, - { "POST", "/pull", goodAuthentication }, { "PUT", "/pull", goodAuthentication }, - { "DELETE", "/pull", goodAuthentication }, { "TRACE", "/pull", goodAuthentication }, - { "OPTIONS", "/pull", goodAuthentication }, { "HEAD", "/pull", goodAuthentication }, - { "GET", "/push", goodAuthentication }, { "POST", "/push", goodAuthentication }, - { "PUT", "/push", goodAuthentication }, { "DELETE", "/push", goodAuthentication }, - { "TRACE", "/push", goodAuthentication }, { "OPTIONS", "/push", goodAuthentication }, - { "HEAD", "/push", goodAuthentication } }); + return Arrays.asList(new Object[][] { { "GET", "/sync/ack", goodAuthentication }, { "POST", "/sync/ack", goodAuthentication }, + { "PUT", "/sync/ack", goodAuthentication }, { "DELETE", "/sync/ack", goodAuthentication }, + { "TRACE", "/sync/ack", goodAuthentication }, { "OPTIONS", "/sync/ack", goodAuthentication }, + { "HEAD", "/sync/ack", goodAuthentication }, { "GET", "/sync/pull", goodAuthentication }, + { "POST", "/sync/pull", goodAuthentication }, { "PUT", "/sync/pull", goodAuthentication }, + { "DELETE", "/sync/pull", goodAuthentication }, { "TRACE", "/sync/pull", goodAuthentication }, + { "OPTIONS", "/sync/pull", goodAuthentication }, { "HEAD", "/sync/pull", goodAuthentication }, + { "GET", "/sync/push", goodAuthentication }, { "POST", "/sync/push", goodAuthentication }, + { "PUT", "/sync/push", goodAuthentication }, { "DELETE", "/sync/push", goodAuthentication }, + { "TRACE", "/sync/push", goodAuthentication }, { "OPTIONS", "/sync/push", goodAuthentication }, + { "HEAD", "/sync/push", goodAuthentication } }); } @Test diff --git a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/InetAddressFilterTest.java b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/InetAddressFilterTest.java index ef3f58c612..e2053c7a83 100644 --- a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/InetAddressFilterTest.java +++ b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/InetAddressFilterTest.java @@ -41,7 +41,7 @@ public class InetAddressFilterTest extends AbstractWebTest { public static final String[] HTTP_METHODS = { "GET", "POST", "DELETE", "PUT", "TRACE", "OPTIONS" }; - public static final String[] URIS = { "/ack", "/push", "/pull" }; + public static final String[] URIS = { "/sync/ack", "/sync/push", "/sync/pull" }; public static final String COMBO_ADDRESS_FILTER = "105.100-10.5.15, 206.123.*.90, 184.*.209.210-99, 64-1.78.81.*, 164-120.*.181-50.*, 15-10.240-155.181-50.211-2"; diff --git a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricForbiddenFilterTest.java b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricForbiddenFilterTest.java index 281d745ea8..f2d588729c 100644 --- a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricForbiddenFilterTest.java +++ b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricForbiddenFilterTest.java @@ -40,9 +40,7 @@ import org.springframework.mock.web.MockHttpServletResponse; /** - * This simply makes sure the SymmetricFilter is setup correctly. - * - * + * This simply makes sure the SymmetricFilter is setup correctly. */ @RunWith(Parameterized.class) public class SymmetricForbiddenFilterTest extends AbstractSymmetricFilterTest { @@ -58,25 +56,25 @@ public static Collection authenticationFilterForbiddenParams() { emptyAuthentication.put(WebConstants.SECURITY_TOKEN, ""); emptyAuthentication.put(WebConstants.NODE_ID, ""); - return Arrays.asList(new Object[][] { { "GET", "/ack", null }, { "GET", "/ack/", null }, - { "GET", "/ack/more", null }, { "GET", "/ack?name=value", null }, - { "GET", "/ack?name=value&name=value", null }, - { "GET", String.format("/ack?%s=1&%s=2", WebConstants.SECURITY_TOKEN, WebConstants.NODE_ID), null }, - { "GET", "/ack", emptyAuthentication }, { "PUT", "/ack", null }, { "POST", "/ack", null }, - { "DELETE", "/ack", null }, { "TRACE", "/ack", null }, { "OPTIONS", "/ack", null }, - { "HEAD", "/ack", null }, { "GET", "/pull", null }, { "GET", "/pull/", null }, - { "GET", "/pull/more", null }, { "GET", "/pull?name=value", null }, - { "GET", "/pull?name=value&name=value", null }, - { "GET", String.format("/pull?%s=1&%s=2", WebConstants.SECURITY_TOKEN, WebConstants.NODE_ID), null }, - { "GET", "/pull", emptyAuthentication }, { "PUT", "/pull", null }, { "POST", "/pull", null }, - { "DELETE", "/pull", null }, { "TRACE", "/pull", null }, { "OPTIONS", "/pull", null }, - { "HEAD", "/pull", null }, { "GET", "/push", null }, { "GET", "/push/", null }, - { "GET", "/push/more", null }, { "GET", "/push?name=value", null }, - { "GET", "/push?name=value&name=value", null }, - { "GET", String.format("/push?%s=1&%s=2", WebConstants.SECURITY_TOKEN, WebConstants.NODE_ID), null }, - { "GET", "/push", emptyAuthentication }, { "PUT", "/push", null }, { "POST", "/push", null }, - { "DELETE", "/push", null }, { "TRACE", "/push", null }, { "OPTIONS", "/push", null }, - { "HEAD", "/push", null }, }); + return Arrays.asList(new Object[][] { { "GET", "/sync/ack", null }, { "GET", "/sync/ack/", null }, + { "GET", "/sync/ack/more", null }, { "GET", "/sync/ack?name=value", null }, + { "GET", "/sync/ack?name=value&name=value", null }, + { "GET", String.format("/sync/ack?%s=1&%s=2", WebConstants.SECURITY_TOKEN, WebConstants.NODE_ID), null }, + { "GET", "/sync/ack", emptyAuthentication }, { "PUT", "/sync/ack", null }, { "POST", "/sync/ack", null }, + { "DELETE", "/sync/ack", null }, { "TRACE", "/sync/ack", null }, { "OPTIONS", "/sync/ack", null }, + { "HEAD", "/sync/ack", null }, { "GET", "/sync/pull", null }, { "GET", "/sync/pull/", null }, + { "GET", "/sync/pull/more", null }, { "GET", "/sync/pull?name=value", null }, + { "GET", "/sync/pull?name=value&name=value", null }, + { "GET", String.format("/sync/pull?%s=1&%s=2", WebConstants.SECURITY_TOKEN, WebConstants.NODE_ID), null }, + { "GET", "/sync/pull", emptyAuthentication }, { "PUT", "/sync/pull", null }, { "POST", "/sync/pull", null }, + { "DELETE", "/sync/pull", null }, { "TRACE", "/sync/pull", null }, { "OPTIONS", "/sync/pull", null }, + { "HEAD", "/sync/pull", null }, { "GET", "/sync/push", null }, { "GET", "/sync/push/", null }, + { "GET", "/sync/push/more", null }, { "GET", "/sync/push?name=value", null }, + { "GET", "/sync/push?name=value&name=value", null }, + { "GET", String.format("/sync/push?%s=1&%s=2", WebConstants.SECURITY_TOKEN, WebConstants.NODE_ID), null }, + { "GET", "/sync/push", emptyAuthentication }, { "PUT", "/sync/push", null }, { "POST", "/sync/push", null }, + { "DELETE", "/sync/push", null }, { "TRACE", "/sync/push", null }, { "OPTIONS", "/sync/push", null }, + { "HEAD", "/sync/push", null }, }); } @Test diff --git a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricRegistrationRequiredTest.java b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricRegistrationRequiredTest.java index 0b1f35ae00..5ac7c3ed30 100644 --- a/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricRegistrationRequiredTest.java +++ b/symmetric/symmetric-server/src/test/java/org/jumpmind/symmetric/web/SymmetricRegistrationRequiredTest.java @@ -38,9 +38,7 @@ import org.springframework.mock.web.MockHttpServletResponse; /** - * This simply makes sure the SymmetricFilter is setup correctly. - * - * + * This simply makes sure the SymmetricFilter is setup correctly. */ @RunWith(Parameterized.class) public class SymmetricRegistrationRequiredTest extends AbstractSymmetricFilterTest { @@ -58,15 +56,14 @@ public static Collection authenticationFilterRegistrationRequiredParam final Map badAuthentication = new HashMap(); badAuthentication.put(WebConstants.SECURITY_TOKEN, BAD_SECURITY_TOKEN); badAuthentication.put(WebConstants.NODE_ID, BAD_NODE_ID); - return Arrays.asList(new Object[][] { { "GET", "/ack", badAuthentication }, - { "GET", "/pull", badAuthentication }, { "GET", "/push", badAuthentication } }); + return Arrays.asList(new Object[][] { { "GET", "/sync/ack", badAuthentication }, + { "GET", "/sync/pull", badAuthentication }, { "GET", "/sync/push", badAuthentication } }); } @Test public void testAuthenticationFilterRegistrationRequired() throws Exception { final SymmetricFilter filter = new SymmetricFilter(); filter.init(new MockFilterConfig(servletContext)); - final MockHttpServletRequest request = TestSetupUtil.createMockHttpServletRequest(servletContext, method, uri, parameters); final MockHttpServletResponse response = new MockHttpServletResponse();