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

Anilkumar Gingade updated GEODE-6078:
-------------------------------------
    Description: 
User is using

multiuser-authentication="true"

Below is the test code code

    public static void testMultiUser() {
        System.out.println("TestClient.testMultiUser()");
        ClientCache cache = new ClientCacheFactory()
                .set("security-client-auth-init", 
"org.apache.geode.testfunction.UserPasswordAuthInit")
                .set("name", "SecurityClient")
                .set("cache-xml-file", "MultiuserSecurityClient.xml")
                .create();

        Properties properties = new Properties();
        properties.setProperty("security-username", "admin");
        properties.setProperty("security-password", "secret");
        RegionService regionService = cache.createAuthenticatedView( 
properties);
        System.out.println(regionService);
                String value=" {\"orders\": {\"orderId\": 
\"XXXXXXXX\",\"accounts\": [{\"accountNumber\": \"YYYYYYYY\",\"accountType\": 
\"INDIVIDUAL\",\"accountSubType\": \"INDIVIDUAL_REGULAR\",\"status\": 
\"OPERATIONAL\",\"billingAddress\": {\"addressId\": 1008737},\"bills\": 
[{\"billCycleDay\": 4}],\"isPRIndicator\": false,\"marketCode\": 
\"SEW\",\"tenure\": \"1\",\"contactFirstName\": \"TEST\",\"contactFamilyName\": 
\"MARKETINGCATKH\"},{\"accountNumber\": \"33\",\"accountType\": 
\"INDIVIDUAL\",\"accountSubType\": \"INDIVIDUAL_REGULAR\",\"status\": 
\"OPERATIONAL\",\"billingAddress\": {\"addressId\": 1008737},\"bills\": 
[{\"billCycleDay\": 4}],\"isPuertoRicoIndicator\": false,\"marketCode\": 
\"SEW\",\"tenure\": \"1\",\"contactFirstName\": \"TEST\",\"contactFamilyName\": 
\"MARKETINGCATKH\"}]}}";

        Region<String, PdxInstance> region = cache.getRegion("Test");
        PdxInstance pdx= JSONFormatter.fromJSON(value);
        region.put("key",pdx);
              
System.out.println(FunctionService.onServer(regionService).execute(new 
TestFunction()).getResult());

 }





  was:
User is using

multiuser-authentication="true"

Below is the test code code

    public static void testMultiUser() {
        System.out.println("TestClient.testMultiUser()");
        ClientCache cache = new ClientCacheFactory()
                .set("security-client-auth-init", 
"com.pivotal.support.johnson.testfunction.UserPasswordAuthInit")
                .set("name", "SecurityClient")
                .set("cache-xml-file", "MultiuserSecurityClient.xml")
                .create();

        Properties properties = new Properties();
        properties.setProperty("security-username", "admin");
        properties.setProperty("security-password", "secret");
        RegionService regionService = cache.createAuthenticatedView( 
properties);
        System.out.println(regionService);
                String value=" {\"orders\": {\"orderId\": 
\"7101012826\",\"accounts\": [{\"accountNumber\": 
\"960555183\",\"accountType\": \"INDIVIDUAL\",\"accountSubType\": 
\"INDIVIDUAL_REGULAR\",\"status\": \"OPERATIONAL\",\"billingAddress\": 
{\"addressId\": 1008737},\"bills\": [{\"billCycleDay\": 
4}],\"isPuertoRicoIndicator\": false,\"marketCode\": \"SEW\",\"tenure\": 
\"1\",\"contactFirstName\": \"TEST\",\"contactFamilyName\": 
\"MARKETINGCATKH\"},{\"accountNumber\": \"33\",\"accountType\": 
\"INDIVIDUAL\",\"accountSubType\": \"INDIVIDUAL_REGULAR\",\"status\": 
\"OPERATIONAL\",\"billingAddress\": {\"addressId\": 1008737},\"bills\": 
[{\"billCycleDay\": 4}],\"isPuertoRicoIndicator\": false,\"marketCode\": 
\"SEW\",\"tenure\": \"1\",\"contactFirstName\": \"TEST\",\"contactFamilyName\": 
\"MARKETINGCATKH\"}]}}";

        Region<String, PdxInstance> region = cache.getRegion("Test");
        PdxInstance pdx= JSONFormatter.fromJSON(value);
        region.put("key",pdx);
              
System.out.println(FunctionService.onServer(regionService).execute(new 
TestFunction()).getResult());

 }






> java.lang.UnsupportedOperationException: Use Pool APIs for doing operations 
> when multiuser-secure-mode-enabled is set to true
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-6078
>                 URL: https://issues.apache.org/jira/browse/GEODE-6078
>             Project: Geode
>          Issue Type: Bug
>            Reporter: Jinmei Liao
>            Assignee: Anilkumar Gingade
>            Priority: Major
>              Labels: SmallFeature
>             Fix For: 1.9.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> User is using
> multiuser-authentication="true"
> Below is the test code code
>     public static void testMultiUser() {
>       System.out.println("TestClient.testMultiUser()");
>         ClientCache cache = new ClientCacheFactory()
>                 .set("security-client-auth-init", 
> "org.apache.geode.testfunction.UserPasswordAuthInit")
>                 .set("name", "SecurityClient")
>                 .set("cache-xml-file", "MultiuserSecurityClient.xml")
>                 .create();
>         Properties properties = new Properties();
>         properties.setProperty("security-username", "admin");
>         properties.setProperty("security-password", "secret");
>         RegionService regionService = cache.createAuthenticatedView( 
> properties);
>         System.out.println(regionService);
>               String value=" {\"orders\": {\"orderId\": 
> \"XXXXXXXX\",\"accounts\": [{\"accountNumber\": \"YYYYYYYY\",\"accountType\": 
> \"INDIVIDUAL\",\"accountSubType\": \"INDIVIDUAL_REGULAR\",\"status\": 
> \"OPERATIONAL\",\"billingAddress\": {\"addressId\": 1008737},\"bills\": 
> [{\"billCycleDay\": 4}],\"isPRIndicator\": false,\"marketCode\": 
> \"SEW\",\"tenure\": \"1\",\"contactFirstName\": 
> \"TEST\",\"contactFamilyName\": \"MARKETINGCATKH\"},{\"accountNumber\": 
> \"33\",\"accountType\": \"INDIVIDUAL\",\"accountSubType\": 
> \"INDIVIDUAL_REGULAR\",\"status\": \"OPERATIONAL\",\"billingAddress\": 
> {\"addressId\": 1008737},\"bills\": [{\"billCycleDay\": 
> 4}],\"isPuertoRicoIndicator\": false,\"marketCode\": \"SEW\",\"tenure\": 
> \"1\",\"contactFirstName\": \"TEST\",\"contactFamilyName\": 
> \"MARKETINGCATKH\"}]}}";
>         Region<String, PdxInstance> region = cache.getRegion("Test");
>         PdxInstance pdx= JSONFormatter.fromJSON(value);
>         region.put("key",pdx);
>               
> System.out.println(FunctionService.onServer(regionService).execute(new 
> TestFunction()).getResult());
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to