[ https://issues.apache.org/jira/browse/GEODE-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15736170#comment-15736170 ]
ASF GitHub Bot commented on GEODE-2144: --------------------------------------- GitHub user jaredjstewart opened a pull request: https://github.com/apache/geode/pull/310 [GEODE-2144] Improve error message when no security credentials are p… …rovided. - Improve error message when no security credentials are provided. - Add tests for the code paths exposing this message. - Refactor making those code paths more testable. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jaredjstewart/geode feature/GEODE-2144 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/geode/pull/310.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #310 ---- commit a4538edcc17693ad7d37d9e35b5ae1d267a796e5 Author: Jared Stewart <jstew...@pivotal.io> Date: 2016-12-09T19:50:00Z [GEODE-2144] Improve error message when no security credentials are provided. - Improve error message when no security credentials are provided. - Add tests for the code paths exposing this message. - Refactor making those code paths more testable. ---- > Improve the error message when a Java client specifies no username/password > --------------------------------------------------------------------------- > > Key: GEODE-2144 > URL: https://issues.apache.org/jira/browse/GEODE-2144 > Project: Geode > Issue Type: Improvement > Components: security > Reporter: Jared Stewart > > If you set up a secured locator/server and attempt to connect via a Java > client which does not specify a username/password, the error message is not > very helpful: > {code} > Message when no security-username and security-password specified is awful: > Exception in thread "main" > org.apache.geode.security.AuthenticationRequiredException: No security-* > properties are provided > at > org.apache.geode.internal.cache.tier.sockets.HandShake.readMessage(HandShake.java:1473) > at > org.apache.geode.internal.cache.tier.sockets.HandShake.greet(HandShake.java:1327) > at > org.apache.geode.cache.client.internal.ConnectionImpl.connect(ConnectionImpl.java:108) > at > org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:135) > at > org.apache.geode.cache.client.internal.QueueManagerImpl.initializeConnections(QueueManagerImpl.java:466) > at > org.apache.geode.cache.client.internal.QueueManagerImpl.start(QueueManagerImpl.java:312) > at org.apache.geode.cache.client.internal.PoolImpl.start(PoolImpl.java:320) > at > org.apache.geode.cache.client.internal.PoolImpl.finishCreate(PoolImpl.java:147) > at org.apache.geode.cache.client.internal.PoolImpl.create(PoolImpl.java:133) > at > org.apache.geode.internal.cache.PoolFactoryImpl.create(PoolFactoryImpl.java:319) > at > org.apache.geode.internal.cache.GemFireCacheImpl.determineDefaultPool(GemFireCacheImpl.java:2990) > at > org.apache.geode.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1338) > at > org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1169) > at > org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:771) > at > org.apache.geode.internal.cache.GemFireCacheImpl.createClient(GemFireCacheImpl.java:746) > at > org.apache.geode.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:235) > at > org.apache.geode.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:189) > at com.jaredjstewart.HelloWorld.main(HelloWorld.java:44) > 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:147) > {code} > It would be much nicer to tell the user that they need to specify a > username/password. -- This message was sent by Atlassian JIRA (v6.3.4#6332)