Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 2.13 KB

DEMO.md

File metadata and controls

34 lines (26 loc) · 2.13 KB

Demo of Expected Use of S3S2

Setup and Background

  1. Set up a user with AWS Access to create a key and S3 bucket.
  2. Create a kms key for S3S2 to use.
  3. Assign permissions to use the key appropriately.
  4. Create an S3 bucket for S3S2 to use.
  5. Run s3s2 config to build the default config file
  6. Run s3s2 share --bucket s3s2-demo --directory ~/Desktop/s3s2/ (Fails because no encryption - neither gpg or s3-kms)
  7. Run s3s2 share --bucket s3s2-demo --directory ~/Desktop/s3s2/ --awskey <kms-key-we-have-permissions-on> --region us-east-1 (Succeed)
  8. Pull file from console to show encryption

Demo Using Shell Scripts

  1. s3s2 genkey --keydir ./test/s3s2/s3s2-keys/ --keyprefix test1 - Generates keys to use. Note these keynames need to match the scripts.
  2. preptest.sh - Cleans up the directories and S3 buckets used.
  3. sanity.sh - Shows where the current files are.
  4. share.sh - Shares the data up to S3 encrypted with the pgp files.
  5. decrypt.sh <filename> - Pulls the files back down from S3 based on the manifest and decrypts.

Demo By Hand

  1. Generate keys to use: s3s2 genkey --keydir ./test/s3s2/s3s2-keys/ --keyprefix test
  2. Set up data to use. For the purpose of this demo, we'll put the data we want to process in test/s3s2/s3s2-up/
  3. Share the directory: aws-vault exec <role>s3s2 share --debug true --bucket <your-bucket> --region <your-region> --directory test/s3s2/s3s2-up/ --org YourOrg --prefix <optional-prefix> --receiver-public-key test/s3s2/s3s2-keys/test.pubkey (Keys and directories per setup)
  4. Check your bucket for the files: aws-vault exec <role> -- aws s3 ls <your-bucket>
  5. Download and decrypt the files: aws-vault exec <role> -- s3s2 decrypt --debug true --bucket <your-bucket> --region <your-region> --destination ./test/s3s2/s3s2-down/ --my-private-key ./test/s3s2/s3s2-keys/test.privkey --my-public-key ./test/s3s2/s3s2-keys/test1.pubkey --file <the manifest.json file from the share step>
  6. Check the local files: ls -al test/s3s2/s3s2-down/

Cleanup

  1. aws-vault exec <role> -- aws s3 rm s3://<your-test-bucket>/ --recursive
  2. Cleanup directories with s3s2-down and s3s2-up.