From 7ac54e51207538e597d1de1b2efff7b228d4cacf Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Fri, 22 Nov 2024 05:13:30 +0000 Subject: [PATCH 1/8] 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/8] 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

-
From 8d869e70141924ceb2eba61ea75d7622a071cb47 Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Fri, 22 Nov 2024 05:13:30 +0000 Subject: [PATCH 3/8] add constraint and tests --- features/fedramp_extensions.feature | 3 + .../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, 113 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 cf7407a31..9bafdff57 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 | @@ -165,6 +166,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 65bfbc915..9b0d45188 100644 --- a/src/validations/constraints/content/ssp-all-VALID.xml +++ b/src/validations/constraints/content/ssp-all-VALID.xml @@ -319,6 +319,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 9b22aae6981271aa3748a425a0a899cd2c487a60 Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Fri, 22 Nov 2024 16:08:52 +0000 Subject: [PATCH 4/8] 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

-
From e9f1f97ab5d0ad19f33b2f894aed3d46583754ac Mon Sep 17 00:00:00 2001 From: "~ . ~" Date: Fri, 22 Nov 2024 13:29:47 -0500 Subject: [PATCH 5/8] fix test data --- features/steps/fedramp_extensions_steps.ts | 1 + src/validations/constraints/content/ssp-all-VALID.xml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/features/steps/fedramp_extensions_steps.ts b/features/steps/fedramp_extensions_steps.ts index 424d1b1a6..84338650c 100644 --- a/features/steps/fedramp_extensions_steps.ts +++ b/features/steps/fedramp_extensions_steps.ts @@ -421,6 +421,7 @@ async function checkConstraints( `The content may need adjustment to properly test this constraint.` ); } + !quiet && console.error(formatSarifOutput(sarifOutput)) errors.push(""); // Add a blank line for readability } } diff --git a/src/validations/constraints/content/ssp-all-VALID.xml b/src/validations/constraints/content/ssp-all-VALID.xml index 9b0d45188..691814657 100644 --- a/src/validations/constraints/content/ssp-all-VALID.xml +++ b/src/validations/constraints/content/ssp-all-VALID.xml @@ -309,8 +309,9 @@ - -
+ + + External API Connection From a4e11253cf095ec3e79b54028c30991337920327 Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Mon, 25 Nov 2024 14:45:05 +0000 Subject: [PATCH 6/8] change 'http' to 'https' --- .../constraints/content/ssp-all-VALID.xml | 4 ++-- ...onent-has-authentication-method-INVALID.xml | 18 +++++++++--------- .../fedramp-external-constraints.xml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/validations/constraints/content/ssp-all-VALID.xml b/src/validations/constraints/content/ssp-all-VALID.xml index 691814657..d52ca4e20 100644 --- a/src/validations/constraints/content/ssp-all-VALID.xml +++ b/src/validations/constraints/content/ssp-all-VALID.xml @@ -309,7 +309,7 @@ - + @@ -320,7 +320,7 @@ - +

Some description of the authentication method.

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 87167f538..b7ac60b58 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 @@ -7,8 +7,8 @@ - - @@ -24,7 +24,7 @@

If 'yes', describe the authentication method.

If 'no', explain why no authentication is used.

-

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

+

If 'not-applicable', explain why authentication is not applicable in the remarks.

--> @@ -37,7 +37,7 @@

If 'yes', describe the authentication method in the remarks.

If 'no', explain why no authentication is used in the remarks.

-

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

+

If 'not-applicable', explain why authentication is not applicable in the remarks.

--> @@ -48,7 +48,7 @@

If 'yes', describe the authentication method in the remarks.

If 'no', explain why no authentication is used in the remarks.

-

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

+

If 'not-applicable', explain why authentication is not applicable in the remarks.

--> @@ -60,7 +60,7 @@

If 'yes', describe the authentication method in the remarks.

If 'no', explain why no authentication is used in the remarks.

-

If 'not-applicable', attest explain why authentication is not applicable in the remarks.

+

If 'not-applicable', explain why authentication is not applicable in the remarks.

--> From 599880a69e54fbbf0280b3006243c41ac285f734 Mon Sep 17 00:00:00 2001 From: Gabeblis Date: Mon, 25 Nov 2024 21:54:19 +0000 Subject: [PATCH 8/8] Edit message --- src/validations/constraints/fedramp-external-constraints.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validations/constraints/fedramp-external-constraints.xml b/src/validations/constraints/fedramp-external-constraints.xml index 2acf36302..29238ea01 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -84,7 +84,7 @@ Component Has Authentication Method - A FedRAMP SSP MUST include an authentication method for each leveraged system. + A FedRAMP SSP MUST include at least one authentication method for each leveraged system. Has Authorization Boundary Diagram Link Href Target