Open onnozweers opened 2 months ago
I found this issue: https://github.com/dCache/dcache/issues/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.
Just to confirm #7654 is unrelated.
Tested with OIDC token. This works as expected. I updated the table above.
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: https://github.com/dCache/dcache/blob/f19e1c6a28d9e3d986f3ad4ccd7c3afbd30384ac/modules/dcache/src/main/java/diskCacheV111/poolManager/RequestContainerV5.java#L1383 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