Sync with Basic Token Authorization

Aspera nodes that require access key authentication (ATCM, ATS) can be used as synchronization endpoints by configuring the async database on the node and authenticating the async session with a Basic token. A Basic token requires a docroot on the server and allows access to all files in the docroot.

  1. On the client, set a location for the Sync snapshot database.
    Run the following command:
    > asconfigurator -x "set_node_data;async_db_dir,filepath"
  2. On the server, set a docroot for the transfer user.
    Log in or SSH into the server and run the following command:
    > asconfigurator -x "set_user_data;user_name,username;absolute,filepath"
  3. Create an Aspera Access Key.
    ATCM: Open the Cluster Manager web UI. Click your cluster and click the Access Keys tab. Click New and fill in the required information (for a description of the fields, see the Aspera Transfer Cluster Manager Admin and Usage Guide).

    ATS: In Aspera Client, click Connections to open the Connection Manager window. Click the "Create a new connection" button. Select Create a connection from a new ATS Access Key and click OK. Enter the following information:

    • Connection Name - A name for the connection.
    • Storage - Select your object storage from the drop-down menu.
    • Storage credentials, depending on storage type.
    • Path - Transfers using the ATS access key are limited to the specified path and its subdirectories.

    Click OK. The Aspera Client automatically launches your browser and prompts you for your Aspera ID credentials (your ATS login). The ATS access key that is generated is not displayed after you add the connection; to retrieve your ATS access key and secret key, click Tools > Manage ATS and search for the access key by name.

    Record the Access Key ID and secret for use in the next step.

  4. Create the Basic token from the access key ID and secret.
    Run the following command to encode the access key ID and secret in base64. Create a text file that contains the text string access_key_id:secret. Windows does not have a native base64 encoder. These instructions require you to download base64.exe, a free utility.
    > base64.exe infile outfile

    The basic auth token in the outfile looks similar to the following:

    ZGlEZXVGTGNwRzlJWWRzdnhqMFNDcTRtT29oTkpUS3ZwNVEyblJXakRnSUE6YXNwZXJh

    Open the file and delete any line breaks so that the token text is one continuous string.

  5. Run a synchronization, using the Basic auth token.
    To use the Basic auth token, run async with the -W option or set the ASPERA_SCP_TOKEN environment variable. For example,
    > async -N atcm_sync -d /images -r lion@10.0.0.1:/data/images -K push -W "Basic ZGlEZXVGTGNwRzlJWWRzdnhqMFNDcTRtT29oTkpUS3ZwNVEyblJXakRnSUE6YXNwZXJh"

    If you are synchronizing with an ATC node, specify its location as its IP address, rather than the DNS name, to ensure that the file is transferred to the correct node.