OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • Solved Nextcloud backup failure, self-signed certs
« previous next »
  • Print
Pages: [1] 2

Author Topic: Solved Nextcloud backup failure, self-signed certs  (Read 8921 times)

qinohe

  • Full Member
  • ***
  • Posts: 160
  • Karma: 19
    • View Profile
Solved Nextcloud backup failure, self-signed certs
« on: July 03, 2019, 05:50:57 pm »
Hi guys,

A while ago, a feature was added to (19.1.7), namely
Quote
adding local CAs to the trusted SSL certificates for most of the system download capabilities, plugin-based PAM authentication rework for IPsec and the web proxy as well as third party fixes for hostapd / wpa_supplicant 2.8 and Suricata 4.1.4
If you are a Nextcloud user using self-signed certs., like me, your backup may be failing, check this! If this is the case, the solution is to still add your self-signed CA to 'ca-root-nss.crt', after this the backup to your cloud will continue to work.

@franco, in forum post https://forum.opnsense.org/index.php?topic=12615.msg58252#msg58252 you said in #4 this feature was added, though, I'm experiecing the opposite and using the above solution. ;)

Thanks, mark
« Last Edit: August 01, 2019, 03:41:34 pm by qinohe »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #1 on: July 03, 2019, 06:25:59 pm »
Hi mark,

Self-signed CA or certificate? There's a difference, because only the former works for this feature.


Cheers,
Franco
Logged

qinohe

  • Full Member
  • ***
  • Posts: 160
  • Karma: 19
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #2 on: July 03, 2019, 06:33:06 pm »
Hi franco,

Thanks for the super-fast response  8), so if I understand correctly, one still needs to add the CRT to 'ca-root-nss' even though I am using a chain?

Greetings, mark
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #3 on: July 03, 2019, 06:42:41 pm »
Hmm, well, so is it a self-signed cert, or a self-signed CA with a cert? Is it a sub-ca?
Logged

qinohe

  • Full Member
  • ***
  • Posts: 160
  • Karma: 19
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #4 on: July 03, 2019, 06:45:01 pm »
It's the CA I have added to the store, the chain is CA -> LEAF -> CRT.

edit: sorry, I meant INTERMEDIATE, not LEAF
« Last Edit: July 03, 2019, 06:57:56 pm by qinohe »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #5 on: July 03, 2019, 07:05:47 pm »
Does the NextCloud server send the intermediate? If not you need to add this one as well to authority section.


Cheers,
Franco
Logged

qinohe

  • Full Member
  • ***
  • Posts: 160
  • Karma: 19
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #6 on: July 03, 2019, 07:09:47 pm »
Thanks, you mean add it to 'ca-root-nss'?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #7 on: July 03, 2019, 07:15:54 pm »
If CA and intermediate are under System: Trust: Authorities this should start working automatically.

It may miss a sync trigger when editing trust entries... I'm not sure.

# configctl firmware configure

There's no reason the CA and intermediate won't turn up in the crt file then.


Cheers,
Franco
Logged

qinohe

  • Full Member
  • ***
  • Posts: 160
  • Karma: 19
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #8 on: July 03, 2019, 07:20:59 pm »
Yes, you see, there lies the problem, both ca & intermediate are added to 'etc/ssl/cert.pem', but it seems they are not used aince I still need to add the ca to 'ca-root-nss', or I'm missing something terribly  ;D

I did run 'configctl firmware configure' OK

Thanks, mark
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #9 on: July 03, 2019, 07:38:46 pm »
The funny thing is ca-root-nss.crt is not for editing because it is the upstream root bundle, not the system root bundle. Case in point is the health audit:

# pkg check -s ca_root_nss
Checking ca_root_nss:   0%
ca_root_nss-3.44.1: checksum mismatch for /usr/local/share/certs/ca-root-nss.crt
Checking ca_root_nss: 100%

Whatever tries to verify your SSL bounces it against the wrong file, but the feature is supposedly working as intended.


Cheers,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #10 on: July 03, 2019, 07:40:13 pm »
(I'll try to look at this when 19.7-RC1 is out.)
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Nextcloud backup failure, self-signed certs
« Reply #11 on: July 03, 2019, 07:40:23 pm »
@franco: does curl default in the port still point on the wrong location?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #12 on: July 03, 2019, 07:47:06 pm »
Yes, it seems that way. Need to find out if this is libcurl or PHP's doing...
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #13 on: July 03, 2019, 07:53:14 pm »
Oh lord, that makes no sense whatsoever as a default.

https://github.com/opnsense/ports/blob/master/ftp/curl/Makefile#L72
Logged

qinohe

  • Full Member
  • ***
  • Posts: 160
  • Karma: 19
    • View Profile
Re: Nextcloud backup failure, self-signed certs
« Reply #14 on: July 03, 2019, 07:56:43 pm »
Quote from: franco on July 03, 2019, 07:38:46 pm
The funny thing is ca-root-nss.crt is not for editing because it is the upstream root bundle, not the system root bundle. Case in point is the health audit:

# pkg check -s ca_root_nss
Checking ca_root_nss:   0%
ca_root_nss-3.44.1: checksum mismatch for /usr/local/share/certs/ca-root-nss.crt
Checking ca_root_nss: 100%

Whatever tries to verify your SSL bounces it against the wrong file, but the feature is supposedly working as intended.


Cheers,
Franco

Well, need not to worry about the health check, I run my own, notified by tmux on it's bar, see link in #1 , #3 on that link. It's a remnant from when we did need to add it, but still works..
No worries, I will see when all the pieces make a puzzle again, until then, I have a working situation  ;)

Greetings, mark
Logged

  • Print
Pages: [1] 2
« previous next »
  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • Solved Nextcloud backup failure, self-signed certs
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2