-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qualifier] DSS0210,A2-7-2,7 validate authentication for subscription…
… CRUD+search endpoints (#514) * DSS02120,A2-7-2,7 Implement comments * Address latest PR comments
- Loading branch information
Showing
22 changed files
with
1,196 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
monitoring/uss_qualifier/scenarios/astm/utm/dss/authentication/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .authentication_validation import AuthenticationValidation |
178 changes: 178 additions & 0 deletions
178
...ss_qualifier/scenarios/astm/utm/dss/authentication/authentication_validation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
# ASTM SCD DSS: Interfaces authentication test scenario | ||
|
||
## Overview | ||
|
||
Ensures that a DSS properly authenticates requests to all its endpoints. | ||
|
||
Note that this does not cover authorization. | ||
|
||
## Resources | ||
|
||
### dss | ||
|
||
[`DSSInstanceResource`](../../../../../resources/astm/f3548/v21/dss.py) to be tested in this scenario. | ||
|
||
Note that to benefit from the maximum coverage, the DSS' AuthAdapterResource must be able to obtain credentials | ||
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). | ||
|
||
This scenario will check for the scope's availability and transparently ignore checks that can't be conducted. | ||
|
||
Required scopes for running this scenario: | ||
|
||
- `utm.strategic_coordination` | ||
|
||
Optional scopes that will allow the scenario to provide additional coverage: | ||
|
||
- `utm.availability_arbitration` | ||
- `""` (empty string) | ||
|
||
### id_generator | ||
|
||
[`IDGeneratorResource`](../../../../../resources/interuss/id_generator.py) providing the Subscription ID for this scenario. | ||
|
||
### planning_area | ||
|
||
[`PlanningAreaResource`](../../../../../resources/astm/f3548/v21/planning_area.py) describes the 3D volume in which entities will be created. | ||
|
||
## Setup test case | ||
|
||
### [Ensure clean workspace test step](../clean_workspace.md) | ||
|
||
This step ensures that no entity with the known test IDs exists in the DSS. | ||
|
||
## Endpoint authorization test case | ||
|
||
This test case ensures that the DSS properly authenticates requests to all its endpoints. | ||
|
||
### Subscription endpoints authentication test step | ||
|
||
#### 🛑 Unauthorized requests return the proper error message body check | ||
|
||
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)**. | ||
|
||
#### 🛑 Create subscription with missing credentials check | ||
|
||
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)**. | ||
|
||
#### 🛑 Create subscription with invalid credentials check | ||
|
||
If the DSS under test allows the creation of a subscription with credentials that are well-formed but invalid, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Create subscription with missing scope check | ||
|
||
If the DSS under test allows the creation of a subscription with valid credentials but a missing scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Create subscription with incorrect scope check | ||
|
||
If the DSS under test allows the creation of a subscription with valid credentials but an incorrect scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Create subscription with valid credentials check | ||
|
||
If the DSS does not allow the creation of a subscription when valid credentials are presented, | ||
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Get subscription with missing credentials check | ||
|
||
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)**. | ||
|
||
#### 🛑 Get subscription with invalid credentials check | ||
|
||
If the DSS under test allows the fetching of a subscription with credentials that are well-formed but invalid, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Get subscription with missing scope check | ||
|
||
If the DSS under test allows the fetching of a subscription with valid credentials but a missing scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Get subscription with incorrect scope check | ||
|
||
If the DSS under test allows the fetching of a subscription with valid credentials but an incorrect scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Get subscription with valid credentials check | ||
|
||
If the DSS does not allow fetching a subscription when valid credentials are presented, | ||
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Mutate subscription with missing credentials check | ||
|
||
If the DSS under test allows the mutation 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)**. | ||
|
||
#### 🛑 Mutate subscription with invalid credentials check | ||
|
||
If the DSS under test allows the mutation of a subscription with credentials that are well-formed but invalid, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Mutate subscription with missing scope check | ||
|
||
If the DSS under test allows the mutation of a subscription with valid credentials but a missing scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Mutate subscription with incorrect scope check | ||
|
||
If the DSS under test allows the mutation of a subscription with valid credentials but an incorrect scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Mutate subscription with valid credentials check | ||
|
||
If the DSS does not allow the mutation of a subscription when valid credentials are presented, | ||
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Delete subscription with missing credentials check | ||
|
||
If the DSS under test allows the deletion 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)**. | ||
|
||
#### 🛑 Delete subscription with invalid credentials check | ||
|
||
If the DSS under test allows the deletion of a subscription with credentials that are well-formed but invalid, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Delete subscription with missing scope check | ||
|
||
If the DSS under test allows the deletion of a subscription with valid credentials but a missing scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Delete subscription with incorrect scope check | ||
|
||
If the DSS under test allows the deletion of a subscription with valid credentials but an incorrect scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Delete subscription with valid credentials check | ||
|
||
If the DSS does not allow the deletion of a subscription when valid credentials are presented, | ||
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Search subscriptions with missing credentials check | ||
|
||
If the DSS under test allows searching for subscriptions without any credentials being presented, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Search subscriptions with invalid credentials check | ||
|
||
If the DSS under test allows searching for subscriptions with credentials that are well-formed but invalid, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Search subscriptions with missing scope check | ||
|
||
If the DSS under test allows searching for subscriptions with valid credentials but a missing scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Search subscriptions with incorrect scope check | ||
|
||
If the DSS under test allows searching for subscriptions with valid credentials but an incorrect scope, | ||
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
#### 🛑 Search subscriptions with valid credentials check | ||
|
||
If the DSS does not allow searching for subscriptions when valid credentials are presented, | ||
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**. | ||
|
||
## [Cleanup](../clean_workspace.md) | ||
|
||
The cleanup phase of this test scenario removes the subscription with the known test ID if it has not been removed before. |
Oops, something went wrong.