This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5749ec9  Adding 1.4.0 as an old version to test against
5749ec9 is described below

commit 5749ec9f8b9a19f14637ee97cf8c47870f534166
Author: Dan Smith <dsm...@pivotal.io>
AuthorDate: Fri Feb 9 13:44:49 2018 -0800

    Adding 1.4.0 as an old version to test against
    
    Adding 1.4.0 as an old version to test against. Fixing tests that failed 
due to 1.4 requiring a serializable-object-filter for java serialized classes.
---
 .../ClientDataAuthorizationUsingLegacySecurityDUnitTest.java     | 9 +++++++++
 ...ataAuthorizationUsingLegacySecurityWithFailoverDUnitTest.java | 8 ++++++++
 geode-old-versions/build.gradle                                  | 4 +---
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git 
a/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityDUnitTest.java
index a9ec691..c640bf8 100644
--- 
a/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityDUnitTest.java
@@ -17,6 +17,7 @@ package org.apache.geode.security;
 import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_ACCESSOR;
 import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR;
 import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTH_INIT;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SERIALIZABLE_OBJECT_FILTER;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
@@ -45,6 +46,7 @@ import org.apache.geode.cache.client.ClientRegionShortcut;
 import org.apache.geode.security.templates.SimpleAccessController;
 import org.apache.geode.security.templates.SimpleAuthenticator;
 import org.apache.geode.security.templates.UserPasswordAuthInit;
+import org.apache.geode.security.templates.UsernamePrincipal;
 import org.apache.geode.test.dunit.rules.ClientVM;
 import org.apache.geode.test.dunit.rules.ClusterStartupRule;
 import org.apache.geode.test.dunit.rules.MemberVM;
@@ -241,6 +243,13 @@ public class 
ClientDataAuthorizationUsingLegacySecurityDUnitTest {
     props.setProperty(UserPasswordAuthInit.PASSWORD, permission);
     props.setProperty(SECURITY_CLIENT_AUTH_INIT,
         UserPasswordAuthInit.class.getCanonicalName() + ".create");
+
+    // We can't sent the object filter property versions before 1.4.0 because
+    // it's not a valid property, but we must set it in 140 and above to allow
+    // serialization of UsernamePrincipal
+    if (clientVersion.compareTo("140") >= 0) {
+      props.setProperty(SERIALIZABLE_OBJECT_FILTER, 
UsernamePrincipal.class.getCanonicalName());
+    }
     return props;
   }
 }
diff --git 
a/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityWithFailoverDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityWithFailoverDUnitTest.java
index 42e1391..6e143dc 100644
--- 
a/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityWithFailoverDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityWithFailoverDUnitTest.java
@@ -18,6 +18,7 @@ package org.apache.geode.security;
 import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_ACCESSOR;
 import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR;
 import static 
org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTH_INIT;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SERIALIZABLE_OBJECT_FILTER;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
@@ -51,6 +52,7 @@ import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.security.templates.SimpleAccessController;
 import org.apache.geode.security.templates.SimpleAuthenticator;
 import org.apache.geode.security.templates.UserPasswordAuthInit;
+import org.apache.geode.security.templates.UsernamePrincipal;
 import org.apache.geode.test.dunit.rules.ClientVM;
 import org.apache.geode.test.dunit.rules.ClusterStartupRule;
 import org.apache.geode.test.dunit.rules.MemberVM;
@@ -407,6 +409,12 @@ public class 
ClientDataAuthorizationUsingLegacySecurityWithFailoverDUnitTest {
     props.setProperty(UserPasswordAuthInit.PASSWORD, permission);
     props.setProperty(SECURITY_CLIENT_AUTH_INIT,
         UserPasswordAuthInit.class.getCanonicalName() + ".create");
+    // We can't sent the object filter property versions before 1.4.0 because
+    // it's not a valid property, but we must set it in 140 and above to allow
+    // serialization of UsernamePrincipal
+    if (clientVersion.compareTo("140") >= 0) {
+      props.setProperty(SERIALIZABLE_OBJECT_FILTER, 
UsernamePrincipal.class.getCanonicalName());
+    }
     return props;
   }
 
diff --git a/geode-old-versions/build.gradle b/geode-old-versions/build.gradle
index 55caac5..1618f6e 100644
--- a/geode-old-versions/build.gradle
+++ b/geode-old-versions/build.gradle
@@ -90,7 +90,5 @@ task createGeodeClasspathsFile  {
   addOldVersion('test111', '1.1.1', false)
   addOldVersion('test120', '1.2.0', true)
   addOldVersion('test130', '1.3.0', true)
+  addOldVersion('test140', '1.4.0', true)
 }
-
-
-

-- 
To stop receiving notification emails like this one, please contact
upthewatersp...@apache.org.

Reply via email to