Project

General

Profile

Actions

Task #9213

closed

enable calDAV authentication on D4Science Gateways

Added by Massimiliano Assante almost 8 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
High
Assignee:
_InfraScience Systems Engineer
Category:
Application
Target version:
Start date:
Jul 07, 2017
Due date:
Nov 30, 2017
% Done:

100%

Estimated time:
Infrastructure:
Pre-Production, Production

Description

The calDav integration has been activated, however there is some issue with the ha-proxy as if I try to use any of the virtual host name iCal would fail to connect, while if i bypass it by using infra-gateway for instance (but only few of us have direct access) it works. (see screenshot).

I also tried in dev with the virtual host name next.d4science.org and the authentication works fine.

here is a calDAV url you can try (but replace andrea.rossi with your username)

https://bluebridge.d4science.org/webdav/user/calendar/andrea.rossi/


Files

Screen Shot 2018-02-22 at 18.47.25.png (30 KB) Screen Shot 2018-02-22 at 18.47.25.png Andrea Dell'Amico, Feb 22, 2018 06:47 PM
Screen Shot 2018-02-22 at 18.58.09.png (140 KB) Screen Shot 2018-02-22 at 18.58.09.png Massimiliano Assante, Feb 22, 2018 06:59 PM
Screen Shot 2018-02-22 at 18.58.20.png (139 KB) Screen Shot 2018-02-22 at 18.58.20.png Massimiliano Assante, Feb 22, 2018 06:59 PM
Screen Shot 2018-02-22 at 18.56.57.png (155 KB) Screen Shot 2018-02-22 at 18.56.57.png Massimiliano Assante, Feb 22, 2018 06:59 PM
Screen Shot 2018-02-22 at 18.57.36.png (172 KB) Screen Shot 2018-02-22 at 18.57.36.png Massimiliano Assante, Feb 22, 2018 06:59 PM
Screen Shot 2018-02-22 at 19.13.24.png (42.1 KB) Screen Shot 2018-02-22 at 19.13.24.png Andrea Dell'Amico, Feb 22, 2018 07:14 PM
Screen Shot 2018-02-28 at 12.00.45.png (110 KB) Screen Shot 2018-02-28 at 12.00.45.png Massimiliano Assante, Feb 28, 2018 12:01 PM
Screen Shot 2018-02-28 at 11.59.55.png (103 KB) Screen Shot 2018-02-28 at 11.59.55.png Massimiliano Assante, Feb 28, 2018 12:01 PM
Actions #1

Updated by Massimiliano Assante almost 8 years ago

  • Tracker changed from Support to Task
  • Project changed from 24 to D4Science Infrastructure
  • Category set to Application
  • Assignee set to Andrea Dell'Amico
  • Target version changed from Unsprintable to UnSprintable
  • Infrastructure Production added
Actions #2

Updated by Andrea Dell'Amico almost 8 years ago

  • Assignee changed from Andrea Dell'Amico to _InfraScience Systems Engineer
Actions #3

Updated by Andrea Dell'Amico over 7 years ago

  • Status changed from New to In Progress

I could have a hint, but I'd prefer to test it in dev or preprod.

Actions #4

Updated by Massimiliano Assante over 7 years ago

  • Due date changed from Jul 14, 2017 to Nov 30, 2017
Actions #5

Updated by Andrea Dell'Amico over 7 years ago

  • % Done changed from 0 to 60
  • Infrastructure Pre-Production added

It's now working on preproduction. It seems that it could depend by some configuration that I just moved from global to local, but it was just a move so I'm puzzled.

Actions #6

Updated by Andrea Dell'Amico over 7 years ago

It does not work, really. I can add a calendar only when a single tomcat instance is running, and this explains why it never worked in production and why it works when you connect directly to one of the servers.
The behaviour can be reproduced easily: stop one of the backend, add a calendar (success). Remove the calendar and start the stopped backend. Add the calendar again (fail).

From the logs and the answer returned when I try to connect with curl, the error is

HTTP/1.1 401 Unauthorized

But the authentication header is there:

WWW-Authenticate: Digest realm="PortalRealm", nonce=<hash>"

and I did not find any report saying that haproxy do not let pass that header (it would be huge, breaking almost every site that uses authentication)

Actions #7

Updated by Andrea Dell'Amico over 7 years ago

I just made another test, to add confusion. On both the pre and production load balancers I activated a frontend that listens on port 8443 and uses raw tcp to contact the backend servers. That mode works for me on the preproduction servers: I'm able to add a calendar even when both the instances are active. The same configuration does not work on the production servers. I even bypassed nginx there, so from the 8443 port the connection goes directly to tomcat

Actions #8

Updated by Andrea Dell'Amico over 7 years ago

I also tried to start a http frontend on port 8443 and use it to backend a single tomcat instance. It does not work (we are talking about production)

Actions #9

Updated by Massimiliano Assante over 7 years ago

The difference between liferay/tomcat preproduction cluster and the production one is that in case of preproduction the ha-proxy (AFAIK) resides in one node of the cluster (preprod1). In Production this is not true, the ha proxy is not in either of the cluster nodes. Perhaps, this could be the reason why you have 2 different behaviours?

Actions #10

Updated by Andrea Dell'Amico over 7 years ago

I don't think so: from the haproxy point of view they are all remote targets, it never points to 'localhost' or something. And the called hostname is different from any VM hostname.

Actions #11

Updated by Andrea Dell'Amico over 7 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 60 to 100

I've fixed a discrepancy in the web server and haproxy versions between the preprod and the production servers. Now they are aligned and I was able to successfully add the production calendar. It seems that the path must end with a /

Actions #12

Updated by Massimiliano Assante over 7 years ago

  • Status changed from Feedback to Closed

great!

Actions #13

Updated by Andrea Dell'Amico over 7 years ago

Andrea Dell'Amico wrote:

I've fixed a discrepancy in the web server and haproxy versions between the preprod and the production servers. Now they are aligned and I was able to successfully add the production calendar. It seems that the path must end with a /

A clarification: the haproxy versions were 1.6 on pre and 1.7 on the production server (and on the dev one). I only moved preproduction to 1.7, and this is the reason why I excluded that those modification caused the OCSP problem on the production load balancers. Now all the load balancers run haproxy 1.7 but infra dev, where 1.8 is running (pointlessly, because I discovered that the openssl library installed on Ubuntu 14.04 does not support the alpn API, so we cannot activate http/2 without upgrading to a newer Ubuntu release).

The big difference was instead the nginx version, where on preprod1 a more modern one - from a separate repository - was installed. Now the same repository is been used on the prod infra servers too.

Actions #14

Updated by Massimiliano Assante about 7 years ago

  • Status changed from Closed to In Progress
  • % Done changed from 100 to 90

Sorry Andrea, just tried to sync by using https://aginfra.d4science.org/webdav/user/calendar/andrea.rossi/ with no luck, replacing aginfra.d4science.org with infra-gateway worked instead, what settings should I use?

Actions #15

Updated by Andrea Dell'Amico about 7 years ago

It's getting personal, it seems. It's working for me using aginfra.d4science.org as server and /webdav/user/calendar/andrea.dellamico/ as path, see screenshot

Actions #17

Updated by Andrea Dell'Amico about 7 years ago

Yes, port 443 and hostname without the URL.

Actions #19

Updated by Andrea Dell'Amico almost 7 years ago

  • Status changed from In Progress to Rejected
  • % Done changed from 90 to 100

We didn't find a way to make it work reliably.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)