Basic Tokens

A basic token is created from an access key ID and secret, which authorizes a transfer user access to a specific area of a storage and authenticates that user to the storage. Basic token authentication can be used for transfers with Faspex and Shares, and are less restrictive than transfer tokens.
  1. On the server, create a system user xfer and configure it for token authorization, as described in Setting Up Transfer Token Authorization.
  2. Create an access key for the storage and retrieve its ID, as described in Access Key Authentication.
  3. Create a basic auth token by encoding the access_key_id:secret in base64.
    # echo -n access_key_id:access_key_secret | base64

    For example:

    # echo -n diDeuFLcpG9IYdsvxj0SCq4mOohNJTKvp5Q2nRWjDgIA:aspera | base64

    The basic auth token looks similar to the following:

    ZGlEZXVGTGNwRzlJWWRzdnhqMFNDcTRtT29oTkpUS3ZwNVEyblJXakRnSUE6YXNwZXJh
    If the basic auth token breaks across lines in the output, rerun the command using the -w0 option to remove the line break. For example:
    # echo -n access_key_id:access_key_secret | base64 -w0
  4. Set the Basic auth token as an environment variable by running the following command:
    # export ASPERA_SCP_TOKEN="Basic token_string"

    You can also specify the Basic token on the command line by using the -W "Basic token_string".

  5. Transfer content.

    To upload a file, use the following syntax:

    # ascp -i path/to/private_key_file -d source_path username@hostname:destination_path 

    Where the path to the private key file is:

    • /opt/aspera/var/aspera_tokenauth_id_rsa

    The destination_path can be / to indicate the top of the access key storage, or /path to indicate a subdirectory.

    For example:

    # ascp  -i /opt/aspera/var/aspera_tokenauth_id_rsa -d testfile03 xfer@10.0.3.4/tmp