Skip to content

Commit

Permalink
Add constraints and tests for issue GSA#942
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabeblis committed Dec 16, 2024
1 parent 48dd7f5 commit f0f080f
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 10 deletions.
6 changes: 6 additions & 0 deletions features/fedramp_extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ Examples:
| import-profile-has-available-document |
| import-profile-resolves-to-fedramp-content |
| incomplete-implemented-requirements |
| information-type |
| information-type-800-60-v2r1 |
| information-type-has-availability-impact |
| information-type-has-class |
| information-type-has-confidentiality-impact |
| information-type-has-integrity-impact |
| information-type-system |
Expand Down Expand Up @@ -318,8 +320,12 @@ Examples:
| import-profile-resolves-to-fedramp-content-PASS.yaml |
| incomplete-implemented-requirements-FAIL.yaml |
| incomplete-implemented-requirements-PASS.yaml |
| information-type-FAIL.yaml |
| information-type-PASS.yaml |
| information-type-has-availability-impact-FAIL.yaml |
| information-type-has-availability-impact-PASS.yaml |
| information-type-has-class-FAIL.yaml |
| information-type-has-class-PASS.yaml |
| information-type-has-confidentiality-impact-FAIL.yaml |
| information-type-has-confidentiality-impact-PASS.yaml |
| information-type-has-integrity-impact-FAIL.yaml |
Expand Down
20 changes: 10 additions & 10 deletions src/content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@
<p>If 'not-applicable', attest explain why authentication is not applicable in the remarks.</p>
</remarks>
</prop>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.8"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="incoming" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="outgoing" value="C.3.5.8"/>
<status state="operational"/>

<responsible-role role-id="provider">
Expand Down Expand Up @@ -1028,8 +1028,8 @@
</description>
<prop name="leveraged-authorization-uuid" value="11111111-2222-4000-8000-019000000001"/>
<prop name="implementation-point" value="external"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.8"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="incoming" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="outgoing" value="C.3.5.8"/>
<link rel="provided-by" href="#11111111-2222-4000-8000-009000100001"/>
<status state="operational"/>
<responsible-role role-id="administrator">
Expand Down Expand Up @@ -1099,8 +1099,8 @@
<p>If 'not-applicable', attest explain why authentication is not applicable in the remarks.</p>
</remarks>
</prop>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.1" />
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.8" />
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="incoming" value="C.3.5.1" />
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="outgoing" value="C.3.5.8" />
<prop name="poam-item-uuid" ns="https://fedramp.gov/ns/oscal" value="11111111-3333-4000-8000-000000000001" />
<prop name="poam-id" ns="https://fedramp.gov/ns/oscal" value="ID-0001" />
<link rel="provided-by" href="#11111111-2222-4000-8000-009000100001" />
Expand Down Expand Up @@ -1277,8 +1277,8 @@
<p>If 'not-applicable', attest explain why authentication is not applicable in the remarks.</p>
</remarks>
</prop>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.8"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="incoming" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="outgoing" value="C.3.5.8"/>
<prop ns="https://fedramp.gov/ns/oscal" name="compliance" value="soc-2-type-1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="compliance" value="pci-dss"/>
<prop ns="https://fedramp.gov/ns/oscal" name="compliance" value="iso-27001"/>
Expand Down Expand Up @@ -1422,8 +1422,8 @@
<p>If 'not-applicable', attest explain why authentication is not applicable in the remarks.</p>
</remarks>
</prop>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.8"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="incoming" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="outgoing" value="C.3.5.8"/>
<prop name="inherited-uuid" value="22222222-0000-4000-9001-009000000001">
<remarks>
<p>This can only be known if provided by the leveraged system.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" uuid="11111111-2222-4000-8000-000000000000">
<system-implementation>
<component uuid="11111111-2222-4000-8000-009000100001" type="system">
<!-- The information type props don't have one of the correct allowed-values (incoming/outgoing) -->
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="neither" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="neither" value="C.3.5.8"/>
</component>
</system-implementation>
</system-security-plan>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" uuid="11111111-2222-4000-8000-000000000000">
<system-implementation>
<component uuid="11111111-2222-4000-8000-009000100001" type="system">
<!--
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="incoming" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" class="outgoing" value="C.3.5.8"/>
-->
<!-- The information-type props are missing the @class attribute. -->
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.1"/>
<prop ns="https://fedramp.gov/ns/oscal" name="information-type" value="C.3.5.8"/>
</component>
</system-implementation>
</system-security-plan>
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@
<enum value="fedramp-3.0.0rc1-oscal-1.1.2">FedRAMP Version</enum>
</allowed-values>

<allowed-values id="information-type" target="//component/prop[@name='information-type' and @ns='https://fedramp.gov/ns/oscal']/@class" allow-other="no" level="ERROR">
<formal-name>Information Type</formal-name>
<description>Contains the list of supported values for information type props.</description>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/4-ssp-template-to-oscal-mapping/#leveraged-fedramp-authorized-services"/>
<enum value="incoming">Incoming</enum>
<enum value="outgoing">Outgoing</enum>
</allowed-values>

<allowed-values id="information-type-800-60-v2r1" target="(system-characteristics/system-information/information-type/categorization[@system='https://doi.org/10.6028/NIST.SP.800-60v2r1']/information-type-id | //component[(@type='system' and prop[@name='leveraged-authorization-uuid']) or (@type=('service', 'software') and not(prop[@name='leveraged-authorization-uuid']) and prop[@name='implementation-point' and @value='external']) or (@type='interconnection') or (@type=('service', 'software') and prop[@name='implementation-point' and @value='internal'] and prop[@name='communicates-externally' and @value='yes' and @ns='https://fedramp.gov/ns/oscal'])]/prop[@ns='https://fedramp.gov/ns/oscal' and @name='information-type']/@value)" allow-other="no" level="ERROR">
<formal-name>NIST SP 800-60 Volume 2 Revision 1 Information Types</formal-name>
<description>Contains a list of all supported information types from NIST SP 800-60 Volume 2 Revision 1.</description>
Expand Down
5 changes: 5 additions & 0 deletions src/validations/constraints/fedramp-external-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/5-attachments/#system-inventory-approach"/>
<message>A FedRAMP SSP system implementation section MUST have at least two inventory items.</message>
</expect>
<expect id="information-type-has-class" target="component/prop[@name='information-type' and @ns='https://fedramp.gov/ns/oscal']" test="exists(@class)" level="ERROR">
<formal-name>Information Type Has Class</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/4-ssp-template-to-oscal-mapping/#leveraged-fedramp-authorized-services"/>
<message>In a FedRAMP SSP, each component that defines an information type MUST specify whether the information is incoming or outgoing.</message>
</expect>
<expect id="inter-boundary-component-direction-incoming-has-ipv-uri" target="$inter-boundary-component" test="if (prop[@name='direction' and @value='incoming']) then exists(prop[@class='local' and @name=('ipv4-address','ipv6-address')]) or exists(link[@rel='uri']) else true()" level="ERROR">
<formal-name>Inter-Boundary Incoming Communication Direction Has an IPV Address or a URI</formal-name>
<prop namespace="https://docs.oasis-open.org/sarif/sarif/v2.1.0" name="help-url" value="https://automate.fedramp.gov/documentation/ssp/4-ssp-template-to-oscal-mapping/#external-systems-and-services-not-having-fedramp-authorization"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test-case:
name: Negative Test for information-type
description: This test case validates the behavior of constraint information-type
content: ../content/ssp-information-type-INVALID.xml
expectations:
- constraint-id: information-type
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test-case:
name: Positive Test for information-type
description: This test case validates the behavior of constraint information-type
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml
expectations:
- constraint-id: information-type
result: pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for information-type-has-class
description: >-
This test case validates the behavior of constraint
information-type-has-class
content: ../content/ssp-information-type-has-class-INVALID.xml
expectations:
- constraint-id: information-type-has-class
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for information-type-has-class
description: >-
This test case validates the behavior of constraint
information-type-has-class
content: ../../../content/rev5/examples/ssp/xml/fedramp-ssp-example.oscal.xml
expectations:
- constraint-id: information-type-has-class
result: pass

0 comments on commit f0f080f

Please sign in to comment.