This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Testing LocalEGA
Dmytro Titov edited this page May 15, 2018
·
19 revisions
Feature: Authentication
As a user I want to be able to authenticate against LocalEGA inbox
Background:
Given I am a user of LocalEGA instances:
| swe1 |
Scenario: A.0 User exists in Central EGA and uses correct private key for authentication for the correct instance
Given I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
When I connect to the LocalEGA inbox via SFTP using private key
Then I'm logged in successfully
Scenario: A.1 User doesn't exist in Central EGA, but tries to authenticate against LocalEGA inbox
Given I want to work with instance "swe1"
And I have correct private key
When I connect to the LocalEGA inbox via SFTP using private key
Then authentication fails
Scenario: A.2 User exists in Central EGA and uses correct private key for authentication, but the wrong instance
Given I have an account at Central EGA
And I want to work with instance "fin1"
And I have correct private key
When I connect to the LocalEGA inbox via SFTP using private key
Then authentication fails
Scenario: A.3 User exists in Central EGA, but uses incorrect private key for authentication
Given I have an account at Central EGA
And I want to work with instance "swe1"
And I have incorrect private key
When I connect to the LocalEGA inbox via SFTP using private key
Then authentication fails
Scenario: A.4 User exists in Central EGA and tries to connect to LocalEGA, but the inbox was not created for him
Given I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I disconnect from the LocalEGA inbox
And I am disconnected from the LocalEGA inbox
And inbox is deleted for my user
When I connect to the LocalEGA inbox via SFTP using private key
Then authentication fails
Feature: Uploading
As a user I want to be able to upload files to the LocalEGA inbox
Scenario: U.0 Upload files to the LocalEGA inbox
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
When I upload encrypted file to the LocalEGA inbox via SFTP
Then the file is uploaded successfully
Feature: Ingestion
As a user I want to be able to ingest files from the LocalEGA inbox
Scenario Outline: I.0 User ingests file encrypted with OpenPGP using a correct key
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox using correct <algo> checksums
When I retrieve ingestion information
Then the ingestion status is "Archived"
And the raw checksum matches
And the encrypted checksum matches
And and the file header matches
Examples:
| algo |
| MD5 |
| SHA256 |
Scenario: I.1 User ingests file encrypted not with OpenPGP
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted not with OpenPGP
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox using correct MD5 checksums
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.2 User ingests file encrypted with OpenPGP using a wrong key
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "fin1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox using correct MD5 checksums
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.3 User ingests file encrypted with OpenPGP, but inbox is not created
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And inbox is deleted for my user
And I ingest file from the LocalEGA inbox using correct MD5 checksums
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.4 User ingests file encrypted with OpenPGP, but file was not found in the inbox
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And file is removed from the inbox
And I ingest file from the LocalEGA inbox using correct MD5 checksums
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.5 User ingests file encrypted with OpenPGP using a correct key, but raw checksum doesn't match with the supplied one
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox using wrong raw checksum
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.6 User ingests file encrypted with OpenPGP using a correct key, but encrypted checksum doesn't match with the supplied one
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox using wrong encrypted checksum
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.7 User ingests file encrypted with OpenPGP using a correct key, but raw checksum isn't provided
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox without providing raw checksum
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.8 User ingests file encrypted with OpenPGP using a correct key, but encrypted checksum isn't provided
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox without providing encrypted checksum
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.9 User ingests file encrypted with OpenPGP using a correct key and providing checksums as companion files
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I upload companion files to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox without providing checksums
When I retrieve ingestion information
Then the ingestion status is "Archived"
And the raw checksum matches
And the encrypted checksum matches
And and the file header matches
Scenario: I.10 User ingests file encrypted with OpenPGP using a correct key and checksums, but the keyserver doesn't respond
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I upload companion files to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I turn off the keyserver
And I ingest file from the LocalEGA inbox without providing checksums
And I turn on the keyserver
When I retrieve ingestion information
Then the ingestion status is "Error"
Scenario: I.13 User ingests file encrypted with OpenPGP using a correct key and checksums, but the vault listener is down
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I upload companion files to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I turn off the vault listener
And I ingest file from the LocalEGA inbox without providing checksums
And I turn on the vault listener
When I retrieve ingestion information
Then the ingestion status is "NoEntry"
Scenario: I.15 User ingests file encrypted with OpenPGP using a correct key and checksums, but the database doesn't respond
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I upload companion files to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I turn off the database
And I ingest file from the LocalEGA inbox without providing checksums
And I turn on the database
When I retrieve ingestion information
Then the ingestion status is "NoEntry"
- (I.10) File found, its checksum is correct but the GPG decryption fails.
To be expanded, e.g.: keyserver communication fails (server is down, SSL encryption channel is not set up, etc.); GPG key not found, GPG key not unlocked, etc.
- (I.11) File found, ..., but re-encryption fails.
To be expanded, e.g.: the key is not found.
- (I.12) Re-encryption failure due to a shortage in the staging area.
To be expanded, e.g.: disk is full, mount failed, etc.
- (I.13) Moving to staging area failed.
To be expanded, e.g.: vault listener is down, vault disk is full, staging area mount failed, etc.
- (I.14) Verification of the copied file in the vault failed.
To be expanded, e.g.: the file was not fully copied, so its checksum failed (calculated at the re-encryption step)
- (I.15) Database connection failed, so information about the file is not available.
- (O.0) User retrieves the file and decrypts it successfully.
- (O.1) User retrieves the file, but can't decrypt it:
- The file appeared to be encrypted with a wrong key.
- The file appeared to be encrypted with another algorithm.
- (O.2) User tries to retrieve the file, but it's absent in the vault.
- (O.3) User retrieves the file and decrypts it, but checksums don't match.
- (O.4) Database connection failed, so information about the file is not available.
Feature: Robustness
As a user I want the system to be robust and fault-tolerant
Scenario: R.0 User ingests file encrypted with OpenPGP using a correct key and providing checksums as companion files after full system restart
Given I am a user of LocalEGA instances:
| swe1 |
And I have an account at Central EGA
And I want to work with instance "swe1"
And I have correct private key
And the system is restarted
And I connect to the LocalEGA inbox via SFTP using private key
And I have a file encrypted with OpenPGP using a "swe1" key
And I upload encrypted file to the LocalEGA inbox via SFTP
And I upload companion files to the LocalEGA inbox via SFTP
And I have CEGA MQ username and password
And I ingest file from the LocalEGA inbox without providing checksums
When I retrieve ingestion information
Then the ingestion status is "Archived"
And the raw checksum matches
And the encrypted checksum matches
And and the file header matches
#
# Scenario: R.2 User ingests a big file encrypted with OpenPGP using a correct key and providing checksums as companion files
# Given I am a user of LocalEGA instances:
# | swe1 |
# And I have an account at Central EGA
# And I want to work with instance "swe1"
# And I have correct private key
# And I connect to the LocalEGA inbox via SFTP using private key
# And I have a big file encrypted with OpenPGP using a "swe1" key
# And I upload encrypted file to the LocalEGA inbox via SFTP
# And I upload companion files to the LocalEGA inbox via SFTP
# And I have CEGA MQ username and password
# And I ingest file from the LocalEGA inbox without providing checksums
# When I retrieve ingestion information
# Then the ingestion status is "Archived"
# And the raw checksum matches
# And the encrypted checksum matches
# And and the file header matches
- (R.1) Some components are restarted (especially the database, but also the ingestion workers or the vault).
- (R.2) Stress tests:
- (R.2a) ingesting a big file.
- (R.2b) ingesting many files.