Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
marche271 committed Dec 19, 2023
1 parent 6876f66 commit 68d1417
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"X_url_TA": "http://trust-anchor.org:8000",
"X_url_trust_mark_status_AA": "http://attribute-authority.org/trust_mark_status",
"X_url_introspection": "http://cie-provider.org:8002/oidc/op/introspection",
"X_wrong_code": "wrong_code_verifier_parameter"
"X_wrong_code": "wrong_code_verifier_parameter",
"X_wrong_url" : "http://wrong_url.org"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open | http://relying-party.org:8001/oidc/rp/landing |
click | xpath=/html/body/div[2]/div/div/div/div/div/div/div/div/div/div[2]/div/span[2]/a |
click | xpath=/html/body/div[2]/div/div/div/div/div/div/div/div/div/div[2]/div/span[2]/div/ul/li[2]/a |
type | id=id_username | user
type | id=id_password | oidcuser
click | xpath=/html/body/div[2]/div/div/div/div/div/div/div/div/div/div[2]/div[2]/div[1]/form/fieldset/div/div/div/div[3]/button/span[2] |
click | id=agree |
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"tests": [
{
"test": {
"name": "Does the issued JWT Refresh Token contain correct \"aud\" parameter in the Payload",
"description": "The Refresh Token present in the Token Response is analyzed and the value of the \"aud\" parameter in the Payload set to the identifier of the resource server",
"name": "Does the issued JWT Access Token contain a correct 'aud' parameter",
"description": "The Access Token present in the Token Response is analyzed and the value of the 'aud' parameter in the Payload is the identifier of the resource server",
"type": "active",
"sessions": [
"s1"
Expand All @@ -22,38 +22,22 @@
"action": "intercept",
"from session": "s1",
"then": "forward",
"message type": "Authentication request",
"message type": "Entity Configuration response OP",
"decode operations": [
{
"from": "url",
"decode param": "request",
"from": "body",
"decode param": "[\\s\\S]*",
"type": "jwt",
"edits": [
{
"jwt from": "payload",
"jwt edit": "$.acr_values",
"value": "https://www.spid.gov.it/SpidL1"
},
{
"jwt sign": "X_key_core_RP"
"jwt save": "iss",
"as": "valid_iss"
}
]
}
]
},
{
"action": "intercept",
"from session": "s1",
"then": "forward",
"message type": "Token request",
"message operations": [
{
"from": "body",
"save": "(?<=client_id=)[^&]+",
"as": "auth_client_id"
}
]
},
{
"action": "intercept",
"from session": "s1",
Expand All @@ -62,14 +46,14 @@
"decode operations": [
{
"from": "body",
"decode param": "(?<=\"refresh_token\": \")[^\"]+",
"decode param": "(?<=\"access_token\": \")[^\"]+",
"type": "jwt",
"checks": [
{
"use variable": true,
"use variable": "true",
"in": "payload",
"check": "$.aud",
"contains": "auth_client_id"
"check": "$.aud[0]",
"is": "valid_iss"
}
]
}
Expand All @@ -80,4 +64,4 @@
}
}
]
}
}

0 comments on commit 68d1417

Please sign in to comment.