Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1581,3 +1581,17 @@ matrix:
CONFIGURE_ENCRYPTION: true
ENCRYPTION_TYPE: masterkey
INSTALL_TESTING_APP: true

## encryption WebUI acceptance tests master-keys encryption
- PHP_VERSION: 7.1
TEST_SUITE: webui
BEHAT_SUITE: webUIMasterKeyType
DB_TYPE: mariadb
USE_SERVER: true
SERVER_PROTOCOL: https
INSTALL_SERVER: true
CHOWN_SERVER: true
OWNCLOUD_LOG: true
CONFIGURE_ENCRYPTION: true
ENCRYPTION_TYPE: masterkey
INSTALL_TESTING_APP: true
14 changes: 14 additions & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,20 @@ default:
- WebUILoginContext:
- WebUIPersonalGeneralSettingsContext:

# This suite is part of the encryption app in later core versions
webUIMasterKeyType:
paths:
- '%paths.base%/../features/webUIMasterKeyType'
contexts:
- EncryptionContext:
- WebUIAdminEncryptionSettingsContext:
- WebUIPersonalEncryptionSettingsContext:
- WebUIGeneralContext:
- WebUILoginContext:
- WebUIFilesContext:
- FeatureContext: *common_feature_context_params
- OccContext:

webUIMoveFilesFolders:
paths:
- '%paths.base%/../features/webUIMoveFilesFolders'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@webUI @skipOnEncryptionType:user-keys @skipOnStorage:ceph
Feature: encrypt files using master keys
As an admin
I want to be able to encrypt user files using master keys
So that I can use a common key to encrypt files of all user

Scenario: user cannot access their file after recreating master key with re-login
Given user "user0" has been created with default attributes
And the administrator has set the encryption type to "masterkey"
And user "user0" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt"
And user "user0" has logged in using the webUI
When the administrator successfully recreates the encryption masterkey using the occ command
Then the command output should contain the text 'Note: All users are required to relogin.'
When the user opens file "lorem.txt" expecting to fail using the webUI
Then the user should be redirected to the general exception webUI page with the title "%productname%"
And the title of the exception on general exception webUI page should be "Forbidden"
And a message should be displayed on the general exception webUI page containing "Encryption not ready"

Scenario: user can access their file after recreating master key with re-login
Given user "user0" has been created with default attributes
And the administrator has set the encryption type to "masterkey"
And user "user0" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt"
And user "user0" has logged in using the webUI
When the administrator successfully recreates the encryption masterkey using the occ command
And the user re-logs in as "user0" using the webUI
And the user opens file "lorem.txt" using the webUI
Then no dialog should be displayed on the webUI
And the user should be redirected to a webUI page with the title "Files - %productname%"