| Authentication and Authorization |
305
You can also specify the basic token on the command line by using the
-W "Basic
token_string
".
4.
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
Bearer Tokens
A bearer token is created from an access key ID, access key secret, and an SSL private-public key pair. Bearer token
authentication is required for transfers to and from IBM Aspera on Cloud, but can be used for transfers with all other
Aspera servers, too.
To create a bearer token with asnodeadmin, run the following command as a user with admin/root permissions. If you
do not specify an SSL key file or directory, you are asked if you want to create one and the filename for the private
key. The bearer token is returned in standard out.
# /opt/aspera/bin/asnodeadmin -u node_username -p node_user_password \
--bearer-create \
--access-key
access_key_id
\
--user-id
user_id
\
--expires-at
UTC_date
\
--group-ids
id1,id2,…
\
--scope-role {user|admin} \
--token-key-length
length
Option
Required
Type
Description
-u, --user
Required
String
The Node API username.
-p, --pwd, --password
Required
String
The Node API user's
password.
--bearer-create
Required
--access-key
Required
String
The ID of the access key
that is used to create the
bearer token
--user-id
Required
String
The ID of the user who
is granted permissions to
content in the storage by /
permissions.
--group-ids
Optional
String
The ID of the group that
is granted permissions to
content in the storage by /
permissions.