Repository: incubator-geode Updated Branches: refs/heads/develop a325d074f -> ee27d73c4
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java deleted file mode 100644 index 625e48f..0000000 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package com.gemstone.gemfire.management.internal.security; - -import static com.gemstone.gemfire.distributed.ConfigurationProperties.*; - -import org.apache.geode.security.templates.SampleSecurityManager; -import org.junit.BeforeClass; -import org.junit.experimental.categories.Category; - -import com.gemstone.gemfire.internal.security.GeodeSecurityUtil; -import com.gemstone.gemfire.internal.security.IntegratedSecurityService; -import com.gemstone.gemfire.test.junit.categories.IntegrationTest; -import com.gemstone.gemfire.test.junit.categories.SecurityTest; - -/** - * Integration tests for {@link GeodeSecurityUtil} using shiro-ini.json. - * - * @see GeodeSecurityUtilWithIniFileJUnitTest - */ -@Category({ IntegrationTest.class, SecurityTest.class }) -public class GeodeSecurityUtilCustomRealmJUnitTest extends GeodeSecurityUtilWithIniFileJUnitTest { - - @BeforeClass - public static void beforeClass() throws Exception { - props.put(SampleSecurityManager.SECURITY_JSON, "com/gemstone/gemfire/management/internal/security/shiro-ini.json"); - props.put(SECURITY_MANAGER, SampleSecurityManager.class.getName()); - IntegratedSecurityService.getSecurityService().initSecurity(props); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java deleted file mode 100644 index 3a7b4de..0000000 --- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. - */ -package com.gemstone.gemfire.management.internal.security; - -import static com.gemstone.gemfire.distributed.ConfigurationProperties.*; -import static org.assertj.core.api.Assertions.*; - -import java.util.Properties; - -import org.apache.geode.security.ResourcePermission; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.gemstone.gemfire.internal.security.GeodeSecurityUtil; -import com.gemstone.gemfire.internal.security.IntegratedSecurityService; -import com.gemstone.gemfire.internal.security.SecurityService; -import com.gemstone.gemfire.security.GemFireSecurityException; -import com.gemstone.gemfire.test.junit.categories.IntegrationTest; -import com.gemstone.gemfire.test.junit.categories.SecurityTest; - -/** - * Integration tests for {@link GeodeSecurityUtil} using shiro.ini - */ -@Category({ IntegrationTest.class, SecurityTest.class }) -public class GeodeSecurityUtilWithIniFileJUnitTest { - - protected static Properties props = new Properties(); - - private SecurityService securityService = IntegratedSecurityService.getSecurityService(); - - @BeforeClass - public static void beforeClass() throws Exception{ - props.setProperty(SECURITY_SHIRO_INIT, "shiro.ini"); - GeodeSecurityUtil.initSecurity(props); - } - - @Test - public void testRoot(){ - this.securityService.login("root", "secret"); - this.securityService.authorize(TestCommand.none); - this.securityService.authorize(TestCommand.everyOneAllowed); - this.securityService.authorize(TestCommand.dataRead); - this.securityService.authorize(TestCommand.dataWrite); - this.securityService.authorize(TestCommand.regionARead); - this.securityService.authorize(TestCommand.regionAWrite); - this.securityService.authorize(TestCommand.clusterWrite); - this.securityService.authorize(TestCommand.clusterRead); - } - - @Test - public void testGuest(){ - this.securityService.login("guest", "guest"); - this.securityService.authorize(TestCommand.none); - this.securityService.authorize(TestCommand.everyOneAllowed); - - assertNotAuthorized(TestCommand.dataRead); - assertNotAuthorized(TestCommand.dataWrite); - assertNotAuthorized(TestCommand.regionARead); - assertNotAuthorized(TestCommand.regionAWrite); - assertNotAuthorized(TestCommand.clusterRead); - assertNotAuthorized(TestCommand.clusterWrite); - this.securityService.logout(); - } - - @Test - public void testRegionAReader(){ - this.securityService.login("regionAReader", "password"); - this.securityService.authorize(TestCommand.none); - this.securityService.authorize(TestCommand.everyOneAllowed); - this.securityService.authorize(TestCommand.regionARead); - - assertNotAuthorized(TestCommand.regionAWrite); - assertNotAuthorized(TestCommand.dataRead); - assertNotAuthorized(TestCommand.dataWrite); - assertNotAuthorized(TestCommand.clusterRead); - assertNotAuthorized(TestCommand.clusterWrite); - this.securityService.logout(); - } - - @Test - public void testRegionAUser(){ - this.securityService.login("regionAUser", "password"); - this.securityService.authorize(TestCommand.none); - this.securityService.authorize(TestCommand.everyOneAllowed); - this.securityService.authorize(TestCommand.regionAWrite); - this.securityService.authorize(TestCommand.regionARead); - - assertNotAuthorized(TestCommand.dataRead); - assertNotAuthorized(TestCommand.dataWrite); - assertNotAuthorized(TestCommand.clusterRead); - assertNotAuthorized(TestCommand.clusterWrite); - this.securityService.logout(); - } - - @Test - public void testDataReader(){ - this.securityService.login("dataReader", "12345"); - this.securityService.authorize(TestCommand.none); - this.securityService.authorize(TestCommand.everyOneAllowed); - this.securityService.authorize(TestCommand.regionARead); - this.securityService.authorize(TestCommand.dataRead); - - assertNotAuthorized(TestCommand.regionAWrite); - assertNotAuthorized(TestCommand.dataWrite); - assertNotAuthorized(TestCommand.clusterRead); - assertNotAuthorized(TestCommand.clusterWrite); - this.securityService.logout(); - } - - @Test - public void testReader(){ - this.securityService.login("reader", "12345"); - this.securityService.authorize(TestCommand.none); - this.securityService.authorize(TestCommand.everyOneAllowed); - this.securityService.authorize(TestCommand.regionARead); - this.securityService.authorize(TestCommand.dataRead); - this.securityService.authorize(TestCommand.clusterRead); - - assertNotAuthorized(TestCommand.regionAWrite); - assertNotAuthorized(TestCommand.dataWrite); - assertNotAuthorized(TestCommand.clusterWrite); - this.securityService.logout(); - } - - private void assertNotAuthorized(ResourcePermission context){ - assertThatThrownBy(()-> this.securityService.authorize(context)).isInstanceOf(GemFireSecurityException.class).hasMessageContaining(context.toString()); - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceCustomRealmJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceCustomRealmJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceCustomRealmJUnitTest.java new file mode 100644 index 0000000..d3fa0df --- /dev/null +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceCustomRealmJUnitTest.java @@ -0,0 +1,44 @@ +/* + * 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. + */ +package com.gemstone.gemfire.management.internal.security; + +import static com.gemstone.gemfire.distributed.ConfigurationProperties.*; + +import org.apache.geode.security.templates.SampleSecurityManager; +import org.junit.BeforeClass; +import org.junit.experimental.categories.Category; + +import com.gemstone.gemfire.internal.security.IntegratedSecurityService; +import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.categories.SecurityTest; + +/** + * Integration tests for {@link IntegratedSecurityService} using shiro-ini.json. + * + * @see IntegratedSecurityServiceWithIniFileJUnitTest + */ +@Category({ IntegrationTest.class, SecurityTest.class }) +public class IntegratedSecurityServiceCustomRealmJUnitTest extends IntegratedSecurityServiceWithIniFileJUnitTest { + + @BeforeClass + public static void beforeClass() throws Exception { + props.put(SampleSecurityManager.SECURITY_JSON, "com/gemstone/gemfire/management/internal/security/shiro-ini.json"); + props.put(SECURITY_MANAGER, SampleSecurityManager.class.getName()); + IntegratedSecurityService.getSecurityService().initSecurity(props); + } + +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceWithIniFileJUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceWithIniFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceWithIniFileJUnitTest.java new file mode 100644 index 0000000..60ec78e --- /dev/null +++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecurityServiceWithIniFileJUnitTest.java @@ -0,0 +1,147 @@ +/* + * 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. + */ +package com.gemstone.gemfire.management.internal.security; + +import static com.gemstone.gemfire.distributed.ConfigurationProperties.*; +import static org.assertj.core.api.Assertions.*; + +import java.util.Properties; + +import org.apache.geode.security.ResourcePermission; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import com.gemstone.gemfire.internal.security.IntegratedSecurityService; +import com.gemstone.gemfire.internal.security.SecurityService; +import com.gemstone.gemfire.security.GemFireSecurityException; +import com.gemstone.gemfire.test.junit.categories.IntegrationTest; +import com.gemstone.gemfire.test.junit.categories.SecurityTest; + +/** + * Integration tests for {@link IntegratedSecurityService} using shiro.ini + */ +@Category({ IntegrationTest.class, SecurityTest.class }) +public class IntegratedSecurityServiceWithIniFileJUnitTest { + + protected static Properties props = new Properties(); + + private SecurityService securityService = SecurityService.getSecurityService(); + + @BeforeClass + public static void beforeClass() throws Exception{ + props.setProperty(SECURITY_SHIRO_INIT, "shiro.ini"); + } + + @Before + public void before(){ + securityService.initSecurity(props); + } + + @Test + public void testRoot(){ + this.securityService.login("root", "secret"); + this.securityService.authorize(TestCommand.none); + this.securityService.authorize(TestCommand.everyOneAllowed); + this.securityService.authorize(TestCommand.dataRead); + this.securityService.authorize(TestCommand.dataWrite); + this.securityService.authorize(TestCommand.regionARead); + this.securityService.authorize(TestCommand.regionAWrite); + this.securityService.authorize(TestCommand.clusterWrite); + this.securityService.authorize(TestCommand.clusterRead); + } + + @Test + public void testGuest(){ + this.securityService.login("guest", "guest"); + this.securityService.authorize(TestCommand.none); + this.securityService.authorize(TestCommand.everyOneAllowed); + + assertNotAuthorized(TestCommand.dataRead); + assertNotAuthorized(TestCommand.dataWrite); + assertNotAuthorized(TestCommand.regionARead); + assertNotAuthorized(TestCommand.regionAWrite); + assertNotAuthorized(TestCommand.clusterRead); + assertNotAuthorized(TestCommand.clusterWrite); + this.securityService.logout(); + } + + @Test + public void testRegionAReader(){ + this.securityService.login("regionAReader", "password"); + this.securityService.authorize(TestCommand.none); + this.securityService.authorize(TestCommand.everyOneAllowed); + this.securityService.authorize(TestCommand.regionARead); + + assertNotAuthorized(TestCommand.regionAWrite); + assertNotAuthorized(TestCommand.dataRead); + assertNotAuthorized(TestCommand.dataWrite); + assertNotAuthorized(TestCommand.clusterRead); + assertNotAuthorized(TestCommand.clusterWrite); + this.securityService.logout(); + } + + @Test + public void testRegionAUser(){ + this.securityService.login("regionAUser", "password"); + this.securityService.authorize(TestCommand.none); + this.securityService.authorize(TestCommand.everyOneAllowed); + this.securityService.authorize(TestCommand.regionAWrite); + this.securityService.authorize(TestCommand.regionARead); + + assertNotAuthorized(TestCommand.dataRead); + assertNotAuthorized(TestCommand.dataWrite); + assertNotAuthorized(TestCommand.clusterRead); + assertNotAuthorized(TestCommand.clusterWrite); + this.securityService.logout(); + } + + @Test + public void testDataReader(){ + this.securityService.login("dataReader", "12345"); + this.securityService.authorize(TestCommand.none); + this.securityService.authorize(TestCommand.everyOneAllowed); + this.securityService.authorize(TestCommand.regionARead); + this.securityService.authorize(TestCommand.dataRead); + + assertNotAuthorized(TestCommand.regionAWrite); + assertNotAuthorized(TestCommand.dataWrite); + assertNotAuthorized(TestCommand.clusterRead); + assertNotAuthorized(TestCommand.clusterWrite); + this.securityService.logout(); + } + + @Test + public void testReader(){ + this.securityService.login("reader", "12345"); + this.securityService.authorize(TestCommand.none); + this.securityService.authorize(TestCommand.everyOneAllowed); + this.securityService.authorize(TestCommand.regionARead); + this.securityService.authorize(TestCommand.dataRead); + this.securityService.authorize(TestCommand.clusterRead); + + assertNotAuthorized(TestCommand.regionAWrite); + assertNotAuthorized(TestCommand.dataWrite); + assertNotAuthorized(TestCommand.clusterWrite); + this.securityService.logout(); + } + + private void assertNotAuthorized(ResourcePermission context){ + assertThatThrownBy(()-> this.securityService.authorize(context)).isInstanceOf(GemFireSecurityException.class).hasMessageContaining(context.toString()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/security/NoShowValue1PostProcessor.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/NoShowValue1PostProcessor.java b/geode-core/src/test/java/com/gemstone/gemfire/security/NoShowValue1PostProcessor.java index d456516..d2adffd 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/security/NoShowValue1PostProcessor.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/security/NoShowValue1PostProcessor.java @@ -23,7 +23,7 @@ import org.apache.geode.security.PostProcessor; public class NoShowValue1PostProcessor implements PostProcessor { @Override - public Object processRegionValue(final Serializable principal, + public Object processRegionValue(final Object principal, final String regionName, final Object key, final Object value) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/security/PDXGfshPostProcessorOnRemoteServerTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/PDXGfshPostProcessorOnRemoteServerTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/PDXGfshPostProcessorOnRemoteServerTest.java index 498bd3a..81b3add 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/security/PDXGfshPostProcessorOnRemoteServerTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/security/PDXGfshPostProcessorOnRemoteServerTest.java @@ -38,7 +38,7 @@ import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.distributed.Locator; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; import com.gemstone.gemfire.internal.AvailablePortHelper; -import com.gemstone.gemfire.internal.security.GeodeSecurityUtil; +import com.gemstone.gemfire.internal.security.SecurityService; import com.gemstone.gemfire.management.ManagementService; import com.gemstone.gemfire.management.cli.Result.Status; import com.gemstone.gemfire.management.internal.cli.CliUtil; @@ -150,7 +150,7 @@ public class PDXGfshPostProcessorOnRemoteServerTest extends JUnit4DistributedTes CliUtil.isGfshVM = false; server.invoke(()-> { - PDXPostProcessor pp = (PDXPostProcessor) GeodeSecurityUtil.getPostProcessor(); + PDXPostProcessor pp = (PDXPostProcessor) SecurityService.getSecurityService().getPostProcessor(); // verify that the post processor is called 6 times. (5 for the query, 1 for the get) assertEquals(pp.getCount(), 6); }); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessor.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessor.java b/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessor.java index c51c9d8..0b03b66 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessor.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessor.java @@ -18,7 +18,6 @@ package com.gemstone.gemfire.security; import static org.junit.Assert.*; -import java.io.Serializable; import java.util.Arrays; import java.util.Properties; @@ -38,7 +37,7 @@ public class PDXPostProcessor implements PostProcessor{ count = 0; } @Override - public Object processRegionValue(final Serializable principal, + public Object processRegionValue(final Object principal, final String regionName, final Object key, final Object value) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessorDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessorDUnitTest.java index 2a5727c..1e87952 100644 --- a/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessorDUnitTest.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/security/PDXPostProcessorDUnitTest.java @@ -41,7 +41,7 @@ import com.gemstone.gemfire.cache.query.SelectResults; import com.gemstone.gemfire.cache.util.CacheListenerAdapter; import com.gemstone.gemfire.internal.AvailablePortHelper; import com.gemstone.gemfire.internal.cache.EntryEventImpl; -import com.gemstone.gemfire.internal.security.GeodeSecurityUtil; +import com.gemstone.gemfire.internal.security.SecurityService; import com.gemstone.gemfire.management.cli.Result.Status; import com.gemstone.gemfire.management.internal.cli.CliUtil; import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh; @@ -97,7 +97,7 @@ public class PDXPostProcessorDUnitTest extends AbstractSecureServerDUnitTest { }); // this makes sure PostProcessor is getting called - PDXPostProcessor pp = (PDXPostProcessor) GeodeSecurityUtil.getPostProcessor(); + PDXPostProcessor pp = (PDXPostProcessor) SecurityService.getSecurityService().getPostProcessor(); assertEquals(pp.getCount(), 2); } @@ -132,7 +132,7 @@ public class PDXPostProcessorDUnitTest extends AbstractSecureServerDUnitTest { }); // this makes sure PostProcessor is getting called - PDXPostProcessor pp = (PDXPostProcessor) GeodeSecurityUtil.getPostProcessor(); + PDXPostProcessor pp = (PDXPostProcessor) SecurityService.getSecurityService().getPostProcessor(); assertEquals(pp.getCount(), 2); } @@ -175,7 +175,7 @@ public class PDXPostProcessorDUnitTest extends AbstractSecureServerDUnitTest { // wait for events to fire Awaitility.await().atMost(1, TimeUnit.SECONDS); - PDXPostProcessor pp = (PDXPostProcessor) GeodeSecurityUtil.getPostProcessor(); + PDXPostProcessor pp = (PDXPostProcessor) SecurityService.getSecurityService().getPostProcessor(); assertEquals(pp.getCount(), 2); } @@ -226,7 +226,7 @@ public class PDXPostProcessorDUnitTest extends AbstractSecureServerDUnitTest { System.out.println("gfsh result: " + result); }); - PDXPostProcessor pp = (PDXPostProcessor) GeodeSecurityUtil.getPostProcessor(); + PDXPostProcessor pp = (PDXPostProcessor) SecurityService.getSecurityService().getPostProcessor(); assertEquals(pp.getCount(), 4); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt ---------------------------------------------------------------------- diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt index 0c924e4..19002bc 100644 --- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt +++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt @@ -557,8 +557,8 @@ com/gemstone/gemfire/management/internal/cli/functions/CreateAsyncEventQueueFunc com/gemstone/gemfire/management/internal/cli/functions/CreateDefinedIndexesFunction,true,1 com/gemstone/gemfire/management/internal/cli/functions/CreateDiskStoreFunction,true,1 com/gemstone/gemfire/management/internal/cli/functions/CreateIndexFunction,true,1 -com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction,true,1,optimizeForWrite:boolean,securityService:com/gemstone/gemfire/internal/security/SecurityService -com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction$SelectExecStep,true,1,securityService:com/gemstone/gemfire/internal/security/SecurityService +com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction,true,1,optimizeForWrite:boolean +com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction$SelectExecStep,true,1 com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction$SelectMoveStep,true,1 com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction$SelectQuitStep,true,1 com/gemstone/gemfire/management/internal/cli/functions/DeployFunction,true,1 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee27d73c/geode-cq/src/test/java/com/gemstone/gemfire/security/CQPDXPostProcessorDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/CQPDXPostProcessorDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/CQPDXPostProcessorDUnitTest.java index b6d520f..6b66f01 100644 --- a/geode-cq/src/test/java/com/gemstone/gemfire/security/CQPDXPostProcessorDUnitTest.java +++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/CQPDXPostProcessorDUnitTest.java @@ -42,7 +42,7 @@ import com.gemstone.gemfire.cache.query.CqResults; import com.gemstone.gemfire.cache.query.QueryService; import com.gemstone.gemfire.cache.query.internal.cq.CqListenerImpl; import com.gemstone.gemfire.internal.AvailablePortHelper; -import com.gemstone.gemfire.internal.security.GeodeSecurityUtil; +import com.gemstone.gemfire.internal.security.SecurityService; import com.gemstone.gemfire.pdx.SimpleClass; import com.gemstone.gemfire.test.junit.categories.DistributedTest; import com.gemstone.gemfire.test.junit.categories.SecurityTest; @@ -109,7 +109,7 @@ public class CQPDXPostProcessorDUnitTest extends AbstractSecureServerDUnitTest { // wait for events to fire Awaitility.await().atMost(1, TimeUnit.SECONDS); - PDXPostProcessor pp = (PDXPostProcessor) GeodeSecurityUtil.getPostProcessor(); + PDXPostProcessor pp = (PDXPostProcessor) SecurityService.getSecurityService().getPostProcessor(); assertEquals(pp.getCount(), 2); }
