Skip to content

Create a Security Shepherd Dev Environment

Paul McCann edited this page Nov 30, 2022 · 7 revisions

Creating a Security Shepherd Dev Environment

There are a number of ways you can setup a Shepherd Dev Environment;

  1. Using Eclipse (Recommended)
  2. Build / Deploy with Maven
  3. Build / Deplay with docker-compose

This guide will show you how to create an Eclipse IDE Dev environment. The prerequisites are;

  1. Eclipse for Java EE Developers
  2. Java JDK 8
  3. Tomcat 8.5 (Zip Recommended)
  4. git
  5. A MariaDB 10.6 instance

Setting Up

  1. Use git to pull down the dev branch
  2. Open Eclipse
  3. Import the Security Shepherd source code folder as a project
  4. Right Click the Security Shepherd Project and choose Maven -> Refresh Project
  5. Open the Servers tab in Eclipse
  6. Right click the pane and select New -> Server
  7. Create a new Tomcat 8.5 Server using the zip download from Tomcat
  8. Once created, right click the server and go to Add and Remove
  9. Add the Security Shepherd Application
  10. Right click the server and Start it
  11. Go to http://127.0.0.1:8080/owaspSecurityShepherd (Or your server setting)
  12. You will see the Setup Wizard for Security Shepherd
  13. Add your MariaDB details to this (Ensure the user will have access from your application server's domain name / ip)
  14. Click Submit
  15. Your dev environment is done. As you update code in eclipse it will be automatically deployed to tomcat instantly.

Using docker as a database (depends on #596)

  1. Edit .env file
  • DB_SERVER_IP=0.0.0.0
  • DB_BIND_ADDRESS=0.0.0.0
  1. Edit SecurityShepherd/src/test/java/testUtils/TestProperties.java
  • createMysqlResource("<IP_of_Docker_Server>", 3306, "core", "root", "CowSaysMoo");
  • createMongoResource("<IP_of_Docker_Server>", 27017, "shepherdGames", 10000, 0, 30000);