You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "Andrei Biketov (JIRA)" <ji...@apache.org> on 2017/03/02 03:10:45 UTC
[jira] [Created] (GEODE-2573) Client authentication to secured
geode cluster fails
Andrei Biketov created GEODE-2573:
-------------------------------------
Summary: Client authentication to secured geode cluster fails
Key: GEODE-2573
URL: https://issues.apache.org/jira/browse/GEODE-2573
Project: Geode
Issue Type: Bug
Components: client/server
Reporter: Andrei Biketov
I have simple setup: one locator and one server, both secured. Now I'm trying to connect to the cluster from the client. I'm passing credentials as security-username/security-password from the client but I'm getting exception:
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.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:252)
at org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.prefillConnection(ConnectionManagerImpl.java:758)
at org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.prefill(ConnectionManagerImpl.java:701)
at org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl$PrefillConnectionsTask.run2(ConnectionManagerImpl.java:852)
at org.apache.geode.cache.client.internal.PoolImpl$PoolTask.run(PoolImpl.java:1235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Code:
ClientCache cache = null;
Properties props = new Properties();
props.setProperty("security-username", "admin");
props.setProperty("security-password", "secret");
try {
System.out.println("Client app connecting to Geode cluster");
cache = new ClientCacheFactory(props).addPoolLocator("localhost", 10334).create();
Region<String, String> customer = cache.getRegion("customer");
String value = customer.get("1");
System.out.println("Value from the region:" + value);
} catch (Exception e) {
System.out.println("Error creating the Client Cache'");
System.out.println(e.getCause());
throw e;
}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)