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 Jan 24, 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: 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
When I ingest file from the LocalEGA inbox using correct encrypted checksum
Then the file is ingested successfully
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
When I ingest file from the LocalEGA inbox using correct encrypted checksum
Then ingestion failed
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
When I ingest file from the LocalEGA inbox using correct encrypted checksum
Then ingestion failed
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
When I ingest file from the LocalEGA inbox using correct encrypted checksum
Then ingestion failed
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
When I ingest file from the LocalEGA inbox using correct encrypted checksum
Then ingestion failed
Scenario: I.5 User ingests file encrypted with OpenPGP using a correct key, but its 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
When I ingest file from the LocalEGA inbox using wrong encrypted checksum
Then ingestion failed
- (I.7) File found but its checksum doesn't match with the companion file.
- (I.8) File found, no checksum supplied and no companion file.
- (I.9) 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.10) File found, its checksum is valid, the GPG decryption succeed but the checksum of the decrypted doesn't match with the supplied one.
- (I.11) File found, ..., but the checksum of the decrypted doesn't match with the companion file.
- (I.12) File found, ..., but re-encryption fails.
To be expanded, e.g.: the key is not found.
- (I.13) Re-encryption failure due to a shortage in the staging area.
To be expanded, e.g.: disk is full, mount failed, etc.
- (I.14) Moving to staging area failed.
To be expanded, e.g.: vault listener is down, vault disk is full, staging area mount failed, etc.
- (I.15) 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.16) Database connection failed, so information about the file is not available.
TODO
- (R.1) Everything works after a system reboot (manually or power outage)
- (R.2) Some components are restarted (especially the database, but also the ingestion workers or the vault)
- (R.3) Stress tests:
- (R.3a) ingesting a big file
- (R.3b) ingesting many files