Skip to content

TLS Client certificate support [$110] #69

Closed

Description

@martinKupec

Hi,

I am deploying ownCloud to private environment . As I want to upload to my cloud confidental documents, I need some good security.

I have decided, that it would be nice to require SSL certificates from clients. This is pretty strong security measure. But I have found, that there is no support for this in mirall.

I kindly ask any mirall/csync developer, if it would be possible to add configure option for SSL client certificate. All what is needed is is to provide certificate when connecting to server. It should be simple task to someone familiar with the code.

Mirall uses QSslSocket and there are QSslSocket::setLocalCertificate and QSslSocket::setPrivateKey functions to set the certificate.

csync uses neon and it has ne_ssl_set_clicert function.

I will be happy to answer any question or test any code.
Thank you.

Update from @danimo:

Ok, for someone who likes to pick this feature up, here is what needs to be done in more detail:

  • Modify wizard to alternatively accept auth via client cert on top of password (or is there a way to tell owncloud to accept client auth only?)
  • If certificate is encrypted, ask for its password and store via qtkeychain.
  • Add cert/key to QSslConfiguration of the global QNetworkAccessManager.
  • Add property to csync_owncloud.c to pass the certificate (either unencryted or encrypted along with Password) to neon as used in csync (Neon API).

If you want to start working on it, please contact me.

--- Did you help close this issue? Go claim the **[$110 bounty](https://www.bountysource.com/issues/905047-tls-client-certificate-support?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github)** on [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github).

Activity

  1. wdehoog commented on Jan 23, 2013

    @wdehoog

    We have the same situation and cannot use the client until it can provide certificates.

    Preferebly it would use the windows certificate store or the one from firefox.

  2. kzajacc commented on May 28, 2013

    @kzajacc

    We're just another group of people which is interested in this functionality. It would appreciated if You would implement this.

  3. frijsdijk commented on May 28, 2013

    @frijsdijk

    Yessir, interested in such a feature!

  4. danimo commented on May 28, 2013

    @danimo
    Contributor

    If there is so much interest, why does nobody come up with a patch then?

  5. pretjep commented on Jun 11, 2013

    @pretjep

    Waiting for this!!

  6. rbardoel commented on Jul 6, 2013

    @rbardoel

    +1 for this feature!

  7. danimo commented on Jul 6, 2013

    @danimo
    Contributor

    Added outline on how to implement the feature.

  8. natschil commented on Aug 22, 2013

    @natschil

    I'm currently using stunnel to create a https->http "tunnel" as an ugly hack to get this functionality. It works okay-ish, but having to start stunnel every time I start mirall is far from optimal.

  9. natschil commented on Aug 22, 2013

    @natschil

    Does anyone know whether there's any work happening on this?
    If not, I would be interested in looking at the source code to see what I can do.

  10. danimo commented on Aug 22, 2013

    @danimo
    Contributor

    @natschil I am not aware about anyone working on this. See my descriptions in the original report on what needs to be done. Don't hesitate to ask if you need further help.

  11. natschil commented on Aug 22, 2013

    @natschil

    I'll have a look at what I can do in the next few days. Is there an irc
    channel for mirall development somewhere?

  12. danimo commented on Aug 22, 2013

    @danimo
    Contributor

    #owncloud-client-dev

  13. think-nice-things commented on Nov 2, 2013

    @think-nice-things

    I just patched ocsync to allow for CA and client certificates.
    I mailed the patch to [email protected] as I don't know how to add it here.

    The syntax is pretty obvious IMHO and is described in the new help:

    --ca-cert=<file>       file name of CA certificate
    --client-cert=<file>   file name of client certificate
    --client-cert-pass=<p> password of client certificate
    

    This allows ocsync to connect to a server which is protected by a (self-signed) client certificate.

    The ca file will usually be a PEM file, the client certificate will usually be in p12 format.

    I added corresponding properties ca_certificate, client_certificate and client_certificate_pass to csync_owncloud.[ch], which could also be used by the gui.

    Anyone volunteers to do the gui stuff? (I'm afraid of beeing not experienced enough to do this).

    It would be nice if this could make it to the official sources soon.

  14. natschil commented on Nov 3, 2013

    @natschil

    Thanks for doing this!
    I also have a set of (untested) patches for ocsync with client side ssl
    certificates, I can upload them somewhere if you want to compare yours
    with mine. Note that my patches only change the owncloud module of
    csync, and hence have no commandline arguments, but if I remember
    correctly, owncloud doesn't actually call the csync application w/
    commandline parameters but instead dynamically loads a shared library or
    something. (I coded this about a month ago, and I don't remember the
    details).

    I had a look at some of the GUI stuff too and made some preliminary
    changes ( such as changing the .ui files to accept client side ssl
    certificates, and changing some of the configuration file abstraction to
    be able to set client side ssl cert configuration options, but then I
    ran out of free time and didn't actually get to anything that works
    (writing Qt GUIs is not really my area of expertise either).

    On 11/02/2013 10:09 PM, joze- wrote:

    I just patched ocsync to allow for CA and client certificates.
    I mailed the patch to [email protected] mailto:[email protected] as I
    don't know how to add it here.

    The syntax is pretty obvious IMHO and is described in the new help:

    |--ca-cert= file name of CA certificate
    --client-cert= file name of client certificate
    --client-cert-pass=

    password of client certificate
    |

    This allows ocsync to connect to a server which is protected by a
    (self-signed) client certificate.

    The ca file will usually be a PEM file, the client certificate will
    usually be in p12 format.

    I added corresponding properties ca_certificate, client_certificate
    and client_certificate_pass to csync_owncloud.[ch], which could also
    be used by the gui.

    Anyone volunteers to do the gui stuff? (I'm afraid of beeing not
    experienced enough to do this).

    It would be nice if this could make it to the official sources soon.

    —
    Reply to this email directly or view it on GitHub
    #69 (comment).

  15. think-nice-things commented on Nov 3, 2013

    @think-nice-things

    natschil // yes please make your code available, I'll check if I can make the best from both versions

  16. 131 remaining items

  17. changed the title [-]SSL Client certificate[/-] [+]TLS Client certificate support[/+] on Oct 21, 2016
  18. guruz commented on Dec 5, 2016

    @guruz
    Contributor

    PR in #5289 is ready to test.
    Please compile from fix_client_certs branch and (re?)-setup the specific account. It should show a dialog in the wizard that lets you set the client certificate.

    Please comment your test findings on #5289 .. not here.

  19. added
    ReadyToTest
    on Dec 5, 2016
  20. added a commit that references this issue on Jan 2, 2017
  21. guruz commented on Jan 3, 2017

    @guruz
    Contributor

    The PR is merged. We would need some testing from you guys:)
    There was an issue with updating the nightlies on Linux which should be fixed now.

    Please download from or compile yourself (master branch)
    https://owncloud.org/install/#testing-development

    Note that it needs a current Qt version (>= 5.5 or so)

  22. guruz commented on Jan 25, 2017

    @guruz
    Contributor

    Done as part of 2.3

  23. changed the title [-]TLS Client certificate support[/-] [+]TLS Client certificate support [$110][/+] on Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

EnhancementReadyToTestbounty

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions