dCache / dcache-view

A Web application that provide an easy to use User Interface for dCache System.
Other
1 stars 5 forks source link

dCacheView: use the right WebDAV door #231

Closed onnozweers closed 4 years ago

onnozweers commented 4 years ago

Dear dCache devs,

We have different flavors of WebDAV doors: X509 versus username/password, redirecting versus non-redirecting, and two more with increased security settings.

We have created different flavors of dCacheView to point to these different WebDAV doors. Now we're trying to link each dCacheView to the associated WebDAV door, something like this:

(frontend -> webdav door) dcacheview:22880 -> dcacheview:2880 dcacheview:22881 -> dcacheview:2881 dcacheview:22882 -> dcacheview:2882 dcacheview:22884 -> dcacheview:2884

For now I'm trying to configure this on a single node. But we do have loads of other WebDAV doors.

In order to tell dCacheView which door to use, I've set these tags in the layout file:

[root@dcacheview /etc/dcache/layouts]# grep tags *
frontend.protocols.tags = 2880
frontend.protocols.tags = 2881
frontend.protocols.tags = 2882
frontend.protocols.tags = 2884
webdav.loginbroker.tags=2880
webdav.loginbroker.tags=2881
webdav.loginbroker.tags=2882
webdav.loginbroker.tags=2884

But still, dCacheView is trying to connect to a WebDAV door on a completely different node, lobster16, on port 443. That door is not configured for this traffic.

I've tried this:

frontend.static!dcache-view.endpoints.webdav=https://dcacheview.grid.surfsara.nl:2880/

But that doesn't work either.

So, how can I tell dCacheView to use the correct door?

Kind regards, Onno

femiadeyemi commented 4 years ago

Hi Onno,

We currently have an incomplete solution for the webdav door selection. Base on what you are trying to achieve, I will suggest the following solution:

  1. Frontend: set dcache-view.endpoints.webdav: "https://prometheus.desy.de:443/"
  2. webDAV: make sure that your webdav.loginbroker.tags doesn't contain dcache-view

NB: You will need to do this for each webdav door with the corresponding frontend. It worth mentioning that this is a tentative solution :)

onnozweers commented 4 years ago

Hi Olufemi,

Thanks. I removed the dcache-view tag from all WebDAV doors. Then I used lines like this:

frontend.static!dcache-view.endpoints.webdav=https://dcacheview.grid.surfsara.nl:2880/

At least now it does not try to use strange WebDAV doors.

But I got this error:

GEThttps://dcacheview.grid.surfsara.nl:22880/scripts/tasks/download-task.js
[HTTP/1.1 200 OK 0ms]

XHRGEThttps://dcacheview.grid.surfsara.nl:22880/scripts/tasks/undefined
[HTTP/1.1 404 Not Found 62ms]

Request URL:https://dcacheview.grid.surfsara.nl:22880/scripts/tasks/undefined
Request Method:GET
Remote Address:145.100.32.30:22880
Status Code:
404
Version:HTTP/1.1

Response Headers (201 B)    
Raw Headers
Cache-Control   
must-revalidate,no-cache,no-store
Content-Length  
340
Content-Type    
text/html;charset=iso-8859-1
Date    
Fri, 06 Mar 2020 19:06:52 GMT
Server  
dCache/6.0.10
Request Headers (490 B) 
Raw Headers
Accept  
*/*
Accept-Encoding 
gzip, deflate, br
Accept-Language 
en-US,en;q=0.7,nl;q=0.3
Authorization   
Basic ****************
Connection  
keep-alive
Content-Type    
image/jpeg
DNT 
1
Host    
dcacheview.grid.surfsara.nl:22880
Referer 
https://dcacheview.grid.surfsa…scripts/tasks/download-task.js
Suppress-WWW-Authenticate   
Suppress
User-Agent  
Mozilla/5.0 (Macintosh; Intel …) Gecko/20100101 Firefox/73.0
TypeError: Request failed with response status code 404. download-task.js:22:19
    <anonymous> https://dcacheview.grid.surfsara.nl:22880/scripts/tasks/download-task.js:22

The frontend runs dCache 6.0.10.

femiadeyemi commented 4 years ago

Hi Onno,

Thanks! I will submit a patch to fix the bug that is causing https://dcacheview.grid.surfsara.nl:22880/scripts/tasks/undefined.

Best regards, Olufemi

femiadeyemi commented 4 years ago

Good morning Onno,

A patch is now in the review board to provide a tentative solution. I will ping you once it is pushed upstream.

FYI, please don't forget to set webdav.allowed.client.origins as well.

Best, Olufemi

onnozweers commented 4 years ago

Hi Olufemi,

Thanks! We have this issue in our production dCache, version 6.0.9. I can update dCache on the dCacheView node to a newer 6.0.x to test. Otherwise, I can try to reproduce the situation on our test server with a recent snapshot. Let me know.

Cheers, Onno