Skip to content

Commit 4f35af3

Browse files
authored
Merge pull request #20 from AgID/test
Test
2 parents 432048a + 4d159df commit 4f35af3

27 files changed

+1183
-34
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sequenceDiagram
2+
participant User
3+
participant RP
4+
participant OP
5+
User->>RP: OP selection
6+
RP-->>+User:
7+
User-->>-OP: rich authentication request (+ required AA)
8+
OP->>User: show login form
9+
User->>OP: insert credentials
10+
OP->>User: show AA list
11+
User->>OP: select at least one AA
12+
OP->>User: ask consent to grant SP to query AA
13+
User->>OP: give consent
14+
OP-->>+User:
15+
User-->>-RP: authentication response
16+
RP->>OP: token request
17+
OP->>RP: token response (+ grant tokens)
18+
RP->>OP: userinfo request
19+
OP->>RP: userinfo response
20+
RP->>OP: introspection request for grant token
21+
OP->>RP: introspection response (false)
22+

src/client/img/testcase/test-case-oidc-aa-1.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sequenceDiagram
2+
participant User
3+
participant RP
4+
participant OP
5+
User->>RP: OP selection
6+
RP-->>+User:
7+
User-->>-OP: rich authentication request (+ required AA)
8+
OP->>User: show login form
9+
User->>OP: insert credentials
10+
OP->>User: show AA list
11+
User->>OP: select at least one AA
12+
OP->>User: ask consent to grant SP to query AA
13+
User->>OP: give consent
14+
OP-->>+User:
15+
User-->>-RP: authentication response
16+
RP->>OP: token request
17+
OP->>RP: token response (+ grant tokens)
18+
RP->>OP: userinfo request
19+
OP->>RP: userinfo response
20+
RP->>OP: wrong introspection request for grant token
21+
OP->>RP: introspection error response
22+

src/client/img/testcase/test-case-oidc-aa-error.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
sequenceDiagram
2+
participant User
3+
participant RP
4+
participant OP
5+
User->>RP: OP selection
6+
RP-->>+User:
7+
User-->>-OP: authentication request
8+
OP-->>User:
9+
User-->>OP: authentication challenge
10+
OP-->>+User:
11+
User-->>-RP: authentication response
12+
RP->>OP: token request
13+
OP->>RP: token response
14+
RP->>OP: refresh token request
15+
OP->>RP: refresh token response
16+
RP->>OP: userinfo request
17+
OP->>RP: userinfo error response

src/client/img/testcase/test-case-oidc-error-invalid-userinfo-response.svg

Lines changed: 1 addition & 0 deletions
Loading

src/client/src/views/OIDCCheck/view.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ function view(me) {
3030
<h4>Description</h4>
3131
<p className="test-description mb-5">{me.state.selected.value.description}</p>
3232
<h4>Sequence Diagram</h4>
33-
<img className="testcase-diagram mb-5" src={"../img/testcase/" + me.state.selected.id + ".svg"} />
33+
<img className="testcase-diagram mb-5" src={"../img/testcase/" + (me.state.selected.value.image? me.state.selected.value.image : me.state.selected.id) + ".svg"} />
34+
3435

3536
<h4>Test List</h4>
3637
{me.state.selected &&

src/config_sample/test.json

Lines changed: 128 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@
4747
"userinfo-response": []
4848
}
4949
},
50+
"test-case-oidc-error-invalid-userinfo-response": {
51+
"name": "Test Case OIDC Core Userinfo Error Response - 405 Method Not Allowed",
52+
"description": "Make the userinfo error response for 405 Method Not Allowed",
53+
"ref": "SPID-QAD-OIDC-RP",
54+
"hook": {
55+
"authentication-request": ["2.0.0", "2.0.1"],
56+
"authentication-response": ["2.2.0"],
57+
"token-request": ["3.0.0"],
58+
"token-response": ["3.1.0"],
59+
"userinfo-request": ["4.0.0"],
60+
"userinfo-response": ["4.2.1"]
61+
}
62+
},
5063
"test-case-oidc-aa-0": {
5164
"name": "Test Case Attribute Authority Grant Token Response",
5265
"description": "Make the token response containing the grant token",
@@ -57,9 +70,122 @@
5770
"token-request": ["3.0.0"],
5871
"token-response": ["3.1.1"],
5972
"userinfo-request": ["4.0.0"],
60-
"userinfo-response": ["4.1.0"]
73+
"userinfo-response": ["4.1.0"],
74+
"granttoken-introspection-request": [],
75+
"granttoken-introspection-response": ["5.1.0"]
76+
}
77+
},
78+
"test-case-oidc-aa-1": {
79+
"name": "Test Case Attribute Authority expired Grant Token Response (active=false)",
80+
"description": "Make the token response containing an expired grant token and reply to grant token introspection with active=false",
81+
"ref": "SPID-QAD-OIDC-RP, SPID-QAD-OIDC-OP-AA",
82+
"hook": {
83+
"authentication-request": ["2.0.0", "2.0.1"],
84+
"authentication-response": ["2.2.0"],
85+
"token-request": ["3.0.0"],
86+
"token-response": ["3.1.2"],
87+
"userinfo-request": ["4.0.0"],
88+
"userinfo-response": ["4.1.0"],
89+
"granttoken-introspection-request": [],
90+
"granttoken-introspection-response": ["5.1.1"]
91+
}
92+
},
93+
"test-case-oidc-aa-2": {
94+
"name": "Test Case Attribute Authority Grant Token Correct Introspection Error Response",
95+
"image": "test-case-oidc-aa-error",
96+
"description": "Make the introspection error response for invalid_request",
97+
"ref": "SPID-QAD-OIDC-RP, SPID-QAD-OIDC-OP-AA",
98+
"hook": {
99+
"authentication-request": ["2.0.0", "2.0.1"],
100+
"authentication-response": ["2.2.0"],
101+
"token-request": ["3.0.0"],
102+
"token-response": ["3.1.1"],
103+
"userinfo-request": ["4.0.0"],
104+
"userinfo-response": ["4.1.0"],
105+
"granttoken-introspection-request": [],
106+
"granttoken-introspection-response": ["5.2.0"]
107+
}
108+
},
109+
"test-case-oidc-aa-3": {
110+
"name": "Test Case Attribute Authority Grant Token Wrong Introspection Error Response - Content-Type",
111+
"image": "test-case-oidc-aa-error",
112+
"description": "Make a wrong introspection error response - Content-Type is not 'application/json'",
113+
"ref": "SPID-QAD-OIDC-RP, SPID-QAD-OIDC-OP-AA",
114+
"hook": {
115+
"authentication-request": ["2.0.0", "2.0.1"],
116+
"authentication-response": ["2.2.0"],
117+
"token-request": ["3.0.0"],
118+
"token-response": ["3.1.1"],
119+
"userinfo-request": ["4.0.0"],
120+
"userinfo-response": ["4.1.0"],
121+
"granttoken-introspection-request": [],
122+
"granttoken-introspection-response": ["5.2.1"]
123+
}
124+
},
125+
"test-case-oidc-aa-4": {
126+
"name": "Test Case Attribute Authority Grant Token Wrong Introspection Error Response - Status Code",
127+
"image": "test-case-oidc-aa-error",
128+
"description": "Make a wrong introspection error response - HTTP Status Code is not one of [400, 401, 405, 500, 503]",
129+
"ref": "SPID-QAD-OIDC-RP, SPID-QAD-OIDC-OP-AA",
130+
"hook": {
131+
"authentication-request": ["2.0.0", "2.0.1"],
132+
"authentication-response": ["2.2.0"],
133+
"token-request": ["3.0.0"],
134+
"token-response": ["3.1.1"],
135+
"userinfo-request": ["4.0.0"],
136+
"userinfo-response": ["4.1.0"],
137+
"granttoken-introspection-request": [],
138+
"granttoken-introspection-response": ["5.2.2"]
139+
}
140+
},
141+
"test-case-oidc-aa-5": {
142+
"name": "Test Case Attribute Authority Grant Token Wrong Introspection Error Response - Parameter error not present",
143+
"image": "test-case-oidc-aa-error",
144+
"description": "Make a wrong introspection error response - parameter error is not present",
145+
"ref": "SPID-QAD-OIDC-RP, SPID-QAD-OIDC-OP-AA",
146+
"hook": {
147+
"authentication-request": ["2.0.0", "2.0.1"],
148+
"authentication-response": ["2.2.0"],
149+
"token-request": ["3.0.0"],
150+
"token-response": ["3.1.1"],
151+
"userinfo-request": ["4.0.0"],
152+
"userinfo-response": ["4.1.0"],
153+
"granttoken-introspection-request": [],
154+
"granttoken-introspection-response": ["5.2.3"]
155+
}
156+
},
157+
"test-case-oidc-aa-6": {
158+
"name": "Test Case Attribute Authority Grant Token Wrong Introspection Error Response - Parameter error_description not present",
159+
"image": "test-case-oidc-aa-error",
160+
"description": "Make a wrong introspection error response - parameter error_description is not present",
161+
"ref": "SPID-QAD-OIDC-RP, SPID-QAD-OIDC-OP-AA",
162+
"hook": {
163+
"authentication-request": ["2.0.0", "2.0.1"],
164+
"authentication-response": ["2.2.0"],
165+
"token-request": ["3.0.0"],
166+
"token-response": ["3.1.1"],
167+
"userinfo-request": ["4.0.0"],
168+
"userinfo-response": ["4.1.0"],
169+
"granttoken-introspection-request": [],
170+
"granttoken-introspection-response": ["5.2.4"]
171+
}
172+
},
173+
"test-case-oidc-aa-7": {
174+
"name": "Test Case Attribute Authority Grant Token Wrong Introspection Error Response - Value of error not valid",
175+
"image": "test-case-oidc-aa-error",
176+
"description": "Make a wrong introspection error response - the value of error is different from ['invalid_client', 'invalid_request', 'server_error', 'temporarily_unavailable']",
177+
"ref": "SPID-QAD-OIDC-RP, SPID-QAD-OIDC-OP-AA",
178+
"hook": {
179+
"authentication-request": ["2.0.0", "2.0.1"],
180+
"authentication-response": ["2.2.0"],
181+
"token-request": ["3.0.0"],
182+
"token-response": ["3.1.1"],
183+
"userinfo-request": ["4.0.0"],
184+
"userinfo-response": ["4.1.0"],
185+
"granttoken-introspection-request": [],
186+
"granttoken-introspection-response": ["5.2.5"]
61187
}
62-
}
188+
}
63189
}
64190
}
65191
}

0 commit comments

Comments
 (0)