You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On our test server running a very recent master snapshot, we (@natalieda, @hailihu and I) have noticed a problem with staging with the API's bulk-requests. But only when using macaroons to authenticate through the API. And only when the file is nearline: when the file already is online, a pin is added to it. When using X509 or Basic auth, it just works normally.
Authentication
File is online
File is nearline
X509
Pinning works
Staging works
Basic (password)
Pinning works
Staging works
OIDC token
Pinning works
Staging works
Macaroon
Pinning works
"File not online. Staging not allowed"
In production, running 9.2.20, this problem doesn't exist.
However, when we try this not with macaroons, but with another authentication method, like Basic (username/password) or X509, it just works. Here an example with Basic auth:
[onno@ui ~]# curl -X POST "https://dcachetest.grid.surfsara.nl:20443/api/v1/bulk-requests" --user onno --fail -H "accept: application/json" -H "content-type: application/json" -d '{ "activity": "PIN", "arguments": {"lifetime": "300"}, "target": ["/users/onno/tape/test"]}' --dump-header - | grep request-url
Enter host password for user 'onno':
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 91 0 0 100 91 0 300 --:--:-- --:--:-- --:--:-- 301
request-url: https://dcachetest.grid.surfsara.nl:20443/api/v1/bulk-requests/77eba525-6bee-4e12-bff3-4e93705801b4
I found this issue: #7654
I wasn't sure if it was related, so I upgraded our test server to the latest snapshot c165794. But this macaroon issue still exists.
On our test server running a very recent master snapshot, we (@natalieda, @hailihu and I) have noticed a problem with staging with the API's
bulk-requests
. But only when using macaroons to authenticate through the API. And only when the file is nearline: when the file already is online, a pin is added to it. When using X509 or Basic auth, it just works normally.In production, running 9.2.20, this problem doesn't exist.
Below is how we can reproduce it.
Version:
Getting a macaroon (with my username & password):
Putting the token in the variable BEARER_TOKEN:
Submit a stage (pin) request:
Checking the result:
"Staging not allowed."
However, when we try this not with macaroons, but with another authentication method, like Basic (username/password) or X509, it just works. Here an example with Basic auth:
I looked up the error message in the source:
dcache/modules/dcache/src/main/java/diskCacheV111/poolManager/RequestContainerV5.java
Line 1383 in f19e1c6
But my knowledge of Java is insufficient to understand what goes wrong.
Is it a bug, or are we doing something wrong?
Kind regards,
Onno
The text was updated successfully, but these errors were encountered: