Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# Test Plan for CAPIF Api Provider Management
At this documentation you will have all information and related files and examples of test plan for this API.
## Test Case 1: Register Api Provider
**Test ID**: ***capif_api_provider_management-1***
**Description**:
This test case will check that Api Provider can be registered con CCF
**Pre-Conditions**:
* Provider is pre-authorised (has valid certificate from CAPIF Authority)
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Store each cert in a file with according name.
**Execution Steps**:
1. Create private and public key for provider and each function to register.
2. Register Provider.
**Expected Result**:
1. Register Provider at Provider Management:
1. **201 Created** response.
2. body returned must accomplish **APIProviderEnrolmentDetails** data structure.
3. For each **apiProvFuncs**, we must check:
1. **apiProvFuncId** is set
2. **apiProvCert** under **regInfo** is set properly
5. Location Header must contain the new resource URL *{apiRoot}/api-provider-management/v1/registrations/{registrationId}*
## Test Case 2: Register Api Provider Already registered
**Test ID**: ***capif_api_provider_management-2***
**Description**:
This test case will check that a Api Provider previously registered cannot be re-registered
**Pre-Conditions**:
* Api Provider was registered previously and there is a {registerId} for his Api Provider in the DB
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Store each cert in a file with according name.
5. Re-Register Provider:
* Same regSec than Previous registration
**Execution Steps**:
1. Create private and public key for provider and each function to register.
2. Register Provider.
3. Re-Register Provider.
**Expected Result**:
1. Re-Register Provider:
1. **403 Forbidden** response.
2. body returned must accomplish **ProblemDetails** data structure, with:
* status 403
* title with message "Forbidden"
* detail with message "Provider already registered".
* cause with message "Identical provider reg sec".
## Test Case 3: Update Registered Api Provider
**Test ID**: ***capif_api_provider_management-3***
**Description**:
This test case will check that a Registered Api Provider can be updated
**Pre-Conditions**:
* Api Provider was registered previously and there is a {registerId} for his Api Provider in the DB
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Get Resource URL from Location
5. Update Provider:
* Send PUT to Resource URL returned at registration *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{registrationId}*
* body [provider request body] with apiProvDomInfo set to ROBOT_TESTING_MOD
* Use AMF Certificate.
**Execution Steps**:
1. Create private and public key for provider and each function to register.
2. Register Provider
3. Update Provider
**Expected Result**:
1. Register Provider:
1. **201 Created** response.
2. body returned must accomplish **APIProviderEnrolmentDetails** data structure.
3. Location Header must contain the new resource URL *{apiRoot}/api-provider-management/v1/registrations/{registrationId}*
2. Update Provider:
1. **200 OK** response.
2. body returned must accomplish **APIProviderEnrolmentDetails** data structure, with:
* apiProvDomInfo set to ROBOT_TESTING_MOD
## Test Case 4: Update Not Registered Api Provider
**Test ID**: ***capif_api_provider_management-4***
**Description**:
This test case will check that a Non-Registered Api Provider cannot be updated
**Pre-Conditions**:
* Api Provider was not registered previously
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Store each cert in a file with according name.
5. Update Not Registered Provider:
* Send PUT *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{API_PROVIDER_NOT_REGISTERED}*
* body [provider request body]
* Use AMF Certificate.
**Execution Steps**:
1. Register Provider at CCF
3. Update Not Registered Provider
**Expected Result**:
1. Update Not Registered Provider:
1. **404 Not Found** response.
2. body returned must accomplish **ProblemDetails** data structure, with:
* status 404
* title with message "Not Found"
* detail with message "Not Exist Provider Enrolment Details".
* cause with message "Not found registrations to send this api provider details".
## Test Case 5: Partially Update Registered Api Provider
**Test ID**: ***capif_api_provider_management-5***
**Description**:
This test case will check that a Registered Api Provider can be partially updated
**Pre-Conditions**:
* Api Provider was registered previously and there is a {registerId} for his Api Provider in the DB
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Store each cert in a file with according name.
5. Partial update provider:
* Send PATCH *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{registrationId}*
* body [provider request patch body]
* Use AMF Certificate.
**Execution Steps**:
1. Register Provider at CCF
2. Register Provider
3. Partial update provider
**Expected Result**:
1. Partial update provider at Provider Management:
1. **200 OK** response.
2. body returned must accomplish **APIProviderEnrolmentDetails** data structure, with:
* apiProvDomInfo with "ROBOT_TESTING_MOD"
## Test Case 6: Partially Update Not Registered Api Provider
**Test ID**: ***capif_api_provider_management-6***
**Description**:
This test case will check that a Non-Registered Api Provider cannot be partially updated
**Pre-Conditions**:
* Api Provider was not registered previously
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Store each cert in a file with according name.
5. Partial update Provider:
* Send PATCH *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{API_API_PROVIDER_NOT_REGISTERED}*
* body [provider request patch body]
* Use AMF Certificate.
**Execution Steps**:
1. Register Provider at CCF
2. Register Provider
3. Partial update provider
**Expected Result**:
1. Partial update provider:
1. **404 Not Found** response.
2. body returned must accomplish **ProblemDetails** data structure, with:
* status 404
* title with message "Not Found"
* detail with message "Not Exist Provider Enrolment Details".
* cause with message "Not found registrations to send this api provider details".
## Test Case 7: Delete Registered Api Provider
**Test ID**: ***capif_api_provider_management-7***
**Description**:
This test case will check that a Registered Api Provider can be deleted
**Pre-Conditions**:
* Api Provider was registered previously
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Store each cert in a file with according name.
5. Delete registered provider:
* Send DELETE *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{registrationId}*
* Use AMF Certificate.
**Execution Steps**:
1. Register Provider at CCF
2. Register Provider
3. Delete Provider
**Expected Result**:
1. Delete Provider:
1. **204 No Content** response.
## Test Case 8: Delete Not Registered Api Provider
**Test ID**: ***capif_api_provider_management-8***
**Description**:
This test case will check that a Non-Registered Api Provider cannot be deleted
**Pre-Conditions**:
* Api Provider was not registered previously
**Information of Test**:
1. Create public and private key at provider for provider itself and each function (apf, aef and amf)
2. Register of Provider at CCF:
* Send POST to *http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register*
* body [provider register body]
3. Obtain Access Token:
* Send POST to *http://{CAPIF_HOSTNAME}/getauth*
* Body [provider getauth body]
4. Register Provider:
* Send POST *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations*
* body [provider request body]
* Authentication Bearer with access_token
* Store each cert in a file with according name.
5. Delete registered provider at Provider Management:
* Send DELETE *https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{API_PROVIDER_NOT_REGISTERED}*
* Use AMF Certificate.
**Execution Steps**:
1. Register Provider at CCF
2. Delete Provider
**Expected Result**:
1. Delete Provider:
1. **404 Not Found** response.
2. body returned must accomplish **ProblemDetails** data structure, with:
* status 404
* title with message "Not Found"
* detail with message "Not Exist Provider Enrolment Details".
* cause with message "Not found registrations to send this api provider details".
[provider register body]: ./provider_details_post_example.json "API Provider Enrolment Request"
[provider request body]: ./provider_details_post_example.json "API Provider Enrolment Request"
[provider request patch body]: ./provider_details_enrolment_details_patch_example.json "API Provider Enrolment Patch Request"
[provider getauth body]: ./provider_getauth_example.json "Get Auth Example"