-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
New SSE key format #21529
New SSE key format #21529
Conversation
4731f3f
to
1a39480
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense 👍
So I way pointed to another corner case here. |
ade6ae5
to
aa38724
Compare
$progress->start(); | ||
|
||
|
||
foreach ($this->userManager->getBackends() as $backend) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May use callForSeenUsers
of the IUserManager
instead of the for each loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind a agree, but on the other hand we must migrate all users encryption keys, not only the once that ever logged in.
Not sure if this is possible to differ, but save is better than sorry (looking at you ldap and external user backends).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep good point
|
||
$dataArray = json_decode($clearData, true); | ||
if ($dataArray === null) { | ||
throw new ServerNotAvailableException('Invalid encryption key'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write the json_decode error?
if (!$fallback) { | ||
$dataArray = json_decode($clearData, true); | ||
if ($dataArray === null) { | ||
throw new ServerNotAvailableException('Invalid encryption key'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log the JSON error? Or give it to the exception.
@rullzer This needs some work |
bfb721d
to
0abdc26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐘 works
use OC\Encryption\Keys\Storage; | ||
use OC\Encryption\Util; | ||
use OC\Files\Filesystem; | ||
use OC\Files\View; | ||
use OCP\IConfig; | ||
use OCP\IUserManager; | ||
use OCP\Security\ICrypto; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Helper\ProgressBar; | ||
use Symfony\Component\Console\Helper\QuestionHelper; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is unused it seems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
cecf32c
to
6c3dda4
Compare
There was 1 failure:
|
* Encrypt the keys with the instance secret * Store them as json (so we can add other things if needed) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6c3dda4
to
5340ab3
Compare
yeah wrong order thing. fix pushed |
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 32091: failuremysql8.0-php7.2Show full log
mysql5.6-php7.2Show full log
acceptance-app-files
Show full log
|
Signed-off-by: Roeland Jago Douma roeland@famdouma.nl