forked from GSA/fedramp-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
component-responsible-role-references-party
constraint (GSA#945)
* Add constraint 'component-responsible-role-references-party' and tests * correct test * Rename constraint and adjust help-url * Edit message Co-authored-by: A.J. Stein <[email protected]> --------- Co-authored-by: A.J. Stein <[email protected]>
- Loading branch information
1 parent
a8461fb
commit 1377478
Showing
6 changed files
with
48 additions
and
1 deletion.
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
12 changes: 12 additions & 0 deletions
12
src/validations/constraints/content/ssp-component-has-provider-responsible-role-INVALID.xml
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,12 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/1.0 https://github.com/usnistgov/OSCAL/releases/download/v1.1.2/oscal_ssp_schema.xsd" uuid="12345678-1234-4321-8765-123456789012"> | ||
<system-implementation> | ||
<component uuid="6ac88fd2-7c7b-4357-af2e-f22ccd3ead26" type="system"> | ||
<prop name="leveraged-authorization-uuid" value="233e0f09-fe5e-47e2-bca3-5f32df75e57a"/> | ||
<responsible-role role-id="provider"> | ||
<!-- There are two parties referenced. The count should be 1. --> | ||
<party-uuid>11111111-0000-4000-9000-000000000001</party-uuid> | ||
<party-uuid>11111111-0000-4000-9000-000000000002</party-uuid> | ||
</responsible-role> | ||
</component> | ||
</system-implementation> | ||
</system-security-plan> |
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
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/component-responsible-role-references-party-FAIL.yaml
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,9 @@ | ||
test-case: | ||
name: Negative Test for component-has-provider-responsible-role | ||
description: >- | ||
This test case validates the behavior of constraint | ||
component-has-provider-responsible-role | ||
content: ../content/ssp-component-has-provider-responsible-role-INVALID.xml | ||
expectations: | ||
- constraint-id: component-has-provider-responsible-role | ||
result: fail |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/component-responsible-role-references-party-PASS.yaml
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,9 @@ | ||
test-case: | ||
name: Positive Test for component-has-provider-responsible-role | ||
description: >- | ||
This test case validates the behavior of constraint | ||
component-has-provider-responsible-role | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: component-has-provider-responsible-role | ||
result: pass |