person-setup-machine

Creating an API key to mount a share

Creating an API key to mount a share


Category: Resource – Shares

In some cases you will wish to mount a share from a machine without a human user. An example would be mounting from many local systems into your backup server.

To do this, perform these steps:

  1. Create a service account under “Access/Service Accounts”
  2. Download the Authentication Document (Actions menu on the line for the Service Account)
  3. Use ‘Copy Service Account Email” from the (Actions menu on the line for the Service Account)
  4. Using the CLI, lookup the user-id for the ‘Service Account Email’ via ‘show user’
  5. Using the CLI, call ‘add-api-key’

agilicus-cli --issuer https://auth.__MYDOMAIN__ show-user MYSERVICEACCOUNT@serviceaccounts.agilicus.com
agilicus-cli --authentication-document /tmp/authdoc.json add-api-key --duration-seconds 0 --scope "urn:agilicus:fileshare:*:viewer" --user-id USER-GUID --name "Backup read-only mount"