[ 
https://issues.apache.org/jira/browse/GEODE-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Biketov updated GEODE-2573:
----------------------------------

Hi Nilkanth,

I got this exception and that is because
org.apache.geode.security.templates.UserPasswordAuthInit doesn't exist
under that path.
What is actually a client authentication model in geode 1.x
My understanding that only SecurityManager implementation is required
Here is my setup om the server

security-client-accessor=
security-client-accessor-pp=
security-client-auth-init=
security-client-authenticator=com.xxx.cache.security.SecurityProvider
security-client-dhalgo=
security-log-file=
security-log-level=config
security-manager=com.xxx.cache.security.SecurityProvider
security-peer-auth-init=
security-peer-authenticator=com.xxx.cache.security.SecurityProvider

Thanks,

Andrei

[info 2017/03/02 08:22:24.218 EST <poolTimer-DEFAULT-3> tid=0x1b] Error
prefilling connections : java.lang.ClassNotFoundException:
org.apache.geode.security.templates.UserPasswordAuthInit
java.lang.ClassNotFoundException:
org.apache.geode.security.templates.UserPasswordAuthInit
at
org.apache.geode.internal.ClassPathLoader.forName(ClassPathLoader.java:437)
at
org.apache.geode.internal.ClassLoadUtil.methodFromName(ClassLoadUtil.java:85)
at
org.apache.geode.internal.ClassLoadUtil.methodFromName(ClassLoadUtil.java:94)
at
org.apache.geode.internal.security.SecurityService.getObjectOfTypeFromFactoryMethod(SecurityService.java:137)
at
org.apache.geode.internal.security.SecurityService.getObjectOfType(SecurityService.java:163)
at
org.apache.geode.internal.cache.tier.sockets.HandShake.getCredentials(HandShake.java:1510)
at
org.apache.geode.cache.client.internal.AuthenticateUserOp$AuthenticateUserOpImpl.<init>(AuthenticateUserOp.java:110)
at
org.apache.geode.cache.client.internal.AuthenticateUserOp.executeOn(AuthenticateUserOp.java:71)
at
org.apache.geode.cache.client.internal.ConnectionFactoryImpl.authenticateIfRequired(ConnectionFactoryImpl.java:190)
at
org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:141)
at
org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:259)
at
org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.prefillConnection(ConnectionManagerImpl.java:762)
at
org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.prefill(ConnectionManagerImpl.java:706)
at
org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl$PrefillConnectionsTask.run2(ConnectionManagerImpl.java:854)
at
org.apache.geode.cache.client.internal.PoolImpl$PoolTask.run(PoolImpl.java:1291)
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)

On Thu, Mar 2, 2017 at 12:07 AM, Nilkanth Patel (JIRA) <j...@apache.org>



> 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
>    Affects Versions: 1.1.0
>            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:
> [info 2017/03/01 22:45:40.220 EST <poolTimer-DEFAULT-3> tid=0x1b] Error 
> prefilling connections : 
> org.apache.geode.security.AuthenticationRequiredException: No security 
> credentials are provided
> org.apache.geode.security.AuthenticationRequiredException: No security 
> credentials 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)

Reply via email to