Skip to content

Commit

Permalink
Merge pull request zaproxy#7850 from psiinon/itests/auth-verif
Browse files Browse the repository at this point in the history
Integration tests: check verif autodetect
  • Loading branch information
thc202 authored May 4, 2023
2 parents a7bc3b9 + 32b6942 commit 37ac081
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ env:
loginPageWait: 5
browserId: "firefox-headless"
verification:
method: "poll"
loggedInRegex: "\\Q\"result\":\"OK\\E"
loggedOutRegex: "\\Q\"result\":\"FAIL\\E"
pollFrequency: 60
pollUnits: "requests"
pollUrl: "http://localhost:9091/auth/simple-json-bearer-cookie/user"
pollPostData: ""
# Checking 2.13+ compatibility
method: "autodetect"
sessionManagement:
method: "autodetect"
parameters: {}
Expand Down Expand Up @@ -50,6 +45,9 @@ jobs:
- id: 10112
name: "Session Management Response Identified"
threshold: "medium"
- id: 10113
name: "Verification Request Identified"
threshold: "medium"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters:
Expand Down Expand Up @@ -87,6 +85,11 @@ jobs:
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.configure.verification"
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.detect.auth.json"
operator: ">="
Expand Down
15 changes: 9 additions & 6 deletions docker/integration_tests/configs/plans/auth-json-bearer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ env:
loginPageWait: 5
browserId: "firefox-headless"
verification:
# Checking 2.12 compatibility
method: "poll"
loggedInRegex: "\\Q\"result\":\"OK\\E"
loggedOutRegex: "\\Q\"result\":\"FAIL\\E"
pollFrequency: 60
pollUnits: "requests"
pollUrl: "http://localhost:9091/auth/simple-json-bearer/user"
pollPostData: ""
sessionManagement:
method: "autodetect"
parameters: {}
Expand Down Expand Up @@ -50,6 +45,9 @@ jobs:
- id: 10112
name: "Session Management Response Identified"
threshold: "medium"
- id: 10113
name: "Verification Request Identified"
threshold: "medium"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters:
Expand Down Expand Up @@ -87,6 +85,11 @@ jobs:
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.configure.verification"
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.detect.auth.json"
operator: ">="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ env:
loginPageWait: 5
browserId: "firefox-headless"
verification:
# Checking 2.12 compatibility
method: "poll"
loggedInRegex: "\\Q\"result\":\"OK\\E"
loggedOutRegex: "\\Q\"result\":\"FAIL\\E"
pollFrequency: 60
pollUnits: "requests"
pollUrl: "http://localhost:9091/auth/non-std-json-bearer/user"
pollPostData: ""
sessionManagement:
method: "autodetect"
parameters: {}
Expand Down Expand Up @@ -50,6 +45,9 @@ jobs:
- id: 10112
name: "Session Management Response Identified"
threshold: "medium"
- id: 10113
name: "Verification Request Identified"
threshold: "medium"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters:
Expand All @@ -76,6 +74,11 @@ jobs:
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.configure.verification"
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.sessiontoken.nonstd"
site: "http://localhost:9091"
Expand Down
17 changes: 10 additions & 7 deletions docker/integration_tests/configs/plans/auth-simple-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ env:
loginPageWait: 5
browserId: "firefox-headless"
verification:
method: "poll"
loggedInRegex: "\\Q\"result\":\"OK\\E"
loggedOutRegex: "\\Q\"result\":\"FAIL\\E"
pollFrequency: 60
pollUnits: "requests"
pollUrl: "http://localhost:9091/auth/simple-json/user"
pollPostData: ""
# Checking 2.13+ compatibility
method: "autodetect"
sessionManagement:
method: "autodetect"
parameters: {}
Expand Down Expand Up @@ -50,6 +45,9 @@ jobs:
- id: 10112
name: "Session Management Response Identified"
threshold: "medium"
- id: 10113
name: "Verification Request Identified"
threshold: "medium"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters:
Expand Down Expand Up @@ -87,6 +85,11 @@ jobs:
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.configure.verification"
operator: ">="
value: 1
onFail: "error"
- type: "stats"
statistic: "stats.auth.detect.auth.json"
operator: ">="
Expand Down

0 comments on commit 37ac081

Please sign in to comment.