From e021f8fb2b53628b71561c0a6ba958e719cc47a3 Mon Sep 17 00:00:00 2001 From: "~ . ~" Date: Tue, 24 Sep 2024 09:34:10 -0400 Subject: [PATCH] re-introduce party has responsibility-constraints --- features/fedramp_extensions.feature | 10 +++++++--- ...ssp-party-has-one-responsibility-INVALID.xml | 15 +++++++++++++++ .../ssp-party-has-responsibility-INVALID.xml | 17 +++++++++++++++++ .../fedramp-external-constraints.xml | 7 +++++++ .../party-has-one-responsibility-FAIL.yaml | 9 +++++++++ .../party-has-one-responsibility-PASS.yaml | 9 +++++++++ .../party-has-responsibility-FAIL.yaml | 7 +++++++ .../party-has-responsibility-PASS.yaml | 7 +++++++ 8 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 src/validations/constraints/content/ssp-party-has-one-responsibility-INVALID.xml create mode 100644 src/validations/constraints/content/ssp-party-has-responsibility-INVALID.xml create mode 100644 src/validations/constraints/unit-tests/party-has-one-responsibility-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/party-has-one-responsibility-PASS.yaml create mode 100644 src/validations/constraints/unit-tests/party-has-responsibility-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/party-has-responsibility-PASS.yaml diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index dd8830bfe..581acdc86 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -95,8 +95,10 @@ Examples: | interconnection-security-PASS.yaml | | missing-response-components-FAIL.yaml | | missing-response-components-PASS.yaml | - | missing-response-components-test-FAIL.yaml | - | missing-response-components-test-PASS.yaml | + | party-has-one-responsibility-FAIL.yaml | + | party-has-one-responsibility-PASS.yaml | + | party-has-responsibility-FAIL.yaml | + | party-has-responsibility-PASS.yaml | | privilege-level-FAIL.yaml | | privilege-level-PASS.yaml | | resource-has-base64-or-rlink-FAIL.yaml | @@ -169,7 +171,9 @@ Examples: | information-type-system | | interconnection-direction | | interconnection-security | - | missing-response-components-test | + | missing-response-components | + | party-has-one-responsibility | + | party-has-responsibility | | privilege-level | | prop-response-point-has-cardinality-one | | resource-has-base64-or-rlink | diff --git a/src/validations/constraints/content/ssp-party-has-one-responsibility-INVALID.xml b/src/validations/constraints/content/ssp-party-has-one-responsibility-INVALID.xml new file mode 100644 index 000000000..85b8174d1 --- /dev/null +++ b/src/validations/constraints/content/ssp-party-has-one-responsibility-INVALID.xml @@ -0,0 +1,15 @@ + + + + Jane Doe + jane.doe@example.com +
+ + + 22222222-0000-4000-9000-000000000002 + + + 22222222-0000-4000-9000-000000000002 + + + \ No newline at end of file diff --git a/src/validations/constraints/content/ssp-party-has-responsibility-INVALID.xml b/src/validations/constraints/content/ssp-party-has-responsibility-INVALID.xml new file mode 100644 index 000000000..fb966ac8f --- /dev/null +++ b/src/validations/constraints/content/ssp-party-has-responsibility-INVALID.xml @@ -0,0 +1,17 @@ + + + + Example Organization + ExOrg + + + + Jane Doe + jane.doe@example.com +
+ + +

This SSP is an example for demonstration purposes.

+
+ + \ No newline at end of file diff --git a/src/validations/constraints/fedramp-external-constraints.xml b/src/validations/constraints/fedramp-external-constraints.xml index 2bbefdd89..bfd801473 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -133,6 +133,12 @@ A FedRAMP SSP must define a role for the point of contact for an information system security officer. + + One or more persons do not have any assigned responsibilities. + + + One or more persons have multiple assigned responsibilities. + @@ -142,5 +148,6 @@ Each implemented requirement must have at least one by-component reference to the source component implementing it. + diff --git a/src/validations/constraints/unit-tests/party-has-one-responsibility-FAIL.yaml b/src/validations/constraints/unit-tests/party-has-one-responsibility-FAIL.yaml new file mode 100644 index 000000000..d2f72644c --- /dev/null +++ b/src/validations/constraints/unit-tests/party-has-one-responsibility-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for party-has-one-responsibility + description: >- + This test case validates the behavior of constraint + party-has-one-responsibility + content: ../content/ssp-party-has-one-responsibility-INVALID.xml + expectations: + - constraint-id: party-has-one-responsibility + result: fail diff --git a/src/validations/constraints/unit-tests/party-has-one-responsibility-PASS.yaml b/src/validations/constraints/unit-tests/party-has-one-responsibility-PASS.yaml new file mode 100644 index 000000000..712441910 --- /dev/null +++ b/src/validations/constraints/unit-tests/party-has-one-responsibility-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for party-has-one-responsibility + description: >- + This test case validates the behavior of constraint + party-has-one-responsibility + content: ../content/ssp-all-VALID.xml + expectations: + - constraint-id: party-has-one-responsibility + result: pass diff --git a/src/validations/constraints/unit-tests/party-has-responsibility-FAIL.yaml b/src/validations/constraints/unit-tests/party-has-responsibility-FAIL.yaml new file mode 100644 index 000000000..4a2b03eba --- /dev/null +++ b/src/validations/constraints/unit-tests/party-has-responsibility-FAIL.yaml @@ -0,0 +1,7 @@ +test-case: + name: Negative Test for party-has-responsibility + description: This test case validates the behavior of constraint party-has-responsibility + content: ../content/ssp-party-has-responsibility-INVALID.xml + expectations: + - constraint-id: party-has-responsibility + result: fail diff --git a/src/validations/constraints/unit-tests/party-has-responsibility-PASS.yaml b/src/validations/constraints/unit-tests/party-has-responsibility-PASS.yaml new file mode 100644 index 000000000..b00505797 --- /dev/null +++ b/src/validations/constraints/unit-tests/party-has-responsibility-PASS.yaml @@ -0,0 +1,7 @@ +test-case: + name: Positive Test for party-has-responsibility + description: This test case validates the behavior of constraint party-has-responsibility + content: ../content/ssp-all-VALID.xml + expectations: + - constraint-id: party-has-responsibility + result: pass