@tessa67
This quote
- CURLOPT_SSL_VERIFYPEER verifies the certificate chain. Its documented default is 1 (enabled). When enabled and verification fails, "the connection fails".
- CURLOPT_SSL_VERIFYHOST verifies that the certificate matches the hostname you're connecting to. Its documented default is 2 (enabled, strict).
does not add value for a Plesk forum member that encounters issues with verification (of SSL or hostnames), even though default value is "enabled" - it raises more questions that can only be answered by investigating the simple fact that Plesk uses its own implementations of packages.
This quote
The libcurl documentation explicitly warns: "disabling verification of the certificate allows bad guys to man-in-the-middle the communication without you knowing it".
is still true, even when hostname or certificate validation / verification is allowed : FTPS + libcurl (and certainly Plesk's implementation) are prone to MITM !
In general, both aforementioned quotes are barely relevant, since PMM-RAS (Plesk Migration Manager Repository Access Service - with emphasis on Plesk Migration Manager) work differently as they "appear" and the inner working of PMM-RAS also depends on what you use : Migration Manager Tool, Plesk Backup with full remote backups, Plesk Backup with incremental backup and so on.
It really is a mix-and-match between rsync and some other protocols. Do not ask me why, do not ask me whether I agree with this implementation.
This quote
This confirms pmm-ras is not simply using the system's curl/OpenSSL stack. It carries its own implementation. That is relevant to your situation: the trust store or verification settings used by pmm-ras may differ from what your independent OpenSSL test used.
is entirely correct : Plesk simply adds it's own implementation of OpenSSL and uses that, with the big drawback that bugs are not being fixed at all or not in time.
Then, there is a problem when testing with OpenSSL commands from the command line : these commands DO use the packages that are installed with the OS, IF (and only if) specific packages (included with the OS) are kept on the server (and not deleted when the packages from Plesk are installed).
So, there might be a discrepancy in the results obtained from specific types of testing and the results one would like to see when testing Plesk.
This quote
I cannot prove from available documentation that pmm-ras disables verification by default, nor that it uses a specific different CA store. The "continuing anyway" message you saw is consistent with verification being disabled or non-fatal, but I have no official Plesk source confirming the exact code path.
is not very relevant, since Plesk communicates with port 21 and then switches to passive ports - at least, it should do so, unless configured otherwise.
In my humble opinion, the "continue anyway" can safely be ignored and can be due to many factors (not limited to certificate related issues alone).
This quote
I also cannot confirm what "result 13" means in the context of pmm-ras specifically. Public sources list OpenSSL result codes where 13 (decimal) is "format error in certificate's notBefore field", but whether pmm-ras prints hex or decimal is not documented. My hex theory (13 = 19 = self-signed in chain) is plausible but unverified for this specific binary.
is INTERESTING - if true, then a very very very old bug has re-entered the certificate generation process.
Again, not uncommon, certainly when companies (like Plesk) are inclined to create there own packages.
Nevertheless, not a severe bug.
This quote
3. Ask Plesk specifically: Does pmm-ras provide a supported option to (a) point at the system CA store, and (b) abort the transfer on verification failure instead of continuing? That is a question they can answer with documentation or a ticket.
is creating false hope that Plesk will actually tackle this alleged issue via a support ticket.
This Plesk forum contains and/or supports reporting alleged bugs - these bug reports are dealt with fast and professionally.
Moreover, it is highly social and useful for other Plesk forum users to see the reported bug and the response of Plesk staff !
This quote
On the firewall argument in post #4
Firewall rules and passive ports are useful defense in depth, but they do not perform certificate validation. A firewall rule controls which IPs can connect. It cannot verify that the server on the other end of an allowed connection is the server named in the certificate. The libcurl documentation is explicit that encryption alone without verification is insufficient because "you cannot be sure that you are communicating with the correct end-point". That is a documented fact, not an opinion.
is indeed an opinion.
The libcurl documentation is not a bible of truth, but simply a suggestion - just like my suggestion to improve security is.
To be honest, one should treat libcurl the same as PHP and its documentation likewise : there are many issues with these types of software that are not dealt with and not spoken off, even though some of these issues are severe bugs that exists for dozen of years (without any resolution).
So, yes, please have the opinion that it is a fact that certificate validation is the way to go.
And ignore the fact that certificates can be weak (and are certainly weak with X509-based certs and/or are certainly weak or problematic when using certs that are generated with buggy OpenSSL) and/or that certificates simply do not work in some cases (when the cert is wrongly generated).
Also ignore the fact that any weak or even any strong certificate cannot prevent MITM attacks.
The simple truth is that firewall rules can restrict access to (storage or backup) servers to a limited set of IPs that are, in advance, considered trustworthy.
The simple truth is also that, even with firewall rules in place, "trustworthy" is not enough : data transfer should be protected with certificates.
Consider this comparison : when driving a safe care like a Volvo, then that does not mean that you should drive 250 km per hour - at that speed, any accident will be deadly, irregardless of the safety of that Volvo brand.
Stated differently, secure everything, everywhere - if and only if meaningful and effective (and look for other solutions otherwise).
In this case, local backups are safer (and faster) and rsyncing them to a remote server is faster (and safer).
That way, there is no need for discussions about libcurl / OpenSSL / FTPS file transfers that can be intercepted ("hacked") by any script kiddy nowadays.
This "conclusion"
Bottom line
The defaults of the library pmm-ras appears to embed are verification-on for both chain and hostname. The fact that you see "continuing anyway" means something in pmm-ras is overriding or bypassing those defaults. The A/B test evidence shows pmm-ras has its own embedded implementation. The next step is to find out which CA store that implementation actually uses, using the strace and openssl commands above, and then take that specific finding to Plesk.
can be - as in most cases with Plesk - simply be answered by assumptions that are close to truth, but that are also never (or hardly) verifiable (due to the fact that Plesk does not share source code by policy - quite odd, given the fact that most of the packages are effectively open source).
My educated guess with respect to the certificate is that Plesk uses the default certificate shipped with Plesk : it is a messy one, so that could explain a lot of the issues encountered.
If that educated guess is correct, than all should be resolved by installing a proper paid-for certificate : just buy one and test with that new certificate (and if none of the issues remain, then one can safely conclude that the default Plesk certificate is causing havoc).
Normally, I would not guess and simply spin up a Plesk test server, but I am restricted in the number of development licenses.
My educated guess with respect to the "continue anyway" notification is that it is a workaround from a far away past that was implemented in order to prevent that connections were not established (and hence backups were not made) in the good old days where there were a lot of Plesk related issues.
If that educated guess is correct, then one should acknowledge the fact that the workaround would already be removed by Plesk team if that is possible.
My bottom line is this.
@tessa67 .......... I like your style and your responses.
However, the problem is that you are knowledgeable and also give answers that often do redirect Plesk forum members to solutions that will not work or that will cause havoc in the near future, when Plesk decides to implement updates.
In my experience, it is not always the best idea to tackle one problem by providing general solutions that might not actually fit the root cause of the problem (and this root cause often differs across OSes and configurations of Plesk, especially those custom configs applied by individual Plesk users).
Nevertheless, keep doing the good and valuable work!
Kind regards....