Task #9213
closed
enable calDAV authentication on D4Science Gateways
100%
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
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
Updated by Andrea Dell'Amico almost 8 years ago
- Assignee changed from Andrea Dell'Amico to _InfraScience Systems Engineer
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.
Updated by Massimiliano Assante over 7 years ago
- Due date changed from Jul 14, 2017 to Nov 30, 2017
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.
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)
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
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)
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?
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.
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 /
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.
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?
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
Updated by Massimiliano Assante about 7 years ago
- File Screen Shot 2018-02-22 at 18.58.20.png Screen Shot 2018-02-22 at 18.58.20.png added
- File Screen Shot 2018-02-22 at 18.58.09.png Screen Shot 2018-02-22 at 18.58.09.png added
- File Screen Shot 2018-02-22 at 18.57.36.png Screen Shot 2018-02-22 at 18.57.36.png added
- File Screen Shot 2018-02-22 at 18.56.57.png Screen Shot 2018-02-22 at 18.56.57.png added
what port do you use I put 443 ? tried the following, see screenshots
Updated by Andrea Dell'Amico about 7 years ago
Yes, port 443 and hostname without the URL.
Updated by Massimiliano Assante about 7 years ago
- File Screen Shot 2018-02-28 at 12.00.45.png Screen Shot 2018-02-28 at 12.00.45.png added
- File Screen Shot 2018-02-28 at 11.59.55.png Screen Shot 2018-02-28 at 11.59.55.png added
sorry, it doesn't work with none of the 2 accounts in attachment for me ...
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.