forked from interuss/automated_testing_interfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
injection.yaml
617 lines (574 loc) · 21.7 KB
/
injection.yaml
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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
openapi: 3.0.2
info:
title: Remote ID Test Data Injection
version: 0.1.2
description: >-
This interface is provided by every Service Provider wishing to be tested by the automated testing framework.
The automated testing suite calls this interface to inject flight-related test data into the Service Provider system under test.
paths:
/tests/{test_id}:
parameters:
-
examples:
default:
value: '2979bd18-7f06-441c-bda6-e82c841c35d6'
name: test_id
description: >-
The ID of the test.
schema:
type: string
in: query
required: true
put:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTestParameters'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ChangeTestResponse'
description: Requested test was created successfully.
'409':
description: Test already exists.
operationId: createTest
summary: Create test
description: >-
Request the creation of one or more logical flights based on injection of the provided test data.
The Service Provider's test data injector may modify fields, such as `details.id`, as necessary to work with their system.
The Service Provider's test data injector should modify as few fields as practical, and change modified fields as little as practical.
The `injection_id` fields may not be modified.
security:
- TestAuth:
- rid.inject_test_data
/tests/{test_id}/{version}:
parameters:
-
examples:
default:
value: '2979bd18-7f06-441c-bda6-e82c841c35d6'
name: test_id
description: >-
The ID of the test.
schema:
type: string
in: query
required: true
-
name: version
description: >-
Current version of the test.
schema:
type: string
in: query
required: true
delete:
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTestResponse'
description: Requested test was deleted successfully.
operationId: deleteTest
summary: Delete test
description: Remove all test data associated with this test from the Service Provider's test data injector.
security:
- TestAuth:
- rid.inject_test_data
components:
schemas:
RIDFlightID:
description: |-
ID, unique to a remote ID service provider, which identifies a particular flight for which the remote ID service provider is providing remote ID services.
The following characters are not allowed: \0 \t \r \n # % / : ? @ [ \ ]
maxLength: 255
minLength: 1
type: string
example: uss1.JA6kHYCcByQ-6AfU
RIDAuthData:
description: Additional authentication data.
type: object
properties:
format:
description: |-
Format of additional authentication data.
0: None
1: UAS ID Signature
2: Operator ID Signature
3: Message Set Signature
4: Authentication Provided by Network Remote ID
5: Specific Method
6-9: Reserved for Spec
10-15: Available for Private Use
type: integer
default: 0
minimum: 0
exclusiveMinimum: false
maximum: 15
exclusiveMaximum: false
data:
description: Authentication data in form specified by `format`.
type: string
default: ''
HorizontalAccuracy:
description: |-
This is the NACp enumeration from ADS-B, plus 1m for a more complete range for UAs.
`HAUnknown`: Unknown horizontal accuracy
`HA10NMPlus`: > 10NM (18.52km)
`HA10NM`: < 10NM (18.52km)
`HA4NM`: < 4NM (7.408km)
`HA2NM`: < 2NM (3.704km)
`HA1NM`: < 1NM (1852m)
`HA05NM`: < 0.5NM (926m)
`HA03NM`: < 0.3NM (555.6m)
`HA01NM`: < 0.1NM (185.2m)
`HA005NM`: < 0.05NM (92.6m)
`HA30m`: < 30m
`HA10m`: < 10m
`HA3m`: < 3m
`HA1m`: < 1m
enum:
- HAUnknown
- HA10NMPlus
- HA10NM
- HA4NM
- HA2NM
- HA1NM
- HA05NM
- HA03NM
- HA01NM
- HA005NM
- HA30m
- HA10m
- HA3m
- HA1m
type: string
VerticalAccuracy:
description: |-
This is the GVA enumeration from ADS-B, plus some finer values for UAs.
`VAUnknown`: Unknown vertical accuracy
`VA150mPlus`: > 150m
`VA150m`: < 150m
`VA45m`: < 45m
`VA25m`: < 25m
`VA10m`: < 10m
`VA3m`: < 3m
`VA1m`: < 1m
enum:
- VAUnknown
- VA150mPlus
- VA150m
- VA45m
- VA25m
- VA10m
- VA3m
- VA1m
type: string
SpeedAccuracy:
description: |-
This is the same enumeration scale and values from ADS-B NACv.
`SAUnknown`: Unknown speed accuracy
`SA10mpsPlus`: > 10 m/s
`SA10mps`: < 10 m/s
`SA3mps`: < 3 m/s
`SA1mps`: < 1 m/s
`SA03mps`: < 0.3 m/s
enum:
- SAUnknown
- SA10mpsPlus
- SA10mps
- SA3mps
- SA1mps
- SA03mps
type: string
RIDAircraftPosition:
description: Position of an aircraft as reported for remote ID purposes.
required:
- lat
- lng
- alt
type: object
properties:
lat:
$ref: 'commons.yaml#/components/schemas/Latitude'
lng:
$ref: 'commons.yaml#/components/schemas/Longitude'
alt:
$ref: 'commons.yaml#/components/schemas/Altitude'
height:
$ref: 'commons.yaml#/components/schemas/RIDHeight'
accuracy_h:
anyOf:
- $ref: '#/components/schemas/HorizontalAccuracy'
description: Horizontal error that is likely to be present in this reported
position. Required when `extrapolated` field is true and always in the
entry for the current state.
accuracy_v:
anyOf:
- $ref: '#/components/schemas/VerticalAccuracy'
description: Vertical error that is likely to be present in this reported
position. Required when `extrapolated` field is true and always in the
entry for the current state.
extrapolated:
description: True if this position was generated primarily by computation
rather than primarily from a direct instrument measurement. Assumed false
if not specified.
type: boolean
pressure_altitude:
format: float
description: The uncorrected altitude (based on reference standard 29.92
inHg, 1013.25 mb) provides a reference for algorithms that utilize "altitude
deltas" between aircraft. This value is provided in meters and must have
a minimum resolution of 1 meter.
type: number
RIDFlightDetails:
description: Details about a flight reported by a remote ID service provider. At
least one of the registration or serial fields must be filled if required
by CAA.
required:
- id
type: object
properties:
id:
description: ID for this flight, matching argument in request.
type: string
example: a3423b-213401-0023
operator_id:
$ref: 'commons.yaml#/components/schemas/OperatorId'
operator_location:
anyOf:
- $ref: 'commons.yaml#/components/schemas/LatLngPoint'
description: Location of party controlling the aircraft.
operation_description:
description: Free-text field that enables the operator to describe the purpose
of a flight, if so desired.
type: string
example: SafeFlightDrone company doing survey with DJI Inspire 2. See my
privacy policy www.example.com/privacy.
auth_data:
$ref: '#/components/schemas/RIDAuthData'
serial_number:
description: Can be specified when no registration ID exists and required
by law in a region. This is expressed in the ANSI/CTA-2063-A Physical Serial
Number format.
type: string
example: INTCJ123-4567-890
registration_number:
description: If a CAA provides a method of registering UAS, this number
is provided by the CAA or its authorized representative. Required when
required by law in a region.
type: string
example: FA12345897
uas_id:
$ref: '#/components/schemas/UASID'
operator_altitude:
$ref: 'commons.yaml#/components/schemas/OperatorAltitude'
eu_classification:
description: When this field is specified, the Classification Type is "European
Union". If no other classification field is specified, the Classification Type
is "Undeclared".
anyOf:
- $ref: '#/components/schemas/UAClassificationEU'
RIDRecentAircraftPosition:
description: ""
required:
- time
- position
type: object
properties:
time:
format: date-time
description: Time at which this position applied. RFC 3339 format, per
OpenAPI specification.
type: string
position:
$ref: '#/components/schemas/RIDAircraftPosition'
RIDAircraftState:
description: State of an aircraft for the purposes of remote ID.
required:
- timestamp
- timestamp_accuracy
- accuracy_h
- accuracy_v
- speed
- vertical_speed
- track
- speed_accuracy
- position
type: object
properties:
timestamp:
format: date-time
description: Time at which this state was valid. This may be the time coming
from the source, such as a GPS, or the time when the system computes the
values using an algorithm such as an Extended Kalman Filter (EKF). Timestamp
must be expressed with a minimum resolution of 1/10th of a second. RFC
3339 format, per OpenAPI specification.
type: string
timestamp_accuracy:
format: float
description: 'Declaration of timestamp accuracy, which is the largest difference
between Timestamp and true time of applicability for any of the following
fields: Latitude, Longitude, Geodetic Altitude, Pressure Altitude of Position,
Height. to determine time of applicability of the location data provided. Expressed
in seconds, precise to 1/10ths of seconds. The accuracy reflects the 95%
uncertainty bound value for the timestamp.'
minimum: 0
exclusiveMinimum: false
type: number
operational_status:
$ref: 'commons.yaml#/components/schemas/RIDOperationalStatus'
position:
$ref: '#/components/schemas/RIDAircraftPosition'
track:
$ref: 'commons.yaml#/components/schemas/RIDTrack'
speed:
$ref: 'commons.yaml#/components/schemas/RIDSpeed'
speed_accuracy:
anyOf:
- $ref: '#/components/schemas/SpeedAccuracy'
description: Accuracy of horizontal ground speed.
vertical_speed:
format: float
description: Speed up (vertically) WGS84-HAE, m/s.
type: number
example: 0.2
height:
$ref: 'commons.yaml#/components/schemas/RIDHeight'
group_radius:
format: float
description: Farthest horizontal distance from reported group location at
which an aircraft in the group may be located (meters). This value contains
the "Operating Area Radius" data from the common data dictionary when
group operation area is specified by point-radius.
minimum: 0
exclusiveMinimum: true
type: number
group_ceiling:
format: float
description: Maximum altitude (meters WGS84-HAE) of Group Operation. This
value contains the "Operating Area Ceiling" data from the common data
dictionary when group operation area is specified by point-radius.
type: number
group_floor:
format: float
description: Minimum altitude (meters WGS84-HAE) of Group Operation. If
not specified, ground level shall be assumed. This value contains the
"Operating Area Floor" data from the common data dictionary when group
operation area is specified by point-radius.
type: number
group_count:
format: int32
description: When operating a group (or formation or swarm), number of aircraft
in group. This value contains the "Operating Area Count" data from the
common data dictionary when group operation area is specified by point-radius.
minimum: 1
exclusiveMinimum: false
type: integer
group_time_start:
format: date-time
description: Time at which a group operation starts. This value contains
the "Operation Area Start" data from the common data dictionary when group
operation area is specified by point-radius.
type: string
group_time_end:
format: date-time
description: Time at which a group operation starts. This value contains
the "Operation Area End" data from the common data dictionary when group
operation area is specified by point-radius.
type: string
RIDAircraftType:
description: |-
Type of aircraft for the purposes of remote ID.
`VTOL` is a fixed wing aircraft that can take off vertically. `Helicopter` includes multirotor.
enum:
- NotDeclared
- Aeroplane
- Helicopter
- Gyroplane
- VTOL
- Ornithopter
- Glider
- Kite
- FreeBalloon
- CaptiveBalloon
- Airship
- FreeFallOrParachute
- Rocket
- TetheredPoweredAircraft
- GroundObstacle
- Other
- HybridLift
type: string
UAClassificationEU:
type: object
properties:
category:
type: string
enum:
- EUCategoryUndefined
- Open
- Specific
- Certified
default: EUCategoryUndefined
class:
type: string
enum:
- EUClassUndefined
- Class0
- Class1
- Class2
- Class3
- Class4
- Class5
- Class6
default: EUClassUndefined
SpecificSessionID:
description: |-
A unique 20 byte ID intended to identify a specific flight (session) while providing a
greater level of privacy to the operator. The first byte is the registered unique Specific Session ID
Type maintained by a registrar (see Annex A5), and the remaining 19 bytes is the Session ID per the
Specific Session ID Type specification.
Initial scheme registry entries include:
0 – reserved
1 – Internet Engineering Task Force (IETF) Drone Remote Identification Protocol (DRIP) entity ID
2 – IEEE 1609.2 HashedID8
Expressed as a hexadecimal string of the underlying data bytes. A recipient should ignore any dashes in this value. If fewer than 20 bytes are specified, the remaining bytes at the end are assumed to have value 0.
type: string
example: 02-a1b2c3d4e5f60708
default: ''
UASID:
description: Identification of the UAS performing this flight. At least one
field of this object must be specified.
type: object
properties:
serial_number:
description: This is expressed in the CTA-2063-A Serial Number format.
type: string
example: INTCJ123-4567-890
default: ''
registration_id:
description: If a CAA provides a method of registering UAS, this number
is provided by the CAA or its authorized representative. Format is
<ICAO Nationality MarkA>.<CAA Assigned ID>, ASCII encoded, only
uppercase letters (A-Z), dot (.), and digits (0-9) are allowed.
Example is valid for the US.
type: string
example: N.123456
default: ''
utm_id:
description: A UTM-provided universally unique ID traceable to a
non-obfuscated ID that acts as a "session id" to protect exposure of
operationally sensitive information.
type: string
example: ae1fa066-6d68-4018-8274-af867966978e
default: ''
specific_session_id:
$ref: '#/components/schemas/SpecificSessionID'
CreateTestParameters:
description: 'A complete set of data to be injected into a Service Provider system under test.'
required:
- requested_flights
type: object
properties:
requested_flights:
description: >-
One or more logical flights, each containing test data to inject into the system.
Elements should be sorted in ascending order of `timestamp`.
type: array
items:
$ref: '#/components/schemas/TestFlight'
ChangeTestResponse:
description: ''
required:
- injected_flights
- version
type: object
properties:
injected_flights:
description: 'The complete set of test data actually injected into the Service Provider system under test.'
type: array
items:
$ref: '#/components/schemas/TestFlight'
version:
description: Version of test. Used to delete test.
type: string
example: 1
DeleteTestResponse:
description: ''
required:
- injected_flights
type: object
properties:
injected_flights:
description: 'The complete set of test data deleted.'
type: array
items:
$ref: '#/components/schemas/TestFlight'
TestFlight:
description: "The set of data to be provided to a Service Provider's test data injector for a single flight."
required:
- injection_id
- telemetry
- details_responses
type: object
properties:
injection_id:
description: 'ID of the injected test flight. Remains the same regardless of the flight ID/UTM ID reported in the system.'
type: string
example: 'edb7695f-8737-4b9f-91f8-e2afbb333f41'
telemetry:
description: >-
The set of telemetry data that should be injected into the system for this flight.
Each element follows the RIDAircraftState schema from the ASTM remote ID standard.
type: array
items:
$ref: '#/components/schemas/RIDAircraftState'
details_responses:
description: The details of the flight as a function of time.
type: array
items:
$ref: '#/components/schemas/TestFlightDetails'
TestFlightDetails:
description: The set of data with which the Service Provider system under test should respond when queried for the details of a test flight.
required:
- effective_after
- details
type: object
properties:
effective_after:
description: >-
The time after which the Service Provider system under test should respond with `details`, unless other `details` with a more recent `effective_after` time (before the current time) are available.
type: string
format: datetime
details:
description: >-
The details of the flight.
Follows the RIDFlightDetails schema from the ASTM remote ID standard.
$ref: '#/components/schemas/RIDFlightDetails'
securitySchemes:
TestAuth:
flows:
clientCredentials:
tokenUrl: https://example.com/oauth/token
scopes:
rid.inject_test_data: >-
Client may inject test data into a Service Provider for the purpose of conducting automated tests.
type: oauth2
description: |-
Authorization from, or on behalf of, an authorization authority, augmenting standard remote ID authorization for the purpose of automated testing.
This authority will issue access tokens that are JSON Web Tokens as defined in RFC 7519, using the `RS256` algorithm for the signature, and publish to all providers the public key for verifying that signature.
The following fields must be included in the JWT claim for access tokens issued by this authority:
* `exp`, with a time no further than 1 hour in the future.
* `sub`, with unique ID of the client requesting the access token.
* `scope`, with a string composed of a space-separated list of strings indicating the scopes granted, per RFC 6749.
* `aud`, with the fully qualified domain name of the URL the access token will be used to access. For example, if a USS were querying the endpoint at https://uss.example.com:8888/rid_injection/tests/283ac627-5d68-4cfe-805b-dc0bec7d8fdc/v5, the access token included in the request should specify `"aud": "uss.example.com"`.
Clients must provide these access tokens in an `Authorization` header in the form `Bearer <token>` in accordance with RFC 6750.
security:
- TestAuth:
- rid.inject_test_data