Skip to content

Commit 68d1417

Browse files
committed
Added test
1 parent 6876f66 commit 68d1417

File tree

3 files changed

+21
-29
lines changed

3 files changed

+21
-29
lines changed

testplans/spid-cie-oidc/implementations/spid-cie-oidc-django/config/testplan-to-mr/config_testplan.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
"X_url_TA": "http://trust-anchor.org:8000",
1515
"X_url_trust_mark_status_AA": "http://attribute-authority.org/trust_mark_status",
1616
"X_url_introspection": "http://cie-provider.org:8002/oidc/op/introspection",
17-
"X_wrong_code": "wrong_code_verifier_parameter"
17+
"X_wrong_code": "wrong_code_verifier_parameter",
18+
"X_wrong_url" : "http://wrong_url.org"
1819
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
open | http://relying-party.org:8001/oidc/rp/landing |
2+
click | xpath=/html/body/div[2]/div/div/div/div/div/div/div/div/div/div[2]/div/span[2]/a |
3+
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 |
4+
type | id=id_username | user
5+
type | id=id_password | oidcuser
6+
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] |
7+
click | id=agree |
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"tests": [
88
{
99
"test": {
10-
"name": "Does the issued JWT Refresh Token contain correct \"aud\" parameter in the Payload",
11-
"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",
10+
"name": "Does the issued JWT Access Token contain a correct 'aud' parameter",
11+
"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",
1212
"type": "active",
1313
"sessions": [
1414
"s1"
@@ -22,38 +22,22 @@
2222
"action": "intercept",
2323
"from session": "s1",
2424
"then": "forward",
25-
"message type": "Authentication request",
25+
"message type": "Entity Configuration response OP",
2626
"decode operations": [
2727
{
28-
"from": "url",
29-
"decode param": "request",
28+
"from": "body",
29+
"decode param": "[\\s\\S]*",
3030
"type": "jwt",
3131
"edits": [
3232
{
3333
"jwt from": "payload",
34-
"jwt edit": "$.acr_values",
35-
"value": "https://www.spid.gov.it/SpidL1"
36-
},
37-
{
38-
"jwt sign": "X_key_core_RP"
34+
"jwt save": "iss",
35+
"as": "valid_iss"
3936
}
4037
]
4138
}
4239
]
4340
},
44-
{
45-
"action": "intercept",
46-
"from session": "s1",
47-
"then": "forward",
48-
"message type": "Token request",
49-
"message operations": [
50-
{
51-
"from": "body",
52-
"save": "(?<=client_id=)[^&]+",
53-
"as": "auth_client_id"
54-
}
55-
]
56-
},
5741
{
5842
"action": "intercept",
5943
"from session": "s1",
@@ -62,14 +46,14 @@
6246
"decode operations": [
6347
{
6448
"from": "body",
65-
"decode param": "(?<=\"refresh_token\": \")[^\"]+",
49+
"decode param": "(?<=\"access_token\": \")[^\"]+",
6650
"type": "jwt",
6751
"checks": [
6852
{
69-
"use variable": true,
53+
"use variable": "true",
7054
"in": "payload",
71-
"check": "$.aud",
72-
"contains": "auth_client_id"
55+
"check": "$.aud[0]",
56+
"is": "valid_iss"
7357
}
7458
]
7559
}
@@ -80,4 +64,4 @@
8064
}
8165
}
8266
]
83-
}
67+
}

0 commit comments

Comments
 (0)