You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "machristie (via GitHub)" <gi...@apache.org> on 2023/05/02 20:46:09 UTC

[GitHub] [airavata-custos] machristie opened a new issue, #382: findUsers isn't returning results when called with super tenant credentials for a child tenant

machristie opened a new issue, #382:
URL: https://github.com/apache/airavata-custos/issues/382

   I created a super tenant and a child tenant. In the child tenant I created a user with username "demouser".  I then tried to search for the "demouser" in the child tenant but using the super tenant credential. This is to support a Data Catalog use case (see https://github.com/apache/airavata-data-catalog/issues/12): Data Catalog will have a Custos super tenant credential and will use that to resolve users, groups, etc. in child tenants.
   
   Here's the code I used:
   
   ```java
           // Super tenant
           String clientId = "custos-s8qf9g3odbbcdsgd2khv-10000000";
           String clientSec = "REDACTED";
           String childClientId = "custos-e6vgzgskcr0pewrejma3-10000002";
           // String clientId = "custos-e6vgzgskcr0pewrejma3-10000002";
           // String clientSec = "REDACTED";
           CustosClientProvider custosClientProvider = new CustosClientProvider.Builder().setServerHost("localhost")
                   .setServerPort(7000)
                   .setClientId(clientId) // client Id generated from above step or any active tenant id
                   .setClientSec(clientSec)
                   .usePlainText(true) // Don't use this in production setup
                   .build();
           UserManagementClient userManagementClient = custosClientProvider.getUserManagementClient();
           // userManagementClient.registerUser("demoUser", "Demo", "User", "testpassword",
           // "demouser@gmail.com", false);
           // userManagementClient.enableUser("demoUser");
           // FindUsersResponse findUsersResponse =
           // userManagementClient.findUser("demouser", null, null, null, 0, 1);
           FindUsersResponse findUsersResponse = userManagementClient.findUser(childClientId, "demouser", null, null, null,
                   0, 1);
           System.out.println("findUsersResponse=" + findUsersResponse);
   ```
   
   The above works if I search for the user with the child tenant credentials, but not when I use the super tenant credentials.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@airavata.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airavata-custos] isururanawaka commented on issue #382: findUsers isn't returning results when called with super tenant credentials for a child tenant

Posted by "isururanawaka (via GitHub)" <gi...@apache.org>.
isururanawaka commented on issue #382:
URL: https://github.com/apache/airavata-custos/issues/382#issuecomment-1533887382

   @machristie  please try out 
   `FindUsersResponse response =  userManagementClient.findUsers("CLIENT_ID",null,"jhon",null,null,null,
                     0,1);`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@airavata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airavata-custos] isururanawaka closed issue #382: findUsers isn't returning results when called with super tenant credentials for a child tenant

Posted by "isururanawaka (via GitHub)" <gi...@apache.org>.
isururanawaka closed issue #382: findUsers isn't returning results when called with super tenant credentials for a child tenant
URL: https://github.com/apache/airavata-custos/issues/382


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@airavata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airavata-custos] machristie commented on issue #382: findUsers isn't returning results when called with super tenant credentials for a child tenant

Posted by "machristie (via GitHub)" <gi...@apache.org>.
machristie commented on issue #382:
URL: https://github.com/apache/airavata-custos/issues/382#issuecomment-1540946592

   Thanks @isururanawaka , that worked


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@airavata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org