spring-projects / spring-data-geode

Spring Data support for Apache Geode
Apache License 2.0
51 stars 39 forks source link

Make multi-user authentication work with Spring Data Repository [DATAGEODE-360] #407

Open spring-projects-issues opened 4 years ago

spring-projects-issues commented 4 years ago

russellyou opened DATAGEODE-360 and commented

When multi-user auth is enabled...

spring.data.gemfire.pool.multi-user-authentication=true

A call to a Spring Data Repository query method:

repository.findAllById(CollectionUtils.asSet("Castle", "Jimmy"));

Results in an error:

Caused by: java.lang.UnsupportedOperationException: Use Pool APIs for doing operations when multiuser-secure-mode-enabled is set to true.Caused by: java.lang.UnsupportedOperationException: Use Pool APIs for doing operations when multiuser-secure-mode-enabled is set to true. at org.apache.geode.cache.client.internal.PoolImpl.authenticateIfRequired(PoolImpl.java:1510) ~[geode-core-1.12.0.jar:na] at org.apache.geode.cache.client.internal.PoolImpl.execute(PoolImpl.java:773) ~[geode-core-1.12.0.jar:na] at org.apache.geode.cache.client.internal.GetAllOp.execute(GetAllOp.java:72) ~[geode-core-1.12.0.jar:na]

The root cause is we should use RegionService API instead of Pool API if multi-user authentication is enabled. 

 As to Spring code: (According to my limited Spring Data Geode knowledge)

getRegion() may need be overloaded to support regionService authenticatedView . 


No further details from DATAGEODE-360

spring-projects-issues commented 4 years ago

John Blum commented

Thanks for the feedback. Will investigate shortly and provide comments