OriginProtocol / dshop

Origin Dshop - launch your own decentralized store
https://www.originprotocol.com/dshop
MIT License
138 stars 87 forks source link

AWS container compliance - SES integration #1033

Open phyninja opened 2 years ago

phyninja commented 2 years ago

Addresses #1011.

See related PR: #1029

If a shop admin deploys DShop from an Amazon EC2 instance, the app will now refrain from requesting the admin's AWS credentials in the Super Admin network config page. If and when the admin attempts to connect the app to their AWS SES account, the app will try to establish a connection using the EC2 "instance metadata service".

phyninja commented 2 years ago

Front end UI testing

https://user-images.githubusercontent.com/10854442/154044666-08833b21-a900-4495-a5ea-8b6f8577854c.mov

Testing methodology

1) Build a DShop Amazon Machine Image (AMI) using the scripts here 2) Launch an EC2 instance from the AMI

cd /app/dshop/shop git config --global user.name "" git config --global user.email "" git pull git checkout aws-ses-marketplace-compliance

//Manually add a .env file for testing echo "AWS_MARKETPLACE_DEPLOYMENT=true" >> .env

yarn run build:dist cd ../backend && pm2 restart app.js


4) Navigate to the DShop Admin console on a web browser and test that
a) The fields **AWS Access Key** and **AWS Secret Access Key** are hidden
b) The user can connect to AWS SES without inputting credentials on both the Super Admin and Admin interfaces