Skip to content

Commit

Permalink
Add connection-security prop constraint for #931
Browse files Browse the repository at this point in the history
  • Loading branch information
kyhu65867 authored and aj-stein-gsa committed Dec 3, 2024
1 parent 113c4f5 commit 72d26f5
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 1 deletion.
3 changes: 3 additions & 0 deletions features/fedramp_extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Examples:
| leveraged-authorization-nature-of-agreement |
| marking |
| missing-response-components |
| network-component-has-connection-security-prop |
| network-component-has-implementation-point |
| party-has-name |
| privilege-level |
Expand Down Expand Up @@ -334,6 +335,8 @@ Examples:
| marking-PASS.yaml |
| missing-response-components-FAIL.yaml |
| missing-response-components-PASS.yaml |
| network-component-has-connection-security-prop-FAIL.yaml |
| network-component-has-connection-security-prop-PASS.yaml |
| network-component-has-implementation-point-FAIL.yaml |
| network-component-has-implementation-point-PASS.yaml |
| party-has-name-FAIL.yaml |
Expand Down
4 changes: 3 additions & 1 deletion src/validations/constraints/content/ssp-all-VALID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@
<p>Secure connection to an external API for data enrichment.</p>
</description>
<prop name="leveraged-authorization-uuid" value="233e0f09-fe5e-47e2-bca3-5f32df75e57a"/>
<prop name="connection-security" value="vpn" ns="https://fedramp.gov/ns/oscal"/>
<prop name="interconnection-security" value="vpn" ns="https://fedramp.gov/ns/oscal"/>
<prop name="interconnection-direction" value="in/out" ns="https://fedramp.gov/ns/oscal"/>
<prop ns="https://fedramp.gov/ns/oscal" name="authentication-method" value="yes">
Expand All @@ -373,9 +374,10 @@
<description>
<p>Briefly describe the external system.</p>
</description>
<prop name="connection-security" value="vpn" ns="https://fedramp.gov/ns/oscal"/>
<prop name="direction" value="in/out" ns="https://fedramp.gov/ns/oscal"/>
<prop name="asset-type" value="cli"/>
<prop name="implementation-point" value="external"/>
<prop name="direction" value="in/out" ns="https://fedramp.gov/ns/oscal"/>
<prop name="nature-of-agreement" ns="https://fedramp.gov/ns/oscal" value="isa"/>
<prop ns="https://fedramp.gov/ns/oscal" name="authentication-method" value="yes">
<remarks>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="69988666-0000-4000-9000-000000100006" type="interconnection">
<title>External API Connection</title>
<description>
<p>Secure connection to an external API for data enrichment.</p>
</description>
<!--Error: connection-security property not defined for an interconnection component-->
<!-- <prop name="connection-security" value="vpn" ns="https://fedramp.gov/ns/oscal"/> -->
<prop name="direction" value="incoming" ns="https://fedramp.gov/ns/oscal"/>
<status state="operational"/>
<responsible-role role-id="system-admin">
<party-uuid>11111111-0000-4000-9000-000000000001</party-uuid>
</responsible-role>
<remarks>
<p>This connection is used for secure data exchange with external systems.</p>
</remarks>
</component>
</system-implementation>
</system-security-plan>

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 @@ -535,6 +535,11 @@
<formal-name>Leveraged Authorization Has System Identifier</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>A FedRAMP SSP MUST define exactly one system identifier for each leveraged authorization entry.</message>
</expect>
<expect id="network-component-has-connection-security-prop" target="//component[(@type='service' and not(./prop[@name='leveraged-authorization-uuid']) and ./prop[@name='implementation-point' and @value='external']) or (@type='interconnection') or (@type='service' and ./prop[@name='implementation-point' and @value='internal'] and ./prop[@name='direction']) or (@type='software' and ./prop[@name='asset-type' and @value='cli'] and ./prop[@name='direction'])]" test="count(./prop[@name='connection-security' and @ns='https://fedramp.gov/ns/oscal']) >= 1" level="ERROR">
<formal-name>Network Component Has Connection Security Property</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/#ports-protocols-and-services"/>
<message>All network components in a FedRAMP SSP system implementation MUST define at least one interconnection security property.</message>
</expect>
<is-unique id="unique-inventory-item-asset-id" target="inventory-item/prop[@name='asset-id']">
<formal-name>Unique Asset Identifier</formal-name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Negative Test for network-component-has-connection-security-prop
description: >-
This test case validates the behavior of constraint
network-component-has-connection-security-prop
content: ../content/ssp-network-component-has-connection-security-prop-INVALID.xml
expectations:
- constraint-id: network-component-has-connection-security-prop
result: fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test-case:
name: Positive Test for network-component-has-connection-security-prop
description: >-
This test case validates the behavior of constraint
network-component-has-connection-security-prop
content: ../content/ssp-all-VALID.xml
expectations:
- constraint-id: network-component-has-connection-security-prop
result: pass

0 comments on commit 72d26f5

Please sign in to comment.