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.
Is unique inventory assets (GSA#887)
* add is-unique for inventory assets * Update src/validations/constraints/fedramp-external-constraints.xml Co-authored-by: Rene Tshiteya <[email protected]> * Update fedramp-external-constraints.xml Co-authored-by: Gabeblis <[email protected]> * Update src/validations/constraints/content/ssp-unique-inventory-item-asset-id-INVALID.xml Co-authored-by: A.J. Stein <[email protected]> * Update src/validations/constraints/content/ssp-unique-inventory-item-asset-id-INVALID.xml Co-authored-by: A.J. Stein <[email protected]> * Update src/validations/constraints/fedramp-external-constraints.xml Co-authored-by: A.J. Stein <[email protected]> * Update src/validations/constraints/content/ssp-unique-inventory-item-asset-id-INVALID.xml Co-authored-by: A.J. Stein <[email protected]> * Update src/validations/constraints/content/ssp-unique-inventory-item-asset-id-INVALID.xml Co-authored-by: A.J. Stein <[email protected]> * Update src/validations/constraints/fedramp-external-constraints.xml Co-authored-by: A.J. Stein <[email protected]> --------- Co-authored-by: Rene Tshiteya <[email protected]> Co-authored-by: Gabeblis <[email protected]> Co-authored-by: A.J. Stein <[email protected]>
- Loading branch information
1 parent
fc3779a
commit 2c0974d
Showing
5 changed files
with
75 additions
and
0 deletions.
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
38 changes: 38 additions & 0 deletions
38
src/validations/constraints/content/ssp-unique-inventory-item-asset-id-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,38 @@ | ||
<system-security-plan xmlns="http://csrc.nist.gov/ns/oscal/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" uuid="12345678-1234-4321-8765-123456789012"> | ||
<system-implementation> | ||
<inventory-item uuid="77777777-0000-4000-9000-000000000007"> | ||
<description> | ||
<p>Primary database server</p> | ||
</description> | ||
<prop name="asset-id" value="DB-001" ns="http://csrc.nist.gov/ns/oscal"/> | ||
<prop name="asset-type" value="database"/> | ||
<prop name="allows-authenticated-scan" value="yes"/> | ||
<prop name="public" value="no"/> | ||
<prop name="virtual" value="yes"/> | ||
<prop name="scan-type" value="database" ns="https://fedramp.gov/ns/oscal"/> | ||
<responsible-party role-id="asset-owner"> | ||
<party-uuid>11111111-0000-4000-9000-000000000001</party-uuid> | ||
</responsible-party> | ||
<implemented-component component-uuid="55555555-0000-4000-9000-000000000005"> | ||
<prop name="asset-id" value="DB-001"/> | ||
</implemented-component> | ||
</inventory-item> | ||
<inventory-item uuid="77777777-0000-4000-9000-000000000007"> | ||
<description> | ||
<p>Primary database server</p> | ||
</description> | ||
<prop name="asset-id" value="DB-001" /> | ||
<prop name="asset-type" value="database"/> | ||
<prop name="allows-authenticated-scan" value="yes"/> | ||
<prop name="public" value="no"/> | ||
<prop name="virtual" value="yes"/> | ||
<prop name="scan-type" value="database" ns="https://fedramp.gov/ns/oscal"/> | ||
<responsible-party role-id="asset-owner"> | ||
<party-uuid>11111111-0000-4000-9000-000000000001</party-uuid> | ||
</responsible-party> | ||
<implemented-component component-uuid="55555555-0000-4000-9000-000000000005"> | ||
<prop name="asset-id" value="DB-001" /> | ||
</implemented-component> | ||
</inventory-item> | ||
</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
11 changes: 11 additions & 0 deletions
11
src/validations/constraints/unit-tests/unique-inventory-item-asset-id-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,11 @@ | ||
test-case: | ||
name: Negative Test for unique-inventory-item-asset-id | ||
description: >- | ||
This test case validates the behavior of constraint | ||
unique-inventory-item-asset-id | ||
content: ../content/ssp-unique-inventory-item-asset-id-INVALID.xml | ||
expectations: | ||
- constraint-id: unique-inventory-item-asset-id | ||
fail_count: | ||
type: "exact" | ||
value: 1 |
9 changes: 9 additions & 0 deletions
9
src/validations/constraints/unit-tests/unique-inventory-item-asset-id-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 unique-inventory-item-asset-id | ||
description: >- | ||
This test case validates the behavior of constraint | ||
unique-inventory-item-asset-id | ||
content: ../content/ssp-all-VALID.xml | ||
expectations: | ||
- constraint-id: unique-inventory-item-asset-id | ||
result: pass |