-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QA] Encryption cannot be enabled on Ubuntu 22.04 #40071
Comments
Probably a setup issue. It works when installing on Ubuntu 20.04 Encryption still works fine on Ubuntu 20.04, after installing all the above mentioned packages from ondrej ppa. |
I can indeed reproduce the issue. Steps taken:
Last step triggers an error:
|
Error from owncloud.log:
|
The problem is due to the fact that Ubuntu 22.04 comes with openssl v3.0.2 per default and in this version legacy ciphers (which we are still using for server-side encryption) are now disabled. This can be workarounded by editing the openssl.config file this way:
this will make encryption to go through and correctly encrypt all files. It may require documentation if we decide to go for this approach (I don't see any other alternative rather than manually compiling an older openssl version on Ubuntu 22.04, which is a no-go IMHO) @mmattel FYI |
We need to document what legacy cyphers are and what it means to customers in terms of security. |
Here is some background info:
@jnweiger we need to do proper testing and update documentation in several locations of our admin docs accordingly! @pmaier1 this is a serious topic and does not only affect U22.04 but also other distros when they go for openSSL 3.x. My recommandation is, that we do a two step task:
|
Especially with other LTS Linux Platforms, we need to find, which other platforms are affected by openssl cypher deprecations.
Migration from one cypher to another will be very compute intensive, and must be well planned. |
This is probably not due to deprecated algorithms as we never use MD2 or DES (maybe our libraries do?). We do use various openssl apis throughout our codebase. |
@IljaN correct, https://github.com/owncloud/encryption/blob/v1.5.1/lib/Crypto/Crypt.php#L696 and https://github.com/owncloud/encryption/blob/v1.5.1/lib/Crypto/Crypt.php#L671 are the problematic calls AFAICT |
@pako81 Do both calls return this error? Do you know? |
@IljaN https://github.com/owncloud/encryption/blob/v1.5.1/lib/Crypto/Crypt.php#L696 is first called when encrypting files with master key and, yes, it returns an |
while https://github.com/owncloud/encryption/blob/v1.5.1/lib/Crypto/Crypt.php#L671 is called when converting to plain text to read the file. I did not test it but I assume it will trigger the same error. |
Hmhh... I wonder if we need to change our encryption key format and provide a migration as @mmattel already hinted because |
Are some of our key-files missing "start lines" ? Adding those might fix this, however we then need to check every site where we read keys, as we might not use openssl_* in some places but read the files with fopen and might not expect a start line there. |
@pako81 Was this an upgraded instance or a fresh-one? Because I would assume that if the keys were initially written with openssl v3 it would automatically add those start-lines (or maybe not 🤔 ;)) |
@IljaN fresh-one with no files except the standard ones. |
There is more 😢 (Create new file, try to save)
|
There is now an See comment #40123 (comment) So this confirms that the issue happens in an automated test environment. If we sort out a solution that combines encryption settings, code changes, whatever, then we can apply the suggested solution to the automated tests and quite easily know if it works. |
@phil-davis you may want to see the comment regarding a needed openSSL config change |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed. |
Seen in 10.10.0 RC2 with encryption 1.5.1 on ubuntu-22.04
Install using ondej ppa:
Excerpt from the server log:
The text was updated successfully, but these errors were encountered: