[
https://issues.apache.org/jira/browse/GEODE-1712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15404600#comment-15404600
]
ASF GitHub Bot commented on GEODE-1712:
---------------------------------------
Github user jinmeiliao commented on a diff in the pull request:
https://github.com/apache/incubator-geode/pull/223#discussion_r73215457
--- Diff:
geode-core/src/main/java/com/gemstone/gemfire/internal/security/IntegratedSecurityService.java
---
@@ -0,0 +1,164 @@
+package com.gemstone.gemfire.internal.security;
+
+import java.util.Properties;
+import java.util.concurrent.Callable;
+
+import org.apache.geode.security.ResourcePermission;
+import org.apache.geode.security.SecurityManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.util.ThreadState;
+
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.management.internal.security.ResourceOperation;
+
+public class IntegratedSecurityService implements SecurityService {
+
+ private static Logger logger =
LogService.getLogger(LogService.SECURITY_LOGGER_NAME);
+
+ private static SecurityService defaultInstance = new
IntegratedSecurityService();
+
--- End diff --
Can someone just call new IntegratedSecurityService()? If so, probably just
create a private constructor here to prevent that.
> Need unit tests for classes using Integrated Security
> -----------------------------------------------------
>
> Key: GEODE-1712
> URL: https://issues.apache.org/jira/browse/GEODE-1712
> Project: Geode
> Issue Type: Test
> Components: tests
> Affects Versions: 1.0.0-incubating.M1
> Reporter: Grace Meilen
> Assignee: Grace Meilen
> Labels: security
>
> Most of the classes using Integrated Security (GEODE-17) do not have Unit
> Tests (some have Integrated Test coverage).
> We need to wrap GeodeSecurityUtil in an interface (SecurityService) that can
> be mocked so it's possible to write Unit Tests for all of the classes using
> Integrated Security.
> Client command classes that need Unit Tests:
> * CommitCommand
> * ContainsKey
> * ContainsKey66
> * CreateRegion
> * Destroy65
> * DestroyRegion
> * Destroy
> * ExecuteFunction65
> * ExecuteFunction66
> * ExecuteFunction
> * Get70
> * GetAll70
> * GetAll651
> * GetAll
> * GetAllWithCallback
> * GetClientPartitionAttributesCommand66
> * GetClientPartitionAttributesCommand
> * Invalidate
> * KeySet
> * Put61
> * Put65
> * Put
> * RegisterInterest61
> * RegisterInterestList61
> * RegisterInterestList66
> * RegisterInterest
> * RemoveAll
> * Request
> * UnregisterInterest
> Non-core client command classes needing Unit Tests:
> * CloseCQ
> * ExecuteCQ
> * ExecuteCQ61
> * GetCQStats
> * GetDurableCQs
> * MonitorCQ
> * StopCQ
> More classes needing Unit Tests:
> * AcceptorImpl
> * CacheClientProxy
> * HandShake
> * ServerConnection
> * CreateAllterDestroyRegionCommands
> * DataCommands
> * IndexCommands
> * DataCommandFunction
> * CommandProcessor
> * AccessControlMBean
> * MBeanServerWrapper
> * LoginHandlerInterceptor
> * LuceneIndexCommands
> * SystemManagementService
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)