Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

818 fix data center #819

Merged
merged 13 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/validations/constraints/content/ssp-all-VALID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
<address >
<country>US</country>
</address>
<prop name='data-center' value='dc-zone-1' class='primary'/>
<prop name="type" value="data-center" class="primary"/>
</location>
<location uuid="11111112-0000-4000-9000-000000000003">
<address >
<country>US</country>
</address>
<prop name='data-center' value='aws-us-west-1' class='alternate'/>
<prop name="type" value="data-center" class="alternate"/>
</location>
<party uuid="11111111-0000-4000-9000-000000000001" type="organization">
<name>Example Organization</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
<address >
<country>WRONG</country>
</address>
<prop name='data-center' value='dc-zone-1' class='tertiary'/>
<prop name="type" value="data-center" class="primary" />
</location>
<location uuid="11291112-0070-4000-9001-000890000009">
<address >
<country>WRONG</country>
</address>
<prop name="type" value="data-center" class="alternate" />
</location>
</metadata>
</system-security-plan>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
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">
<metadata>
<location uuid="11155112-0340-4000-9001-000006500009">
<address >
<country>US</country>
</address>
<prop name='type' value='data-center' class='primary'/>
</location>
<location uuid="11111112-0000-4000-9001-000000000009">
<address >
<country>WRONG</country>
<country>US</country>
</address>
<prop name='data-center' value='dc-zone-1' class='tertiary'/>
<prop name="type" value="data-center" class="tertiary" />
</location>
</metadata>
</system-security-plan>
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
uuid="12345678-1234-4321-8765-123456789012">
<metadata>
<location uuid="11111112-0000-4000-9001-000000000009">
<address >
<country>WRONG</country>
<address>
<country>US</country>
</address>
<prop name='data-center' value='dc-zone-1' class='tertiary'/>
<prop name="type" value="data-center" class="tertiary" />
</location>
</metadata>
</system-security-plan>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
uuid="12345678-1234-4321-8765-123456789012">
<metadata>
<location uuid="11111112-0000-4000-9001-000000000009">
<address >
<address>
</address>
<prop name='data-center' value='dc-zone-1' class='tertiary'/>
<prop name='type' value='data-center' class='primary'/>
</location>
<location uuid="11117112-0080-4000-9001-001230000009">
<address>
</address>
<prop name="type" value="data-center" class="alternate" />
</location>
</metadata>
</system-security-plan>
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
<metadata>
<location uuid="11111112-0000-4000-9001-000000000009">
<address >
<country>WRONG</country>
<country>US</country>
</address>
<prop name='data-center' value='dc-zone-1' class='tertiary'/>
<prop name="type" value="data-center" class="tertiary" />
</location>
<location uuid="11143112-0000-4320-9001-000066700009">
<address >
<country>US</country>
</address>
<prop name="type" value="data-center" class="alternate'"/>
</location>
</metadata>
</system-security-plan>
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,16 @@
<context>
<metapath target="/system-security-plan/metadata"/>
<constraints>
<expect id="data-center-count" target="." test="count(/location/prop[@name eq 'data-center']) &gt; 1">
<expect id="data-center-count" target="." test="count(/location/prop[@name eq 'type'][@value eq 'data-center']) &gt; 1">
kyhu65867 marked this conversation as resolved.
Show resolved Hide resolved
<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/#data-centers" />
<message>There must be at least two (2) data centers listed.</message>
</expect>
<expect id="data-center-primary" target="." test="count(/location/prop[@name eq 'data-center'][@class eq 'primary']) = 1">
<expect id="data-center-primary" target="." test="count(/location/prop[@name eq 'type'][@value eq 'data-center'][@class eq 'primary']) = 1">
kyhu65867 marked this conversation as resolved.
Show resolved Hide resolved
<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/#data-centers" />
<message>There must be a single primary data center.</message>
</expect>
<expect id="data-center-alternate" target="." test="count(/location/prop[@name eq 'data-center'][@class eq 'alternate']) &gt; 0">
<expect id="data-center-alternate" target="." test="count(/location/prop[@name eq 'type'][@value eq 'data-center'][@class eq 'alternate']) &gt; 0">
kyhu65867 marked this conversation as resolved.
Show resolved Hide resolved
<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/#data-centers" />
<message>There must be one or more alternate data center(s).</message>
</expect>
<expect id="role-defined-system-owner" target="." test="role[@id eq 'system-owner']" level="ERROR">
Expand Down
Loading