-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[S3] Implement S3 native Server-Side encryption: SSE-KMS #26001
Conversation
Hi @tsdicloud 👋
This failure should be fixed by a rebase. It's fixed on master already. |
I've only had a cursory look over this PR, but I don't think it would fix #22077, would it? At best, it would be a workaround for the issue, but it would only even be a workaround if you were using Amazon S3 storage rather than another S3-compatible provider. |
You are right, I changed the pull request acordingly. |
63d50a9
to
2ac3349
Compare
@@ -32,7 +32,7 @@ class Console extends Action { | |||
/** | |||
* @param $arguments | |||
*/ | |||
public function runCommand(array $arguments) { | |||
public function runCommand(array $arguments): void { |
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.
Seems something in the rebase went wrong? :)
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.
You are right, and another rebase did the job - nearly completely. Don´t know what happened to the one file that now breaks my psalm. Any idea?
b4011f8
to
23b43f0
Compare
]); | ||
throw new \Exception('Creation of bucket "' . $this->bucket . '" failed. ' . $e->getMessage()); | ||
} | ||
if ($this->params['autocreate'] && !$this->connection->doesBucketExist($this->bucket)) { |
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.
Not sure if that is a faulty conflict resolution but this drops the existing verify_bucket_exists
parameter so existing installations with that would again check for bucket existence on every connection attempt. I guess the autocreate
parameter can be dropped and instead the existing verify_bucket_exists
could just be used for this check.
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.
This is another inconsistency (and contradiction to documentation) that has been corrected along the way. See issue
#26093
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.
even if this is changed, it never worked properly. So why bother?
@tsdicloud Could you do another rebase to latest master to resolve the conflict? |
My name is Bernd Rederlechner from T-Systems, and I am just launching a larger project with NextCloud. This is my first pull-request, so please be patient with me. Nonetheless, this patch is on our critical path and already disussed with NextCloud GmbH as critical patch to integrate with priority into product. In case of doubts, just contact @schiessle.
Functionality:
Amazon S3 supports 2 different kinds of in-platform, server-side encryption (SSE) for securely-managed keys
SSE-KMS per file:
SSE-KMS is enabled by configuring an KMS-keyid and sending it in additional headers to S3.
The new configuration looks like this:
Tests:
(1) running
tests/lib/Files/ObjectStore/S3Test.php
withoutssekmskeyid
set: passed(2) running
tests/lib/Files/ObjectStore/S3Test.php
withssekmskeyid
set: passedSSE-KMS with bucket key:
The disadvantage of SSE-KMS per file is the number of requests to KMS key management system (which you pay per request).
For this reason, Amazon S3 offer the possibility to securely add a bucket key to reduce KMS traffic, see:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html
Pure SSE-KMS per file could be a little bit more flexible in some scenarios or prefered by some security specialists. So, both options are available with this patch.
The new configuration looks like this:
If bucket key is set, the setting
ssekmskeyid
is ignored.Tests:
(1) running
tests/lib/Files/ObjectStore/S3Test.php
withoutssekmsbucketkeyid
set: passed(2) running
tests/lib/Files/ObjectStore/S3Test.php
withssekmsbucketkeyid
set: passedHelp needed
Possible Solution for:
#10767
#11826
(partly solves #22077 for Aws compatible S3 stores)
The current Implementation also has an incomfortable bug that e.g. avoids the Creation/Invitation of new Users
(at least on our Installation). Thus, the patch also fixes:
#23370 (with the proposed solution from there; see also see https://stackoverflow.com/questions/11247507/fclose-18-is-not-a-valid-stream-resource/11247555)
#26093 which was found during debugging