Usage - SEI-TAS/ace-client GitHub Wiki

Pairing Process

In order to use the AAIoT components, the Client and RS need to be first paired to the AS.

Pairing AS and RS

  1. Start up the AS server as explained on https://github.com/SEI-TAS/ace-as
  2. Start up the RS server as explained on https://github.com/SEI-TAS/ace-rs
  3. On the RS command line input, choose "p" to start up the pairing server
  4. On the AS GUI, "Paired IoT Devices" tab, choose either of the pairing buttons to pair the RS.
    • If the RS is in another computer, input its IP address.
    • If the RS is running on the same computer, it is easier to click on "Pair W/O Camera". This is less secure as it will use a default key to encrypt the pairing channel, but is simpler to use.
    • The "Pair New IoT Device" button assumes you have a webcam set up in the computer running AS, and a QR code with the key associated to the RS to be used to secure the pairing channel. Details on this: (TODO)
  5. A message indicating "Paired completed succesfully" should show up in the AS.

Pairing AS and Client

  1. Start up the AS server as explained on https://github.com/SEI-TAS/ace-as
  2. Start up the Client as explained on https://github.com/SEI-TAS/ace-client
  3. On the Client, "Paired ASs" tab, click on "Enable Pairing"
  4. On the AS GUI, "Paired Clients" tab, click on "Pair New Client".
    • If the Client is in another computer, input its IP address.
  5. A message indicating "Paired completed succesfully" should show up in the AS.

Client Permissions Setup

To allow the client to access specific resources of the RS, permissions for it need to be set up in the AS.

  1. With the AS running and the client already paired, go to the "Paired Clients" tab.
  2. For the client in the table you want to configure, click on the "Permissions" button.
  3. On the Permissions window that shows up, add each permission:
  4. Select the IoT device from the drop-down list that you want to give the Client permissions to.
  5. Select the Scope that you want to allow that client to access.
  6. Click on Add Permission.
  7. Repeat these sub-steps until all scopes that are required have been added for this Client.
  8. Close the Permissions window.

Token Retrieval

Assuming that a Client, AS and RS are running, have been paired, and permissions to the RS scopes have been properly given for the Client, the following process will allow a Client to get a token for that RS from the AS:

  1. On the Client GUI, go to the "Tokens" tab.
  2. Input the ID of the IoT Device (RS) to get the token from, and the scope(s) to get the token for.
    • You can refer to the "Paired IoT Devices" tab in the AS GUI to get the id of the RS, as well as the scopes it handles.
  3. If the AS is on another server, input the AS's IP address.
  4. Click on "Request New Token".
  5. If the inputs are correct and the client has permissions for those scopes, a message saying "New token obtained!" should show up. The token should also show up now on the token table.

Resource Access

Assuming that a Client, AS and RS are running, have been paired, permissions to the RS scopes have been properly given for the Client, and a token for the needed RS and scopes has been obtained, the following process will retrieve resource information from the RS (IoT Device):

  1. On the RS/IoT Device, ensure the resource server is running. In the command line, choose "s" to start it.
  2. On the Client GUI, input the ID of the IoT Device (RS) and the resource to access.
    • You can refer to the "Paired IoT Devices" tab in the AS GUI to get the id of the RS.
    • You can refer to https://github.com/SEI-TAS/ace-rs to see the list of available resources.
    • Ensure that the IP and ports are consistent with the location and configured ports of the RS.
  3. Depending on the action:
  4. Click in "Get Resource" to get that resource's information. The results will show up in the text area below.
  5. Input the value to send in the text area below, and click on "Put Resource" to send that value.