Attention: Confluence is not suitable for the storage of highly confidential data. Please ensure that any data classified as Highly Protected is stored using a more secure platform.
If you have any questions, please refer to the University's data classification guide or contact ict.askcyber@sydney.edu.au
5 Credentials
Users can generate a user-access token which is a temporary username and password to logon via RESTAPI or XNAT Upload Assistant
The Chapter 4 mentioned a way to use JSESSION ID to logon to XNAT. But if we are to use software such as XNAT Upload Assistant, we might still need to put in the username and password. Below outlines how we can get a temporary username and password from XNAT.Â
1 use command line to get the XNAT temporary username and password
mbp:$ curl -u username "https://test.xnat.sydney.edu.au/data/services/tokens/issue"
Enter host password for user 'username':
{"secret":"gPlzgvaPip6oDGAlJXLypLHBKW3HVbriBSCIZVJcZPic90KDrFkaeMdfefsasef","estimatedExpirationTime":1526514625443,"alias":"451a00c9-441d-4674-84b3-baafb5ab1122","xdatUserId":"username","singleUse":false,"id":3,"disabled":0,"created":1526341825056,"enabled":true,"timestamp":1526341825056}
"alias" follows the temporary username
"secret" follows the temporary password
mbp:$ curl -u 451a00c9-441d-4674-84b3-baafb5ab1122  "https://test.xnat.sydney.edu.au/data/archive/projects"
Enter host password for user 451a00c9-441d-4674-84b3-baafb5ab1122:
{"ResultSet":{"Result":[{"pi_firstname":"","secondary_ID":"ForeFront","pi_lastname":"","name":"ForeFront Ageing and Neurodegeneration","description":"","ID":"FF","URI":"/data/projects/FF"}], "totalRecords": "1"}}
2 use Web Browser to get the XNAT temporary username and password
Logon to https://URL/data/services/tokens/issue
alias: is the temporary username. (temporary username will be reset for every 6 hours)
secret: is the password
mbp:$ curl -u 451a00c9-441d-4674-84b3-baafb5ab1122  "https://URL/data/archive/projects"
Enter host password for user 451a00c9-441d-4674-84b3-baafb5ab1122:
{"ResultSet":{"Result":[{"pi_firstname":"","secondary_ID":"ForeFront","pi_lastname":"","name":"ForeFront Ageing and Neurodegeneration","description":"","ID":"FF","URI":"/data/projects/FF"}], "totalRecords": "1"}}
Reference
https://wiki.xnat.org/docs16/4-developer-documentation/using-the-xnat-rest-api
XNAT User API (provides the ability to manage user accounts, access, and permissions)
https://sydney.edu.au/research_support/hpc/access/index.shtml#newacct