Skip to content

Commit

Permalink
Move "Troubleshooting" section into separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
bkimminich committed Feb 26, 2017
1 parent 327e381 commit 842a63e
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 47 deletions.
51 changes: 4 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,53 +173,10 @@ distributions accordingly:
## Troubleshooting [![Gitter](http://img.shields.io/badge/gitter-join%20chat-1dce73.svg)](https://gitter.im/bkimminich/juice-shop)

> If you need help with the application setup please check the
> Troubleshooting section below or post your specific problem or
> question in the
> [official Gitter Chat](https://gitter.im/bkimminich/juice-shop).
- After changing to a different Node.js version it is a good idea to
delete `npm_modules` and re-install all dependencies from scratch with
`npm install`
- If you are experiencing
[Error 128](https://github.com/bower/bower/issues/50) from some GitHub
repos during `bower install` execution, run `git config --global
url."https://".insteadOf git://` and try `npm install` again
- If using Docker Toolbox on Windows make sure that you also enable port
forwarding from Host `127.0.0.1:3000` to `0.0.0.0:3000` for TCP for
the `default` VM in VirtualBox
- If `npm install` fails after an update of your local copy during
`bower install` complaining about version issues, delete
`/app/bower_components` and try again to remove outdated versions that
cause conflicts
- If during `npm install` the `sqlite3` no binaries can be downloaded
for your system, the setup falls back to building from source with
`node-gyp`. Check the
[`node-gyp` installation instructions](https://github.com/nodejs/node-gyp#installation)
for additional tools you might need to install (e.g. Python 2.7, GCC,
Visual C++ Build Tools etc.)
- If `npm install` fails on Ubuntu (e.g. while installing PhantomJS) you
might have to install a recent version of Node.js and try again.
- Using the Vagrant script (on Windows) might not work while your virus
scanner is running. This problem was experienced at least with
F-Secure Internet Security.
- You may find it easier to find vulnerabilities using a pen test tool.
I strongly recommend
[Zed Attack Proxy](https://code.google.com/p/zaproxy/) which is open
source and very powerful, yet beginner friendly.
- If you are missing the 'Login with Google' button and want to test all the challenges out you
will want to add your deployed Heroku URL to /app/js/controllers/LoginController.js.
Simply update the variable: authorizedRedirectURIs on line 43 to include your URL
object, use your URL for both the property name and value. You can just copy line 44
and then paste/modify to include your URL. Once you have this done you will also need
to setup oauth on google's end here: https://console.developers.google.com/apis/library,
clicking 'Credentials' and clicking 'Create credentials.' Once you have setup your credentials,
you will want to update the clientId variable in /app/js/controllers/LoginController.js on line 42 to
use your new oauth client id from Google. and re-deploy it to Heroku, once completed
you will have the option to login with Google on the login page. One thing to note, make sure that you setup
the redirect_uri to match your app's URL, if you for some reason have to modify the redirect_uri this gets
cached on Google's end and takes longer than you'll want to wait to reset.

If you need help with the application setup please check the
[TROUBLESHOOTING.md](TROUBLESHOOTING.md) or post your specific problem
or question in the
[official Gitter Chat](https://gitter.im/bkimminich/juice-shop).

## Contributing [![GitHub contributors](https://img.shields.io/github/contributors/bkimminich/juice-shop.svg)](https://github.com/bkimminich/juice-shop/graphs/contributors) [![HuBoard](http://img.shields.io/badge/Hu-Board-blue.svg)](https://huboard.com/bkimminich/juice-shop) [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

Expand Down
65 changes: 65 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Troubleshooting [![Gitter](http://img.shields.io/badge/gitter-join%20chat-1dce73.svg)](https://gitter.im/bkimminich/juice-shop)

## Node.js / NPM / Bower

- After changing to a different Node.js version it is a good idea to
delete `npm_modules` and re-install all dependencies from scratch with
`npm install`
- If you are experiencing
[Error 128](https://github.com/bower/bower/issues/50) from some GitHub
repos during `bower install` execution, run `git config --global
url."https://".insteadOf git://` and try `npm install` again
- If `npm install` fails after an update of your local copy during
`bower install` complaining about version issues, delete
`/app/bower_components` and try again to remove outdated versions that
cause conflicts
- If during `npm install` the `sqlite3` no binaries can be downloaded
for your system, the setup falls back to building from source with
`node-gyp`. Check the
[`node-gyp` installation instructions](https://github.com/nodejs/node-gyp#installation)
for additional tools you might need to install (e.g. Python 2.7, GCC,
Visual C++ Build Tools etc.)
- If `npm install` fails on Ubuntu (e.g. while installing PhantomJS) you
might have to install a recent version of Node.js and try again.

## Docker

- If using Docker Toolbox on Windows make sure that you also enable port
forwarding from Host `127.0.0.1:3000` to `0.0.0.0:3000` for TCP for
the `default` VM in VirtualBox.

## Vagrant

- Using the Vagrant script (on Windows) might not work while your virus
scanner is running. This problem was experienced at least with
F-Secure Internet Security.

## OAuth

- If you are missing the _Login with Google_ button, you are running
OWASP Juice Shop under an unrecognized URL. **You can still solve the
OAuth related challenge!** If you want to manually make the OAuth
integration work to get the full user experience, follow these steps:
1. Add your server URL to variable `authorizedRedirectURIs` in
`/app/js/controllers/LoginController.js` using your URL for both
the property name and value.
2. Setup OAuth in Google
https://console.developers.google.com/apis/library by clicking
_Credentials_ and afterwards _Create credentials_.
3. Update the `clientId` variable in
`/app/js/controllers/LoginController.js` to use your new OAuth
client id from Google.
4. Re-deploy your server. You will now have the option to login with
Google on the login page.

> One thing to note: Make sure that you setup the `redirect_uri` to
> match your app's URL. If you for some reason have to modify the
> `redirect_uri`, this gets cached on Google's end and takes longer than
> you'll want to wait to reset.
## Miscellaneous

- You may find it easier to find vulnerabilities using a pen test tool.
I strongly recommend
[Zed Attack Proxy](https://code.google.com/p/zaproxy/) which is open
source and very powerful, yet beginner friendly.

0 comments on commit 842a63e

Please sign in to comment.