Skip to content

Commit

Permalink
updated readme to remove python3. Updated gitignore to ignore /tmp. C…
Browse files Browse the repository at this point in the history
…ommented out glue portion of extract_creds.py. added python to start.sh
  • Loading branch information
SpenGietz committed Aug 2, 2018
1 parent 91c1904 commit 86127b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ keys/cloudgoat_key*
credentials.txt
keys/pgp_cloudgoat
allow_cidr.txt
tmp/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Rhino Security Labs' "Vulnerable by Design" AWS infrastructure setup tool

## Requirements
- Python2 or Python3
- Python2
- Terraform in your $PATH (https://www.terraform.io/downloads.html)
- gpg (`apt-get install gpg`)
- OpenSSH (For SSH key generation)
Expand All @@ -19,4 +19,4 @@ Now the credentials to get you started will be stored in ./credentials.txt and i
1. `./kill.sh`

## Note about AWS Glue, why it's disabled, and how to re-enable it
- The Glue development endpoint is disabled by default due to it costing far more than the whole rest of CloudGoat to run. If you would like to enable the Glue development endpoint (estimated at $1 per hour), uncomment the final three lines of "start.sh", uncomment the final eight lines of "kill.sh", and uncomment the file located at "./terraform/glue.tf".
- The Glue development endpoint is disabled by default due to it costing far more than the whole rest of CloudGoat to run. If you would like to enable the Glue development endpoint (estimated at $1 per hour), uncomment the final three lines of "start.sh", uncomment the final eight lines of "kill.sh", uncomment the final two lines of "extract_creds.py", and uncomment the file located at "./terraform/glue.tf".
5 changes: 3 additions & 2 deletions extract_creds.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
credfile.write("Joe's Access Key: " + data['modules'][0]['resources']['aws_iam_access_key.joe_key']['primary']['id'] + "\n")
credfile.write("Joe's Secret Key: " + data['modules'][0]['resources']['aws_iam_access_key.joe_key']['primary']['attributes']['secret'] + "\n" )

with open('./tmp/glue_role_arn.txt', 'w+') as glue_file:
glue_file.write(data['modules'][0]['resources']['aws_iam_role.glue_dev_endpoint']['primary']['attributes']['arn'])
# Uncomment the follow two lines if you are enabling the Glue development endpoint
# with open('./tmp/glue_role_arn.txt', 'w+') as glue_file:
# glue_file.write(data['modules'][0]['resources']['aws_iam_role.glue_dev_endpoint']['primary']['attributes']['arn'])
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ terraform init
terraform plan -var cloudgoat_private_bucket_name=$cloudgoat_private_bucket_name -var ec2_web_app_password=$ec2_web_app_password -var cloudgoat_public_bucket_name=$cloudgoat_public_bucket_name -var ec2_public_key="`cat ../keys/cloudgoat_key.pub`" -out plan.tfout
terraform apply -auto-approve plan.tfout

cd .. && ./extract_creds.py
cd .. && python ./extract_creds.py

## Uncomment the follow three lines to enable the Glue development endpoint (make sure to uncomment the specified lines in "kill.sh"
#glue_dev_endpoint_name=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1)
Expand Down

0 comments on commit 86127b4

Please sign in to comment.