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 @@ -2729,3 +2729,17 @@ matrix:
ENCRYPTION_TYPE: user-keys
DB_TYPE: mysql
DB_HOST: mysql

## encryption WebUI acceptance tests master-keys encryption
- PHP_VERSION: 7.1
OC_VERSION: daily-master-qa
NEED_CORE: true
NEED_INSTALL_APP: true
NEED_SERVER: true
NEED_SELENIUM: true
NEED_EMAIL: true
BEHAT_SUITE: webUIMasterKeyType
TEST_SUITE: web-acceptance
ENCRYPTION_TYPE: masterkey
DB_TYPE: mysql
DB_HOST: mysql
13 changes: 13 additions & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ default:
- FeatureContext: *common_feature_context_params
- OccContext:

webUIMasterKeyType:
paths:
- '%paths.base%/../features/webUIMasterKeyType'
contexts:
- EncryptionContext:
- WebUIAdminEncryptionSettingsContext:
- WebUIPersonalEncryptionSettingsContext:
- WebUIGeneralContext:
- WebUILoginContext:
- WebUIFilesContext:
- FeatureContext: *common_feature_context_params
- OccContext:

extensions:
jarnaiz\JUnitFormatter\JUnitFormatterExtension:
filename: report.xml
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%"