From 7ac54e51207538e597d1de1b2efff7b228d4cacf Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Fri, 22 Nov 2024 05:13:30 +0000 Subject: [PATCH 1/2] add constraint and tests --- features/fedramp_extensions.feature | 5 ++ .../constraints/content/ssp-all-VALID.xml | 5 ++ ...nent-has-authentication-method-INVALID.xml | 82 +++++++++++++++++++ .../fedramp-external-constraints.xml | 5 ++ ...ponent-has-authentication-method-FAIL.yaml | 9 ++ ...ponent-has-authentication-method-PASS.yaml | 9 ++ 6 files changed, 115 insertions(+) create mode 100644 src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml create mode 100644 src/validations/constraints/unit-tests/component-has-authentication-method-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/component-has-authentication-method-PASS.yaml diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index b4cd704d0..43b33702e 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -34,6 +34,7 @@ Examples: | cia-impact-has-adjustment-justification | | cia-impact-has-selected | | cloud-service-model | + | component-has-authentication-method | | component-type | | control-implementation-status | | data-center-alternate | @@ -73,6 +74,7 @@ Examples: | has-identity-assurance-level | | has-incident-response-plan | | has-information-system-contingency-plan | + | has-inventory-items | | has-network-architecture | | has-network-architecture-diagram | | has-network-architecture-diagram-caption | @@ -121,6 +123,7 @@ Examples: | scan-type | | security-level | | security-sensitivity-level-matches-security-impact-level | + | unique-inventory-item-asset-id | | user-has-authorized-privilege | | user-has-privilege-level | | user-has-role-id | @@ -162,6 +165,8 @@ Examples: | cia-impact-has-selected-PASS.yaml | | cloud-service-model-FAIL.yaml | | cloud-service-model-PASS.yaml | + | component-has-authentication-method-FAIL.yaml | + | component-has-authentication-method-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 7f7baf22b..3678a0d4f 100644 --- a/src/validations/constraints/content/ssp-all-VALID.xml +++ b/src/validations/constraints/content/ssp-all-VALID.xml @@ -295,6 +295,11 @@ + + +

Some description of the authentication method.

+
+
11111111-0000-4000-9000-000000000001 diff --git a/src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml b/src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml new file mode 100644 index 000000000..386750b93 --- /dev/null +++ b/src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + Service B + +

An non-authorized service provided by the Awesome Cloud leveraged authorization.

+

Describe the service and what it is used for.

+
+ + + + +
+ + + + + + + + + Service C + +

A service provided by an external system other than the leveraged system.

+

Describe the service and what it is used for.

+
+ + + +
+ + Management CLI + +

None

+
+ + + + +
+
+
\ 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 ad58b98e4..850b54c8a 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -81,6 +81,11 @@ + + Component Has Authentication Method + + A FedRAMP SSP MUST include an authentication method for each leveraged system. + Has Authorization Boundary Diagram Link Href Target diff --git a/src/validations/constraints/unit-tests/component-has-authentication-method-FAIL.yaml b/src/validations/constraints/unit-tests/component-has-authentication-method-FAIL.yaml new file mode 100644 index 000000000..1b7355f71 --- /dev/null +++ b/src/validations/constraints/unit-tests/component-has-authentication-method-FAIL.yaml @@ -0,0 +1,9 @@ +test-case: + name: Negative Test for component-has-authentication-method + description: >- + This test case validates the behavior of constraint + component-has-authentication-method + content: ../content/ssp-component-has-authentication-method-INVALID.xml + expectations: + - constraint-id: component-has-authentication-method + result: fail diff --git a/src/validations/constraints/unit-tests/component-has-authentication-method-PASS.yaml b/src/validations/constraints/unit-tests/component-has-authentication-method-PASS.yaml new file mode 100644 index 000000000..76f5b7ef6 --- /dev/null +++ b/src/validations/constraints/unit-tests/component-has-authentication-method-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for component-has-authentication-method + description: >- + This test case validates the behavior of constraint + component-has-authentication-method + content: ../content/ssp-all-VALID.xml + expectations: + - constraint-id: component-has-authentication-method + result: pass From 5d496bc9ee02c980a32e85e10362139d8773e354 Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Fri, 22 Nov 2024 16:08:52 +0000 Subject: [PATCH 2/2] trim test data --- ...component-has-authentication-method-INVALID.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml b/src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml index 386750b93..87167f538 100644 --- a/src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml +++ b/src/validations/constraints/content/ssp-component-has-authentication-method-INVALID.xml @@ -17,11 +17,6 @@ --> - Service B - -

An non-authorized service provided by the Awesome Cloud leveraged authorization.

-

Describe the service and what it is used for.

-
@@ -47,11 +42,6 @@ -->
- Service C - -

A service provided by an external system other than the leveraged system.

-

Describe the service and what it is used for.

-
- Management CLI - -

None

-