|
| 1 | +# ASTM SCD DSS: Interfaces authentication test scenario |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Ensures that a DSS properly authenticates requests to all its endpoints. |
| 6 | + |
| 7 | +Note that this does not cover authorization. |
| 8 | + |
| 9 | +## Resources |
| 10 | + |
| 11 | +### dss |
| 12 | + |
| 13 | +[`DSSInstanceResource`](../../../../../resources/astm/f3548/v21/dss.py) to be tested in this scenario. |
| 14 | + |
| 15 | +Note that to benefit from the maximum coverage, the DSS' AuthAdapterResource must be able to obtain credentials |
| 16 | +for multiple scopes (so that a wrong scope may be used in place of the correct one) as well as an empty scope (that is, provide credentials where the scope is an empty string). |
| 17 | + |
| 18 | +This scenario will check for the scope's availability and transparently ignore checks that can't be conducted. |
| 19 | + |
| 20 | +Required scopes for running this scenario: |
| 21 | + |
| 22 | +- `utm.strategic_coordination` |
| 23 | + |
| 24 | +Optional scopes that will allow the scenario to provide additional coverage: |
| 25 | + |
| 26 | +- `utm.availability_arbitration` |
| 27 | +- `""` (empty string) |
| 28 | + |
| 29 | +### id_generator |
| 30 | + |
| 31 | +[`IDGeneratorResource`](../../../../../resources/interuss/id_generator.py) providing the Subscription ID for this scenario. |
| 32 | + |
| 33 | +### planning_area |
| 34 | + |
| 35 | +[`PlanningAreaResource`](../../../../../resources/astm/f3548/v21/planning_area.py) describes the 3D volume in which entities will be created. |
| 36 | + |
| 37 | +## Setup test case |
| 38 | + |
| 39 | +### [Ensure clean workspace test step](../clean_workspace.md) |
| 40 | + |
| 41 | +This step ensures that no entity with the known test IDs exists in the DSS. |
| 42 | + |
| 43 | +## Endpoint authorization test case |
| 44 | + |
| 45 | +This test case ensures that the DSS properly authenticates requests to all its endpoints. |
| 46 | + |
| 47 | +### Subscription endpoints authentication test step |
| 48 | + |
| 49 | +#### 🛑 Unauthorized requests return the proper error message body check |
| 50 | + |
| 51 | +If the DSS under test does not return a proper error message body when an unauthorized request is received, it fails to properly implement the OpenAPI specification that is part of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. |
| 52 | + |
| 53 | +#### 🛑 Create subscription with missing credentials check |
| 54 | + |
| 55 | +If the DSS under test allows the creation of a subscription without any credentials being presented, it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 56 | + |
| 57 | +#### 🛑 Create subscription with invalid credentials check |
| 58 | + |
| 59 | +If the DSS under test allows the creation of a subscription with credentials that are well-formed but invalid, |
| 60 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 61 | + |
| 62 | +#### 🛑 Create subscription with missing scope check |
| 63 | + |
| 64 | +If the DSS under test allows the creation of a subscription with valid credentials but a missing scope, |
| 65 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 66 | + |
| 67 | +#### 🛑 Create subscription with incorrect scope check |
| 68 | + |
| 69 | +If the DSS under test allows the creation of a subscription with valid credentials but an incorrect scope, |
| 70 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 71 | + |
| 72 | +#### 🛑 Create subscription with valid credentials check |
| 73 | + |
| 74 | +If the DSS does not allow the creation of a subscription when valid credentials are presented, |
| 75 | +it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. |
| 76 | + |
| 77 | +#### 🛑 Get subscription with missing credentials check |
| 78 | + |
| 79 | +If the DSS under test allows the fetching of a subscription without any credentials being presented, it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 80 | + |
| 81 | +#### 🛑 Get subscription with invalid credentials check |
| 82 | + |
| 83 | +If the DSS under test allows the fetching of a subscription with credentials that are well-formed but invalid, |
| 84 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 85 | + |
| 86 | +#### 🛑 Get subscription with missing scope check |
| 87 | + |
| 88 | +If the DSS under test allows the fetching of a subscription with valid credentials but a missing scope, |
| 89 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 90 | + |
| 91 | +#### 🛑 Get subscription with incorrect scope check |
| 92 | + |
| 93 | +If the DSS under test allows the fetching of a subscription with valid credentials but an incorrect scope, |
| 94 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 95 | + |
| 96 | +#### 🛑 Get subscription with valid credentials check |
| 97 | + |
| 98 | +If the DSS does not allow fetching a subscription when valid credentials are presented, |
| 99 | +it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. |
| 100 | + |
| 101 | +#### 🛑 Mutate subscription with missing credentials check |
| 102 | + |
| 103 | +If the DSS under test allows the mutation of a subscription without any credentials being presented, |
| 104 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 105 | + |
| 106 | +#### 🛑 Mutate subscription with invalid credentials check |
| 107 | + |
| 108 | +If the DSS under test allows the mutation of a subscription with credentials that are well-formed but invalid, |
| 109 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 110 | + |
| 111 | +#### 🛑 Mutate subscription with missing scope check |
| 112 | + |
| 113 | +If the DSS under test allows the mutation of a subscription with valid credentials but a missing scope, |
| 114 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 115 | + |
| 116 | +#### 🛑 Mutate subscription with incorrect scope check |
| 117 | + |
| 118 | +If the DSS under test allows the mutation of a subscription with valid credentials but an incorrect scope, |
| 119 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 120 | + |
| 121 | +#### 🛑 Mutate subscription with valid credentials check |
| 122 | + |
| 123 | +If the DSS does not allow the mutation of a subscription when valid credentials are presented, |
| 124 | +it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. |
| 125 | + |
| 126 | +#### 🛑 Delete subscription with missing credentials check |
| 127 | + |
| 128 | +If the DSS under test allows the deletion of a subscription without any credentials being presented, |
| 129 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 130 | + |
| 131 | +#### 🛑 Delete subscription with invalid credentials check |
| 132 | + |
| 133 | +If the DSS under test allows the deletion of a subscription with credentials that are well-formed but invalid, |
| 134 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 135 | + |
| 136 | +#### 🛑 Delete subscription with missing scope check |
| 137 | + |
| 138 | +If the DSS under test allows the deletion of a subscription with valid credentials but a missing scope, |
| 139 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 140 | + |
| 141 | +#### 🛑 Delete subscription with incorrect scope check |
| 142 | + |
| 143 | +If the DSS under test allows the deletion of a subscription with valid credentials but an incorrect scope, |
| 144 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 145 | + |
| 146 | +#### 🛑 Delete subscription with valid credentials check |
| 147 | + |
| 148 | +If the DSS does not allow the deletion of a subscription when valid credentials are presented, |
| 149 | +it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. |
| 150 | + |
| 151 | +#### 🛑 Search subscriptions with missing credentials check |
| 152 | + |
| 153 | +If the DSS under test allows searching for subscriptions without any credentials being presented, |
| 154 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 155 | + |
| 156 | +#### 🛑 Search subscriptions with invalid credentials check |
| 157 | + |
| 158 | +If the DSS under test allows searching for subscriptions with credentials that are well-formed but invalid, |
| 159 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 160 | + |
| 161 | +#### 🛑 Search subscriptions with missing scope check |
| 162 | + |
| 163 | +If the DSS under test allows searching for subscriptions with valid credentials but a missing scope, |
| 164 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 165 | + |
| 166 | +#### 🛑 Search subscriptions with incorrect scope check |
| 167 | + |
| 168 | +If the DSS under test allows searching for subscriptions with valid credentials but an incorrect scope, |
| 169 | +it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. |
| 170 | + |
| 171 | +#### 🛑 Search subscriptions with valid credentials check |
| 172 | + |
| 173 | +If the DSS does not allow searching for subscriptions when valid credentials are presented, |
| 174 | +it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. |
| 175 | + |
| 176 | +## [Cleanup](../clean_workspace.md) |
| 177 | + |
| 178 | +The cleanup phase of this test scenario removes the subscription with the known test ID if it has not been removed before. |
0 commit comments