Skip to content

Commit 6b0ed32

Browse files
authored
Merge pull request #304 from psiinon/js-auth/rel-dirs
Use relative dirs for JS auth plans
2 parents 101f75b + 0833794 commit 6b0ed32

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

af-plans/juiceshop-selenium-auth/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This directory contains [Automation Framework](https://www.zaproxy.org/docs/auto
55
Note that ZAP _can_ authenticate to Juice Shop _without_ using Selenium, and normally this is what we would recommend.
66
However, in this case we are using it to show how to use Selenium to authenticate to your app if there is no alternative.
77

8+
There is a related blog post: https://www.zaproxy.org/blog/2023-02-01-authenticating-using-selenium/
9+
810
## Requirements
911

1012
To run this plan you need to:
@@ -15,8 +17,7 @@ To run this plan you need to:
1517
* Add a user to Juice Shop with the credentials:
1618
* username: [email protected]
1719
* password: test123
18-
* Edit all of the automation plans and shell scripts to replace `/full/path/` to be the local full path of your scripts
19-
* Edit all of the shell scripts to correct the path to your ZAP installation
20+
* Edit all of the shell scripts to correct the path to your ZAP installation and to the plans
2021
* Ensure that the user credentials are available via the environmental variables (these _should_ be set up correctly via the supplied scripts):
2122
* JS_USER: [email protected]
2223
* JS_PWD: test123
@@ -78,8 +79,7 @@ Note that Firefox reports lots of messages to standard output - these are diffic
7879

7980
The following related enhancements are planned:
8081

81-
* Publishing a ZAP blog post explaining how and why these scripts work
82-
* Enhancing the Automation Framework to support relative file names
83-
* Enhancing ZAP to support header based session management
82+
* Add example docker commands
83+
* Update the plan to use header based session management
8484
* More investigations into why there are so many auth tokens and cookies absent in browser requests
8585

af-plans/juiceshop-selenium-auth/juiceshop-auth.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
authentication:
1111
method: "script"
1212
parameters:
13-
script: "/full/path/JuiceShopAuthentication.js"
13+
script: "JuiceShopAuthentication.js"
1414
scriptEngine: "Oracle Nashorn"
1515
verification:
1616
method: "poll"
@@ -22,7 +22,7 @@ env:
2222
sessionManagement:
2323
method: "script"
2424
parameters:
25-
script: "/full/path/JuiceShopSession.js"
25+
script: "JuiceShopSession.js"
2626
scriptEngine: "Oracle Nashorn"
2727
technology:
2828
exclude: []
@@ -47,7 +47,7 @@ jobs:
4747
type: "httpsender"
4848
engine: "Oracle Nashorn"
4949
name: "JuiceShopHttpSender.js"
50-
file: "/full/path/JuiceShopHttpSender.js"
50+
file: "JuiceShopHttpSender.js"
5151
target: ""
5252
- name: "script"
5353
type: "script"
@@ -56,7 +56,7 @@ jobs:
5656
type: "selenium"
5757
engine: Oracle Nashorn"
5858
name: "JuiceShopSelenium.js"
59-
file: "/full/path/JuiceShopSelenium.js"
59+
file: "JuiceShopSelenium.js"
6060
target: ""
6161
- parameters:
6262
user: "test"

af-plans/juiceshop-selenium-auth/juiceshop-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
authentication:
1111
method: "script"
1212
parameters:
13-
script: "/full/path/JuiceShopAuthentication.js"
13+
script: "JuiceShopAuthentication.js"
1414
scriptEngine: "Oracle Nashorn"
1515
verification:
1616
method: "poll"
@@ -22,7 +22,7 @@ env:
2222
sessionManagement:
2323
method: "script"
2424
parameters:
25-
script: "/full/path/JuiceShopSession.js"
25+
script: "JuiceShopSession.js"
2626
scriptEngine: "Oracle Nashorn"
2727
technology:
2828
exclude: []
@@ -47,7 +47,7 @@ jobs:
4747
type: "httpsender"
4848
engine: "Oracle Nashorn"
4949
name: "JuiceShopHttpSender.js"
50-
file: "/full/path/JuiceShopHttpSender.js"
50+
file: "JuiceShopHttpSender.js"
5151
target: ""
5252
- name: "script"
5353
type: "script"
@@ -56,7 +56,7 @@ jobs:
5656
type: "selenium"
5757
engine: Oracle Nashorn"
5858
name: "JuiceShopSelenium.js"
59-
file: "/full/path/JuiceShopSelenium.js"
59+
file: "JuiceShopSelenium.js"
6060
target: ""
6161
- name: "request - check auth works"
6262
type: "requestor"

0 commit comments

Comments
 (0)