You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dan Smith (JIRA)" <ji...@apache.org> on 2016/06/11 00:56:20 UTC
[jira] [Created] (GEODE-1536) Poor documentation and misleading
error messages with multi user security
Dan Smith created GEODE-1536:
--------------------------------
Summary: Poor documentation and misleading error messages with multi user security
Key: GEODE-1536
URL: https://issues.apache.org/jira/browse/GEODE-1536
Project: Geode
Issue Type: Bug
Reporter: Dan Smith
I'm trying to connect a client using multi user security authentication.
I couldn't find any description of how to use this feature in the manuals. The javadocs for ClientCacheFactory.setPoolMultiuserAuthentication basically provide no information. If you just set that, you get this misleading error message:
{code}
java.lang.UnsupportedOperationException: Use Pool APIs for doing operations when multiuser-secure-mode-enabled is set to true.
{code}
What you actually need to do is call cache.createAuthenticatedView. However, if you just do that, you get this error message
{code}
com.gemstone.gemfire.cache.client.ServerOperationException: remote server on 172.16.115.238(73827:loner):60898:2126f43c: com.gemstone.gemfire.security.AuthenticationRequiredException: No security-* properties are provided
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.handleException(OpExecutorImpl.java:671)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.handleException(OpExecutorImpl.java:772)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.handleException(OpExecutorImpl.java:603)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:165)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:110)
at com.gemstone.gemfire.cache.client.internal.PoolImpl.execute(PoolImpl.java:700)
at com.gemstone.gemfire.cache.client.internal.PutOp.execute(PutOp.java:102)
at com.gemstone.gemfire.cache.client.internal.ServerRegionProxy.put(ServerRegionProxy.java:175)
at com.gemstone.gemfire.internal.cache.LocalRegion.serverPut(LocalRegion.java:3061)
at com.gemstone.gemfire.internal.cache.LocalRegion.cacheWriteBeforePut(LocalRegion.java:3188)
at com.gemstone.gemfire.internal.cache.ProxyRegionMap.basicPut(ProxyRegionMap.java:230)
at com.gemstone.gemfire.internal.cache.LocalRegion.virtualPut(LocalRegion.java:5845)
at com.gemstone.gemfire.internal.cache.LocalRegionDataView.putEntry(LocalRegionDataView.java:132)
at com.gemstone.gemfire.internal.cache.LocalRegion.basicPut(LocalRegion.java:5240)
at com.gemstone.gemfire.internal.cache.LocalRegion.validatedPut(LocalRegion.java:1557)
at com.gemstone.gemfire.internal.cache.LocalRegion.put(LocalRegion.java:1544)
at com.gemstone.gemfire.internal.cache.AbstractRegion.put(AbstractRegion.java:288)
at com.gemstone.gemfire.cache.client.internal.ProxyRegion.put(ProxyRegion.java:459)
at TestClient.test(TestClient.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: com.gemstone.gemfire.security.AuthenticationRequiredException: No security-* properties are provided
at com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.getAuthzRequest(ServerConnection.java:1981)
at com.gemstone.gemfire.internal.cache.tier.sockets.command.Put65.cmdExecute(Put65.java:260)
at com.gemstone.gemfire.internal.cache.tier.sockets.BaseCommand.execute(BaseCommand.java:142)
at com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.doNormalMsg(ServerConnection.java:797)
at com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.doOneMessage(ServerConnection.java:924)
at com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1173)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl$1$1.run(AcceptorImpl.java:519)
at java.lang.Thread.run(Thread.java:745)
{code}
It turns out you also need an AuthInitialize class, which is passed the properties from the view. The javadocs make no mention of this fact.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)