Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Then, one needs to register his own client (this has to be done just the first time to create a new accountlocal IAM client):

Code Block
[arendina@ui-tier1 ~]$ oidc-gen -w device

...

Code Block
-bash-4.2$ eval `oidc-agent-service use`
Agent pid 17216
-bash-4.2$ oidc-add juno2
Enter decryption password for account config 'juno2':
success
-bash-4.2$ export BEARER_TOKEN=$(oidc-token juno2)
-bash-4.2$ export BEARER_TOKEN=$TOKEN
-bash-4.2$ gfal-ls davs://xfer-archive.cr.cnaf.infn.it:8443/juno/
rucio4juno
test_Andrea
cronTest

...

Furthermore, an error like this could appear, but it is just an irrelevent irrelevant warning message:

Code Block
(Davix::OpenSSL) Error: impossible to open /tmp/x509up_u10164:  : error:02001002:system library:fopen:No such file or directory

...

  • Listing directory

    Code Block
    -bash-4.2$ curl -H "Authorization: Bearer $BEARER_TOKEN" --capath /etc/grid-security/certificates/ https://xfer-archive.cr.cnaf.infn.it:8443/juno-test/


  • Upload

    Code Block
    -bash-4.2$ curl --capath /etc/grid-security/certificates -H "Content-Type: text/csv" -H "Authorization: Bearer $BEARER_TOKEN" -X PUT https://xfer-archive.cr.cnaf.infn.it:8443/juno-test/test_Andrea --data-binary "@test"

    where test is the file in the user local folder.

  • Download             

    Code Block
    -bash-4.2$ curl --capath /etc/grid-security/certificates -H "Content-Type: text/csv" -H "Authorization: Bearer $BEARER_TOKEN" https://xfer-archive.cr.cnaf.infn.it:8443/juno-test/test_Andrea -o local_copy
           % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                            Dload  Upload   Total   Spent    Left  Speed
           100    10  100    10    0     0     22      0 --:--:-- --:--:-- --:--:--    22 (edited) 


  • Create a directory

    Code Block
    -bash-4.2$ curl --capath /etc/grid-security/certificates -H "Authorization: Bearer $BEARER_TOKEN" -X MKCOL https://xfer-archive.cr.cnaf.infn.it:8443/juno-test/test_dir


  • Removing a file or a directory

    Code Block
    -bash-4.2$ curl --capath /etc/grid-security/certificates -H "Content-Type: text/csv" -H "Authorization: Bearer $TOKEN" -X DELETE https://xfer-archive.cr.cnaf.infn.it:8443/juno-test/test_dir

...