Thanks for your response eneubauer. While I’m trying to debug this it really helps to verify some of the issues with somebody else.
Currently I think its an apache2 reverse proxy issue and/or self-signed certificate and not OC / Callabora.
First to respond to your questions.
a. Yes, I’m using that collabora/code docker adapted with my own docker file/image so I could play with just the self-signed certificates/loolwsd.xml
b. OK for Eoile, but in firefox I found if I logged into https://192.168.1.105:9980/loleaflet/dist/admin/admin.html and accepted the risk/certificate, then everythiong works.
c. my HW setup remains same as originally reported except I updated
Server configuration
Operating system :
Owncloud on Raspbian server, 4.15.0-52-generic
Web server:
apache2.4.25 raspbian running https:// self host domain with /owncloud
Database:
Mariadb 10.1
PHP version:
7.2
ownCloud version: (see ownCloud admin page)
10.2.1
- reverse-proxy is running from here
collabora/docker 19.03.1 on Ubuntu 19.04 host in same LAN as OC server
I’ve tried importing the self-signed certificates like this, both seems to work:-
pi@raspberrypi3:~ $ sudo -u www-data php occ security:certificates:import ~/ca-chain.cert.pem
sudo cat ca-bundle.crt >> /var/www/html/owncloud/resources/config/ca-bundle.crt
So nearly everything works :
- I can go to OC, see the Office tab, see thumbnails(large) of files.
- From LAN I can go to /loleaflet/dist/admin/admin.htm and see server stuff
- I’ve edited/created files on one machine/user and verified on another (after accepting risk/certificate within the browser).
BUT, if I click any office file in new browser , it gets stuck (spinning disc) and I get see docker error logs like this:-
wsd-00021-00030 2019-08-12 09:51:34.305399 [ websrv_poll ] ERR Error while handling poll for socket #22 in websrv_poll: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request| ./net/Socket.hpp:570
wsd-00021-00030 2019-08-12 09:52:47.934890 [ websrv_poll ] ERR Socket #22 SSL BIO error: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca (0: Success)| ./net/SslSocket.hpp:281
wsd-00021-00030 2019-08-12 09:52:47.935002 [ websrv_poll ] ERR Error while handling poll for socket #22 in websrv_poll: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca| ./net/Socket.hpp:570
The ‘unknown ca’ is expected I suppose but I’ve added some lines to the apache2 setup that should prevent this i.e. SSLProxyMachineCertificateChainFile):-
<VirtualHost *:443>
ServerName awsbarker.ddns.net
Options -Indexes
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/awsbarker.ddns.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/awsbarker.ddns.net/privkey.pem
#SSLProxyCACertificateFile /var/www/html/owncloud/resources/config/ca-bundle.crt
SSLProxyMachineCertificateChainFile /var/www/html/owncloud/resources/config/ca-bundle.crt
SSLProtocol all +TLSv1 +TLSv1.1 +TLSv1.2
SSLProxyProtocol +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder on
Include /etc/letsencrypt/options-ssl-apache.conf
Encoded slashes need to be allowed #NoDecode
AllowEncodedSlashes NoDecode
Container uses a unique non-signed certificate
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
SSLProxyCheckPeerExpire Off
keep the host
ProxyPreserveHost On
ProxyRequests Off
Disable caching
Header set Cache-Control “no-cache, must-revalidate, private”
Enable X-XSS-Protection
Header set X-XSS-Protection: “1; mode=block”
static html, js, images, etc. served from loolwsd
loleaflet is the client part of Collabora Online
ProxyPass /loleaflet https://192.168.1.105:9980/loleaflet retry=0
ProxyPassReverse /loleaflet https://192.168.1.105:9980/loleaflet
WOPI discovery URL
ProxyPass /hosting/discovery https://192.168.1.105:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery https://192.168.1.105:9980/hosting/discovery
Capabilities
ProxyPass /hosting/capabilities https://192.168.1.105:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities https://192.168.1.105:9980/hosting/capabilities
Main websocket
ProxyPassMatch “/lool/(.*)/ws$” wss://192.168.1.105:9980/lool/$1/ws nocanon
Admin Console websocket
ProxyPass /lool/adminws wss://192.168.1.105:9980/lool/adminws
Download as, Fullscreen presentation and Image upload operations
ProxyPass /lool https://192.168.1.105:9980/lool
ProxyPassReverse /lool https://192.168.1.105:9980/lool
BrowserMatch “MSIE [2-6]”
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
MSIE 7 and newer should be able to use keepalive
BrowserMatch “MSIE [17-9]” ssl-unclean-shutdown
So, as I mention it appears to be apache issue rather than OC/collabora.
I suppose allowing reverse-proxy to do it’s work and allow OC to work with https/http would resolve this - but I’m not expert on this for sure!
Thanks for any further insight.
PS I also noticed OC occ reports a wrong valid date on the cert:-
pi@raspberrypi3:/var/www/html/owncloud $ sudo -u www-data php occ security:certificates
±------------------±----------------±----------------±------------------±----------------+
| File Name | Common Name | Organization | Valid Until | Issued By |
±------------------±----------------±----------------±------------------±----------------+
| ca-chain.cert.pem | Dummy Authority | Dummy Authority | December 31, 1969 | Dummy Authority |
±------------------±----------------±----------------±------------------±----------------+
pi@raspberrypi3:/var/www/html/owncloud $ openssl x509 -noout -text -in ~/ca-chain.cert.pem
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
ef:29:1f:81:c5:0e:37:84
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=CH, ST=BW, L=ecublens, O=Dummy Authority, CN=Dummy Authority
Validity
Not Before: Aug 11 14:12:43 2019 GMT
Not After : Aug 10 14:12:43 2044 GMT