Get Started
To get started with the code on this repo, you need to either clone or download this repo into your machine just as shown below
$ git clone https://github.com/Kiinitix/Colossus
$ cd Colossus
Dependencies
Before you begin playing with the source code you might need to install deps just as shown below
$ pip3 install -r requirement.txt
Setting up AWS S3
For setting up AWS S3 for uploading and featching files from the bucket you first need to setup your AWS account and create a bucket. To do so, you can follow the following documentation of AWS S3.
You probably want to setup IAM users and give the access either though a bucket policy or on the user level. With bucket policies you can easily define what paths users are able to edit and access. When you create an IAM user you also have the option of creating one for Programmatic(CLI) access only which will give you a set of credentials for that user only. Just use aws configure and set the access and token key.
You also probably want to make sure you are using an IAM user yourself as it's generally recommended for security.
To do so, you can go here AWS Access Key and under the Access keys (access key ID and secret access key) section click on 'Create New Access Key'. And don't forget to note down the AWS Secret Access Key because it is kinda one time thing and if you lose or forget your secret key, you cannot retrieve it. Instead, you have to create a new access key and make the old key inactive.
After noting down the credentials, open the windows cmd and type
$ aws configure
Enter the AWS Access Key ID and AWS Secret Access Key. Now you are good to go!
Setting up Mailtrap account
The decryption phase of this process involves the use of your Mailtrap account. You need to sign up for Mailtrap account. After signing up you just need to keep the Mailtrap username and Mailtrap password handy to use their API.
Now, naviagate to Colossus/generate_config.py and edit the required parameters. You can find the smtp login details here, under the SMPT settings option. After editing, run this python script, it will generate a configurations.ini in the same directory which will be used to easily configure the software for you.
$ python generate_config.py
Running the app
In order to run the app on your device run this command
$ python main.py -h
Options
Options | Value |
---|---|
-t | select th etype of operation that you want to perform (upload/download/decrypt) |
-b | Bucket name |
-o | Object name |
-i | Image name/location |