This lesson is being piloted (Beta version)

Computing Basics for DUNE - Revised 2025 edition: Tokens

SL7 Tokens

To get a token that allows you to access files (and rucio) in SL7

setup justin
justin time # this just tells justin you want to authenticate

The first time it will ask you to open a web browser, authenticate and enter the long string it delivers to you.

To authorize this computer to run the justin command, visit this page with your
usual web browser and follow the instructions within the next 10 minutes:
https://dunejustin.fnal.gov/authorize/_W_azUJcLhYmAOqClYz9RAsnKbDgzQ6lNA

Check that the Session ID displayed on that page is -cprbbe

Once you've followed the instructions on that web page, you can run the justin
command without needing to authorize this computer again for 7 days.

That gave you authorization to use justin. Now do the command again to get an actual token.

justin get-token

You will have to do this sequence weekly as your justin access expires.

AL9 Tokens

RUCIO authentication does not work on AL9 for now

Please use SL7 if you need to use rucio

normal tokens (below) for xroot access do work

Make certain you have al9 set up

Then use htgettoken to get a token so you can read the files you find.

htgettoken -i dune --vaultserver htvaultprod.fnal.gov #:8200
export BEARER_TOKEN_FILE=/run/user/`id -u`/bt_u`id -u`

The first time you do it it will ask you to authenticate using a web browser.

You should be able to read files at remote sites now. You may need to repeat the htgettoken as the interactive tokens are pretty short-lived. Batch jobs do their own tokens.