Skip to content
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

rgw: support full object encryption stack on compression #46188

Merged
merged 1 commit into from Oct 24, 2022

Conversation

Zhiwei-Dai
Copy link
Contributor

@Zhiwei-Dai Zhiwei-Dai commented May 6, 2022

replace #36539
add implementation for full object encryption stack on compression. Compressing first and then encrypting.

Security and trustworthiness framework of ceph is important for data storage. Now, cephx and https base on openssl enhance the security of transport layer, and rgw encrytion implementation supports data protection for object store.
Nevertheless, as issues said, issues19988, space usage and data security are exclusive.
New compression and encryption filters do not stack, but logically could do so. Users must choose between at rest data reduction and data security.
The pr solves this problem. Why compressing first and then encrypting, discussion about data encryption and compression has answer
https://crypto.stackexchange.com/questions/33737/is-it-better-to-encrypt-before-compression-or-vice-versa

Fixed: https://tracker.ceph.com/issues/19988
Signed-off-by: Dai Zhiwei daizhiwei3@huawei.com
Signed-off-by: luo rixin luorixin@huawei.com

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@cbodley
Copy link
Contributor

cbodley commented May 10, 2022

@Zhiwei-Dai thanks for the contribution, this is a great feature! i'm seeing some test failures though, could you please take a look?

this is with a vstart cluster with rgw compression enabled:

~/ceph/build $ MON=1 OSD=1 RGW=1 MDS=0 MGR=0 ../src/vstart.sh -n -d --rgw_compression lz4

and running the ceph-master branch of ceph's s3-tests for sse encryption:

~ $ git clone https://github.com/ceph/s3-tests.git -b ceph-master
...
~ $ cd s3-tests
~/s3-tests $ ./bootstrap
...
~/s3-tests $ S3TEST_CONF=s3tests.conf.SAMPLE virtualenv/bin/nosetests -v -a 'encryption,!sse-s3' s3tests_boto3
...
s3tests_boto3.functional.test_s3.test_encryption_sse_c_multipart_upload ... ERROR
...
s3tests_boto3.functional.test_s3.test_encryption_sse_c_multipart_bad_download ... ERROR
...
s3tests_boto3.functional.test_s3.test_sse_kms_multipart_upload ... ERROR

in addition to those 3 test failures, i also found that GET requests hung if i configured rgw with rgw max chunk size = 1048576

@cbodley
Copy link
Contributor

cbodley commented May 10, 2022

for automated test coverage, we'll want to enable compression in rgw's encryption suite:

diff --git a/qa/suites/rgw/crypt/3-rgw/rgw.yaml b/qa/suites/rgw/crypt/3-rgw/rgw.yaml
index ee8d62af05c..764d216aade 100644
--- a/qa/suites/rgw/crypt/3-rgw/rgw.yaml
+++ b/qa/suites/rgw/crypt/3-rgw/rgw.yaml
@@ -6,6 +6,8 @@ overrides:
         setgroup: ceph
         rgw crypt require ssl: false
         debug rgw: 20
+  rgw:
+    compression type: random
 
 tasks:
 - rgw:

can you please add this to the PR?

@Zhiwei-Dai
Copy link
Contributor Author

Zhiwei-Dai commented May 10, 2022

@Zhiwei-Dai thanks for the contribution, this is a great feature! i'm seeing some test failures though, could you please take a look?

in addition to those 3 test failures, i also found that GET requests hung if i configured rgw with rgw max chunk size = 1048576

ths your testing, i'll recheck it.

@Zhiwei-Dai
Copy link
Contributor Author

can you please add this to the PR?

ok, of course

@djgalloway djgalloway changed the base branch from master to main May 25, 2022 19:59
@Zhiwei-Dai Zhiwei-Dai force-pushed the wip-rgw-crypto-stack-on-compress branch from 8132569 to 8f5c35a Compare September 23, 2022 02:46
add implementation for full object encryption stack on compression. Compressing first and then encrypting.

Fixed: https://tracker.ceph.com/issues/19988
Signed-off-by: Dai Zhiwei <daizhiwei3@huawei.com>
Signed-off-by: luo rixin <luorixin@huawei.com>
@Zhiwei-Dai Zhiwei-Dai force-pushed the wip-rgw-crypto-stack-on-compress branch from 8f5c35a to fd6082e Compare September 23, 2022 03:18
@Zhiwei-Dai
Copy link
Contributor Author

@cbodley I have updated the implementation and ceph's s3-tests for sse encryption are all passed.

@Zhiwei-Dai
Copy link
Contributor Author

@cbodley would you mind review the pr again? Thanks

@cbodley cbodley merged commit 5dc16be into ceph:main Oct 24, 2022
@cbodley
Copy link
Contributor

cbodley commented Oct 24, 2022

thanks @Zhiwei-Dai!

cbodley added a commit to cbodley/ceph that referenced this pull request Oct 24, 2022
adds release notes for the feature added in
ceph#46188

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor

cbodley commented Oct 24, 2022

i've opened #48609 to document this new feature in PendingReleaseNotes

@Zhiwei-Dai
Copy link
Contributor Author

i've opened #48609 to document this new feature in PendingReleaseNotes

Nice work

cbodley added a commit to cbodley/ceph that referenced this pull request Dec 1, 2022
adds release notes for the feature added in
ceph#46188

Signed-off-by: Casey Bodley <cbodley@redhat.com>
aaSharma14 pushed a commit to rhcs-dashboard/ceph that referenced this pull request Feb 15, 2023
adds release notes for the feature added in
ceph#46188

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants