Skip to content

Commit

Permalink
Add system-characteristics 'categorization-has' constraints (#671)
Browse files Browse the repository at this point in the history
* Added system-characteristics 'categorization-has constraints and tests

* Adjust path style and message wording per my PR feedback

---------

Co-authored-by: A.J. Stein <[email protected]>
  • Loading branch information
Gabeblis and aj-stein-gsa committed Sep 25, 2024
1 parent e3cd610 commit 60e454f
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 1 deletion.
6 changes: 6 additions & 0 deletions features/fedramp_extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Examples:
| attachment-type-PASS.yaml |
| authorization-type-FAIL.yaml |
| authorization-type-PASS.yaml |
| categorization-has-correct-system-attribute-FAIL.yaml |
| categorization-has-correct-system-attribute-PASS.yaml |
| categorization-has-information-type-id-FAIL.yaml |
| categorization-has-information-type-id-PASS.yaml |
| cloud-service-model-FAIL.yaml |
| cloud-service-model-PASS.yaml |
| component-type-FAIL.yaml |
Expand Down Expand Up @@ -95,6 +99,8 @@ Examples:
| address-type |
| attachment-type |
| authorization-type |
| categorization-has-correct-system-attribute |
| categorization-has-information-type-id |
| cloud-service-model |
| component-type |
| control-implementation-status |
Expand Down
2 changes: 1 addition & 1 deletion src/validations/constraints/content/ssp-all-INVALID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<p>Contains sensitive financial data related to organizational operations.</p>
</description>
<categorization system="https://unsupported-system.com">
<information-type-id>C.2.8.12</information-type-id>
<!-- Removed information-type-id to ensure that categorization-has-information-type-id fails correctly. -->
</categorization>
<confidentiality-impact>
<base>high</base>
Expand Down
6 changes: 6 additions & 0 deletions src/validations/constraints/fedramp-external-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
<expect id="has-separation-of-duties-matrix" target="back-matter" test="resource[prop[@name eq 'type' and @value eq 'separation-of-duties-matrix']]" level="ERROR">
<message>A FedRAMP SSP must have a Separation of Duties Matrix attached.</message>
</expect>
<expect id="categorization-has-correct-system-attribute" target="./system-characteristics" test="system-information/information-type/categorization/@system eq 'https://doi.org/10.6028/NIST.SP.800-60v2r1'" level="ERROR">
<message>A FedRAMP SSP information-type categorization requires a correct system attribute. FedRAMP only supports the system value 'https://doi.org/10.6028/NIST.SP.800-60v2r1'.</message>
</expect>
<expect id="categorization-has-information-type-id" target="//system-characteristics" test="system-information/information-type/categorization/information-type-id" level="ERROR">
<message>A FedRAMP SSP information type categorization must have at least one information type identifier.</message>
</expect>
</constraints>
</context>
<context>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for categorization-has-correct-system-attribute
description: >-
This test case validates the behavior of constraint
categorization-has-correct-system-attribute
content: ../content/ssp-all-INVALID.xml
expectations:
- constraint-id: categorization-has-correct-system-attribute
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for categorization-has-correct-system-attribute
description: >-
This test case validates the behavior of constraint
categorization-has-correct-system-attribute
content: ../content/ssp-all-VALID.xml
expectations:
- constraint-id: categorization-has-correct-system-attribute
result: pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for categorization-has-information-type-id
description: >-
This test case validates the behavior of constraint
categorization-has-information-type-id
content: ../content/ssp-all-INVALID.xml
expectations:
- constraint-id: categorization-has-information-type-id
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for categorization-has-information-type-id
description: >-
This test case validates the behavior of constraint
categorization-has-information-type-id
content: ../content/ssp-all-VALID.xml
expectations:
- constraint-id: categorization-has-information-type-id
result: pass

0 comments on commit 60e454f

Please sign in to comment.