From 1a7c9087dccb184f3aeac87fff1966ed1186cf24 Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Wed, 27 Nov 2024 18:33:32 +0000 Subject: [PATCH] Add constraint 'component-responsible-role-references-party' and tests --- features/fedramp_extensions.feature | 4 +++- .../constraints/content/ssp-all-VALID.xml | 16 +++++++++++-- ...ponsible-role-references-party-INVALID.xml | 23 +++++++++++++++++++ .../fedramp-external-constraints.xml | 7 ++++++ ...esponsible-role-references-party-FAIL.yaml | 9 ++++++++ ...esponsible-role-references-party-PASS.yaml | 9 ++++++++ 6 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 src/validations/constraints/content/ssp-component-responsible-role-references-party-INVALID.xml create mode 100644 src/validations/constraints/unit-tests/component-responsible-role-references-party-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/component-responsible-role-references-party-PASS.yaml diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index bfc7a3cf9..933dbc114 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -35,6 +35,7 @@ Examples: | cia-impact-has-selected | | cloud-service-model | | component-has-authentication-method | + | component-responsible-role-references-party | | component-type | | control-implementation-status | | data-center-alternate | @@ -130,7 +131,6 @@ Examples: | security-level | | security-sensitivity-level-matches-security-impact-level | | unique-inventory-item-asset-id | - | unique-inventory-item-asset-id | | user-authentication | | user-has-authorized-privilege | | user-has-privilege-level | @@ -175,6 +175,8 @@ Examples: | cloud-service-model-PASS.yaml | | component-has-authentication-method-FAIL.yaml | | component-has-authentication-method-PASS.yaml | + | component-responsible-role-references-party-FAIL.yaml | + | component-responsible-role-references-party-PASS.yaml | | component-type-FAIL.yaml | | component-type-PASS.yaml | | control-implementation-status-FAIL.yaml | diff --git a/src/validations/constraints/content/ssp-all-VALID.xml b/src/validations/constraints/content/ssp-all-VALID.xml index 77986c485..a81126b92 100644 --- a/src/validations/constraints/content/ssp-all-VALID.xml +++ b/src/validations/constraints/content/ssp-all-VALID.xml @@ -309,9 +309,16 @@ - + + +

Some description of the authentication method.

+
+
- + + 11111111-0000-4000-9000-000000000001 + + External API Connection @@ -342,6 +349,11 @@ + + +

Some description of the authentication method.

+
+
diff --git a/src/validations/constraints/content/ssp-component-responsible-role-references-party-INVALID.xml b/src/validations/constraints/content/ssp-component-responsible-role-references-party-INVALID.xml new file mode 100644 index 000000000..22cf70c1e --- /dev/null +++ b/src/validations/constraints/content/ssp-component-responsible-role-references-party-INVALID.xml @@ -0,0 +1,23 @@ + + + + + Example Organization + ExOrg + + + + Example Organization + ExOrg + + + + + + + + 11111111-0000-4000-9000-000000000001 + + + + \ 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 efdecb643..48f747cab 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -76,16 +76,23 @@ + + Component Has Authentication Method A FedRAMP SSP MUST include at least one authentication method for each leveraged system. + + Component Responsible Role References Party + + Each component dealing with leveraged systems, interconnections, or authorized services MUST have a "provider" responsible-role that references exactly one valid party. + Has Authorization Boundary Diagram Link Href Target diff --git a/src/validations/constraints/unit-tests/component-responsible-role-references-party-FAIL.yaml b/src/validations/constraints/unit-tests/component-responsible-role-references-party-FAIL.yaml new file mode 100644 index 000000000..7f1ca7967 --- /dev/null +++ b/src/validations/constraints/unit-tests/component-responsible-role-references-party-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for component-responsible-role-references-party + description: >- + This test case validates the behavior of constraint + component-responsible-role-references-party + content: ../content/ssp-component-responsible-role-references-party-INVALID.xml + expectations: + - constraint-id: component-responsible-role-references-party + result: fail diff --git a/src/validations/constraints/unit-tests/component-responsible-role-references-party-PASS.yaml b/src/validations/constraints/unit-tests/component-responsible-role-references-party-PASS.yaml new file mode 100644 index 000000000..f0b59d6ad --- /dev/null +++ b/src/validations/constraints/unit-tests/component-responsible-role-references-party-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for component-responsible-role-references-party + description: >- + This test case validates the behavior of constraint + component-responsible-role-references-party + content: ../content/ssp-all-VALID.xml + expectations: + - constraint-id: component-responsible-role-references-party + result: pass