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

[stable10] Backport of Integrate HSM changes to encryption #34527

Merged
merged 1 commit into from
Feb 18, 2019

Conversation

sharidas
Copy link
Contributor

Integrate HSM changes to encryption.

Signed-off-by: Sujith H [email protected]

Description

This PR tries to integrate changes involved for HSM.

Related Issue

  • Fixes <issue_link>

Motivation and Context

This PR tries to integrate changes involved for HSM.

How Has This Been Tested?

  • Did basic testing with user-keys and masterkey.
  • masterkey
 sujith@sujith-ownCloud  ~/test/owncloud2   stable10 ●  tree data
data
├── admin
│   ├── cache
│   ├── files
│   │   └── welcome.txt
│   ├── files_encryption
│   │   └── keys
│   │       └── files
│   │           └── welcome.txt
│   │               └── OC_DEFAULT_MODULE
│   │                   ├── fileKey
│   │                   └── master_9190d8bb.shareKey
│   └── thumbnails
│       └── 12
│           ├── 2048-2048-max.png
│           └── 32-32.png
├── avatars
│   └── 21
│       └── 23
│           └── 2f297a57a5a743894a0e4a801fc3
├── files_encryption
│   └── OC_DEFAULT_MODULE
│       ├── master_9190d8bb.privateKey
│       ├── master_9190d8bb.publicKey
│       ├── pubShare_9190d8bb.privateKey
│       └── pubShare_9190d8bb.publicKey
├── files_external
│   └── rootcerts.crt
├── index.html
└── owncloud.log

17 directories, 12 files
 sujith@sujith-ownCloud  ~/test/owncloud2   stable10 ●  less data/admin/files/welcome.txt 
 sujith@sujith-ownCloud  ~/test/owncloud2   stable10 ●  ls -lth data/files_encryption/OC_DEFAULT_MODULE 
total 16K
-rw-r--r-- 1 sujith sujith 189 Feb 18 15:19 master_9190d8bb.privateKey
-rw-r--r-- 1 sujith sujith 451 Feb 18 15:19 master_9190d8bb.publicKey
-rw-rw-r-- 1 sujith sujith 189 Feb 18 15:19 pubShare_9190d8bb.privateKey
-rw-rw-r-- 1 sujith sujith 451 Feb 18 15:19 pubShare_9190d8bb.publicKey
 sujith@sujith-ownCloud  ~/test/owncloud2   stable10 ● 
  • user keys
 sujith@sujith-ownCloud  ~/test/owncloud2   stable10 ●  tree data 
data
├── admin
│   ├── cache
│   ├── files
│   │   └── welcome.txt
│   ├── files_encryption
│   │   ├── keys
│   │   │   └── files
│   │   │       └── welcome.txt
│   │   │           └── OC_DEFAULT_MODULE
│   │   │               ├── admin.shareKey
│   │   │               └── fileKey
│   │   └── OC_DEFAULT_MODULE
│   │       ├── admin.privateKey
│   │       └── admin.publicKey
│   └── thumbnails
│       └── 14
│           ├── 2048-2048-max.png
│           └── 32-32.png
├── avatars
│   └── 21
│       └── 23
│           └── 2f297a57a5a743894a0e4a801fc3
├── files_encryption
│   └── OC_DEFAULT_MODULE
│       ├── pubShare_75d12d75.privateKey
│       └── pubShare_75d12d75.publicKey
├── files_external
│   └── rootcerts.crt
├── index.html
└── owncloud.log

18 directories, 12 files
 sujith@sujith-ownCloud  ~/test/owncloud2   hsm-integration-stable10  ls -lth data/files_encryption/OC_DEFAULT_MODULE 
total 8.0K
-rw-rw-r-- 1 sujith sujith 189 Feb 18 15:21 pubShare_75d12d75.privateKey
-rw-rw-r-- 1 sujith sujith 451 Feb 18 15:21 pubShare_75d12d75.publicKey
 sujith@sujith-ownCloud  ~/test/owncloud2   hsm-integration-stable10  ls -lth data/admin/files_encryption/OC_DEFAULT_MODULE/       
total 8.0K
-rw-r--r-- 1 sujith sujith 189 Feb 18 15:21 admin.privateKey
-rw-r--r-- 1 sujith sujith 451 Feb 18 15:21 admin.publicKey
 sujith@sujith-ownCloud  ~/test/owncloud2   hsm-integration-stable10 
  • Manually tried to cat the text file ( welcome.txt ) to see it if is encrypted.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@sharidas sharidas added this to the development milestone Feb 18, 2019
@sharidas sharidas self-assigned this Feb 18, 2019
@sharidas sharidas requested a review from PVince81 February 18, 2019 10:00
Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Integrate HSM changes to encryption.

Signed-off-by: Sujith H <[email protected]>
@sharidas sharidas force-pushed the hsm-integration-stable10 branch from b2c8c44 to 375cb58 Compare February 18, 2019 11:01
@codecov
Copy link

codecov bot commented Feb 18, 2019

Codecov Report

❗ No coverage uploaded for pull request base (stable10@a3abbbc). Click here to learn what that means.
The diff coverage is 87.38%.

Impacted file tree graph

@@             Coverage Diff             @@
##             stable10   #34527   +/-   ##
===========================================
  Coverage            ?   63.89%           
  Complexity          ?    19133           
===========================================
  Files               ?     1268           
  Lines               ?    75519           
  Branches            ?     1293           
===========================================
  Hits                ?    48256           
  Misses              ?    26882           
  Partials            ?      381
Flag Coverage Δ Complexity Δ
#javascript 53.29% <ø> (?) 0 <ø> (?)
#phpunit 65.03% <87.38%> (?) 19133 <23> (?)
Impacted Files Coverage Δ Complexity Δ
apps/encryption/lib/Users/Setup.php 100% <100%> (ø) 6 <0> (?)
apps/encryption/lib/Recovery.php 78.44% <100%> (ø) 41 <0> (?)
apps/encryption/lib/Hooks/UserHooks.php 71.73% <100%> (ø) 36 <0> (?)
apps/encryption/lib/Command/HSMDaemon.php 100% <100%> (ø) 7 <7> (?)
apps/encryption/lib/JWT.php 100% <100%> (ø) 5 <5> (?)
apps/encryption/lib/AppInfo/Application.php 54.14% <50%> (ø) 11 <1> (?)
apps/encryption/lib/Crypto/Crypt.php 81.66% <81.35%> (ø) 67 <0> (?)
apps/encryption/lib/KeyManager.php 76.73% <83.33%> (ø) 83 <0> (?)
apps/encryption/lib/Crypto/CryptHSM.php 92.85% <92.85%> (ø) 10 <10> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3abbbc...375cb58. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 18, 2019

Codecov Report

Merging #34527 into stable10 will increase coverage by 0.04%.
The diff coverage is 87.38%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34527      +/-   ##
==============================================
+ Coverage       63.85%    63.9%   +0.04%     
- Complexity      19109    19133      +24     
==============================================
  Files            1265     1268       +3     
  Lines           75397    75519     +122     
  Branches         1293     1293              
==============================================
+ Hits            48145    48257     +112     
- Misses          26871    26881      +10     
  Partials          381      381
Flag Coverage Δ Complexity Δ
#javascript 53.29% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.03% <87.38%> (+0.04%) 19133 <23> (+24) ⬆️
Impacted Files Coverage Δ Complexity Δ
apps/encryption/lib/Users/Setup.php 100% <100%> (ø) 6 <0> (ø) ⬇️
apps/encryption/lib/Recovery.php 78.44% <100%> (ø) 41 <0> (ø) ⬇️
apps/encryption/lib/Hooks/UserHooks.php 71.73% <100%> (ø) 36 <0> (ø) ⬇️
apps/encryption/lib/Command/HSMDaemon.php 100% <100%> (ø) 7 <7> (?)
apps/encryption/lib/JWT.php 100% <100%> (ø) 5 <5> (?)
apps/encryption/lib/AppInfo/Application.php 54.14% <50%> (-2.33%) 11 <1> (+2)
apps/encryption/lib/Crypto/Crypt.php 81.66% <81.35%> (+0.83%) 67 <0> (ø) ⬇️
apps/encryption/lib/KeyManager.php 76.73% <83.33%> (ø) 83 <0> (ø) ⬇️
apps/encryption/lib/Crypto/CryptHSM.php 92.85% <92.85%> (ø) 10 <10> (?)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3abbbc...375cb58. Read the comment docs.

@sharidas
Copy link
Contributor Author

Original PR owncloud/encryption#90

@sharidas
Copy link
Contributor Author

@PVince81 this is merge ready.

@PVince81 PVince81 merged commit 9ef46c5 into stable10 Feb 18, 2019
@delete-merged-branch delete-merged-branch bot deleted the hsm-integration-stable10 branch February 18, 2019 13:30
@PVince81 PVince81 modified the milestones: development, QA Apr 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants