You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by GitBox <gi...@apache.org> on 2020/06/22 17:53:47 UTC

[GitHub] [airavata-custos] virendrawali opened a new issue #83: How to test Agent Management Client

virendrawali opened a new issue #83:
URL: https://github.com/apache/airavata-custos/issues/83


   I have a few queries regarding the agent management client:
   
   **1. What is an agent?**
   **2. In the agent management client samples, a username and password is used to get a token. Can we obtain some username and password for running our test cases**
   
   ```
   def register_and_enable():
       agent = {
           "id": "agent-asdasda-ebnmvf",
           "realm_roles": [],
           "attributes": [{
               "key": "agent_cluster_id",
               "values": ["123123131"]
           }]
       }
       id_res = id_client.token(token, username="isjarana", password="Custos1234", grant_type="password")
       response = client.register_and_enable_agent(id_res['access_token'], agent)
       print(response)
   
   register_and_enable()
   ```
   
   **What credentials can we use for running a similar code in test case?**


----------------------------------------------------------------
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.

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



[GitHub] [airavata-custos] isururanawaka commented on issue #83: How to test Agent Management Client

Posted by GitBox <gi...@apache.org>.
isururanawaka commented on issue #83:
URL: https://github.com/apache/airavata-custos/issues/83#issuecomment-647861339


   > I have a few queries regarding the agent management client:
   > 
   > **1. What is an agent?**
   
   Agents are similar to Service Accounts. For instance, a tenant that has distributed bots performing different work under different privileges needs a mechanism to authenticate its bots to resource servers. But, tenant cannot share its credentials with bots.  In such a scenario, the tenant can register agents and obtain different credentials for agents.
   
   First, you need to have an activated tenant to use Agents.
   One tenant can have multiple agents. agents are independent clients that can obtain OAuth tokens. Agents store attributes and roles and can embed them on their tokens.
   
    
    -> you need to enable agents
     -> register agent 
            (This would give clientID and Secret for agent)
     -> log using client credentials grant type.
   
   First, try out following REST endpoints of Agent Management
   https://docs.google.com/document/d/1WjnADghys2Z-L8smOJtbal7vVcZI11oBBfBz83p88VM/edit#heading=h.d4gkngk38px3
      Note: replace port with  /apiserver/
   
   > **2. In the agent management client samples, a username and password is used to get a token. Can we obtain some username and password for running our test cases**
   > 
   > ```
   > def register_and_enable():
   >     agent = {
   >         "id": "agent-asdasda-ebnmvf",
   >         "realm_roles": [],
   >         "attributes": [{
   >             "key": "agent_cluster_id",
   >             "values": ["123123131"]
   >         }]
   >     }
   >     id_res = id_client.token(token, username="isjarana", password="Custos1234", grant_type="password")
   >     response = client.register_and_enable_agent(id_res['access_token'], agent)
   >     print(response)
   > 
   > register_and_enable()
   > ```
   > 
   > **What credentials can we use for running a similar code in test case?**
   
   


----------------------------------------------------------------
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.

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



[GitHub] [airavata-custos] isururanawaka closed issue #83: How to test Agent Management Client

Posted by GitBox <gi...@apache.org>.
isururanawaka closed issue #83:
URL: https://github.com/apache/airavata-custos/issues/83


   


-- 
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.

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