From 7312686b6cdfe04a13c76f791a54a8c885c4093c Mon Sep 17 00:00:00 2001 From: Kylie Hunter Date: Mon, 25 Nov 2024 16:15:01 -0700 Subject: [PATCH] Add connection-security prop constraint for #931 --- features/fedramp_extensions.feature | 3 +++ .../constraints/content/ssp-all-VALID.xml | 4 ++- ...t-has-connection-security-prop-INVALID.xml | 25 +++++++++++++++++++ .../fedramp-external-constraints.xml | 5 ++++ ...ent-has-connection-security-prop-FAIL.yaml | 9 +++++++ ...ent-has-connection-security-prop-PASS.yaml | 9 +++++++ 6 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 src/validations/constraints/content/ssp-network-component-has-connection-security-prop-INVALID.xml create mode 100644 src/validations/constraints/unit-tests/network-component-has-connection-security-prop-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/network-component-has-connection-security-prop-PASS.yaml diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index dc9ac4de0..b310e2a0d 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -115,6 +115,7 @@ Examples: | leveraged-authorization-nature-of-agreement | | marking | | missing-response-components | + | network-component-has-connection-security-prop | | network-component-has-implementation-point | | non-provider-responsible-role-references-user | | party-has-name | @@ -337,6 +338,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 | | non-provider-responsible-role-references-user-FAIL.yaml | diff --git a/src/validations/constraints/content/ssp-all-VALID.xml b/src/validations/constraints/content/ssp-all-VALID.xml index 5eb5b9b0b..715a29c66 100644 --- a/src/validations/constraints/content/ssp-all-VALID.xml +++ b/src/validations/constraints/content/ssp-all-VALID.xml @@ -355,6 +355,7 @@

Secure connection to an external API for data enrichment.

+ @@ -379,9 +380,10 @@

Briefly describe the external system.

+ + - diff --git a/src/validations/constraints/content/ssp-network-component-has-connection-security-prop-INVALID.xml b/src/validations/constraints/content/ssp-network-component-has-connection-security-prop-INVALID.xml new file mode 100644 index 000000000..1475cf502 --- /dev/null +++ b/src/validations/constraints/content/ssp-network-component-has-connection-security-prop-INVALID.xml @@ -0,0 +1,25 @@ + + + + + External API Connection + +

Secure connection to an external API for data enrichment.

+
+ + + + + + 11111111-0000-4000-9000-000000000001 + + +

This connection is used for secure data exchange with external systems.

+
+
+
+
+ \ 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 9de641170..f19bd2bf0 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -538,6 +538,11 @@ Leveraged Authorization Has System Identifier A FedRAMP SSP MUST define exactly one system identifier for each leveraged authorization entry. + + + Network Component Has Connection Security Property + + All network components in a FedRAMP SSP system implementation MUST define at least one interconnection security property. Unique Asset Identifier diff --git a/src/validations/constraints/unit-tests/network-component-has-connection-security-prop-FAIL.yaml b/src/validations/constraints/unit-tests/network-component-has-connection-security-prop-FAIL.yaml new file mode 100644 index 000000000..bfebea130 --- /dev/null +++ b/src/validations/constraints/unit-tests/network-component-has-connection-security-prop-FAIL.yaml @@ -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 diff --git a/src/validations/constraints/unit-tests/network-component-has-connection-security-prop-PASS.yaml b/src/validations/constraints/unit-tests/network-component-has-connection-security-prop-PASS.yaml new file mode 100644 index 000000000..b9987997d --- /dev/null +++ b/src/validations/constraints/unit-tests/network-component-has-connection-security-prop-PASS.yaml @@ -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