Update OpenSSL to provide EC-based Chiphers
Hello,
I have ownCloud installed on my server and it's been working perfectly. My entire website is SSL only and as such I have ownCloud setup to enforce SSL connections.
I had previously tested my server with SSL Labs and have received an A for my configuration. (I have all of the appropriate CA and Chain certificates installed.)
With all of this talk about government spying, SSL Labs now has a test for Forward Secrecy. Being an easy change, I decided to update my cipher list to support Forward Secrecy.
Before making any changes:
SSLCipherSuite -ALL:RC4-SHA:HIGH+RSA
Recommended for Forward Secrecy:
SSLCipherSuite -ALL:ECDHE-RSA-RC4-SHA:ECDH+HIGH:-aNULL
When I did this I was able to log into ownCloud via the web interface but the Windows client has the error: "Failed to connect to ownCloud: SSL handshake failed"
The iOS app still works and I can see changes made between the web interface and the iOS app, but the windows client will not connect.
I managed to find a workaround by adding an "old" cipher to the end of my cipher list:
SSLCipherSuite -ALL:ECDHE-RSA-RC4-SHA:ECDH+HIGH:RC4-SHA:-aNULL
Is there a way to update the available ciphers in the ownCloud windows client to support these updated ciphers?
Thanks so much! Jay
Apache 2.4.4 PHP 5.3.10 MySQL 5.5.31 ownCloud 5.0.8 Ubuntu Server 12.04.2 (32 bit)
ECDHE is disabled by the upstream provider of the packages (like all elliptic curve algorithms). However, DHE should be possible. Did you try that? I will look into updating OpenSSL.
I didn't try DHE as it is significantly slower than ECDHE as outlined here: http://vincent.bernat.im/en/blog/2011-ssl-perfect-forward-secrecy.html
Thanks for looking into updating OpenSSL in the client.
I know it's significantly slower, but I just wanted to confirm that this works. I'll reopen so this stays open until after I updated openssl.
I was able to setup perfect forward secrecy on RHEL 6.4 using DHE and verified it using SSL Labs. There are OpenSSL 1.0.1e packages in the Axivo repo that allow for ECDHE, I believe. I tried these cipher suites.
I've also tested this today & yes DHE does work with the Windows client. I used these ciphers:
-ALL:ECDHE-RSA-RC4-SHA:ECDH+HIGH:DHE-RSA-AES256-SHA:-aNULL
Might be a bit late to this, but this is the config I recommend for SSL on Apache 2.4:
SSLEngine on
SSLProtocol ALL -SSLv3 -SSLv2
SSLHonorCipherOrder on
SSLCertificateFile /etc/ssl/certs/certfile.pem
SSLCertificateKeyFile /etc/ssl/private/keyfile.key
SSLCertificateChainFile /etc/ssl/certs/cafile.pem
SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA:AES128-SHA:RC4-SHA
This is still an issue in v 1.5.1 of clients, no RFC-5288/5289 ciphers are supported, only DHE/AE-CBC Combo.
If Owncloud runs on a different subdomain, SNI allows to have an Owncloud specific config but otherwise it could lower the security level of the whole web server.
Sample nginx config that works (needs DHE-RSA-AES256-SHA).
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA256:ECDHE-RSA-AES256-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;
Any plans to build the client against OpenSSL 1.0.1e ?
@tehownt Yes, not solved yet. But the main benefit (PFS) won't work in either case, Qt is missing DH parameter negotiation. We might get this once it lands in Qt (unknown) and we switch to Qt 5.2 or 5.3 (1.6).
@danimo Thanks for the update, though PFS is the main advantage of the new Cipher Suites, one might also consider that there is some security benefit of using AES-GCM (5288/5289) instead of AES-CBC only. But I understand there cannot be half-support of the suites if the clients are built against a newer OpenSSL.
@danimo is right we should include support for AES-GCM in addition to AES-CBC. Right now I am using: TLSv1 DHE-RSA-AES256-SHA "PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1" 448 Mozilla/5.0 (Macintosh) mirall/1.5.0 This article talks about the increase in performance when using ECDHE vs. DHE (http://vincent.bernat.im/en/blog/2011-ssl-perfect-forward-secrecy.html). What are the plans to improve the ciphers on mirall?
@leonardomarino If your server is configured correctly (cipher order), ownCloud 1.6.0 on Windows and Mac OS (currently in beta2) should connect with GCM, and provide ECDHE. On Linux it depends on the capabilities of the OpenSSL version shipped with the distro.
@tehownt Can you also test with 1.6.0 beta2?
@danimo Tested and there's a strange behaviour. Though the selected cipher is successfully chosen to (for instance) 0xc030 after clientHello/ServerHello (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) it ends up being TLS_RSA_WITH_RC4_128_MD5 after the client Changecipherspec so I might have to investigate further...
@danimo Nevermind, I think that ssldump is a bit too old and doesn't understand the TLS session tickets hence flags the 04 handshake type as a cipher suite... So, I guess it's good :) Thanks for the changes !
It's really nice to have cert info right on the top of the window with a small lock icon, it would be great if the cipher suite was present too.
@danimo I just tested with version 1.6.0 beta2 and I get the following from my logs: TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "PROPFIND /owncloud/remote.php/webdav HTTP/1.1" 7683 Mozilla/5.0 (Macintosh) csyncoC/0.91.5 neon/0.30.0 and: TLSv1 DHE-RSA-AES256-SHA "PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1" 452 Mozilla/5.0 (Macintosh) mirall/1.6.0
Looks like the sync process is handled using ECDHE-RSA-AES256-GCM-SHA384 by csyncoC/0.91.5 neon/0.30.0, however after the sync mirall/1.6.0 uses: DHE-RSA-AES256-SHA, would it be possible for mirall to use ECDHE-RSA-AES256-GCM-SHA384? or is this related to QT?
These are the ciphers that I am using right now:
SSLProtocol All -SSLv2 -SSLv3 SSLCipherSuite ECDH+AESGCM256:DH+AESGCM256:ECDH+AES256:DH+AES256:!RSA+AES256:!ADH:!AECDH:!MD5:!DSS:!aNULL:!eNULL:!LOW:!EXP SSLHonorCipherOrder on
However, I would like to avoid using SHA1, and when I include the following directive in the SSLCipherSuite :!SHA1 mirall stops working.
Are there any updates on this? What is the best/optimal SSL cipher configuration for ownCloud that supports mirall? Thanks!
@collinbarrett I am running apache and I have the following directives:
SSLProtocol All -SSLv2 -SSLv3 SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES+SHA384:ECDH+AES+SHA256:DH+AES:!RSA+AES256:!ADH:!AECDH:!MD5:!DSS:!aNULL:!eNULL:!LOW:!EXP SSLHonorCipherOrder on
These directives allow you to use cyphers that support forward secrecy and work with a wide range of clients.
In my apache log using Mac OS X Client 1.6.3 I get:
[18/Oct/2014:08:33:37 -0400] 192.168.1.13 - TLSv1 DHE-RSA-AES256-SHA
Which means that this is the best cypher that both client and server can negotiate. Right now you should avoid using SSLv3 cyphers because of the POODLE Attack (CVE-2014-3566).
Implemented in 1.7.1rc1