From b1995eec81c9a2ba286025c0d0eedf2ee7d7d939 Mon Sep 17 00:00:00 2001 From: Rene Tshiteya Date: Mon, 18 Nov 2024 15:02:24 -0500 Subject: [PATCH] Add constraint leveraged-authorization-has-authorized-users --- features/fedramp_extensions.feature | 3 ++ .../constraints/content/ssp-all-VALID.xml | 16 +++++++- ...orization-has-authorized-users-INVALID.xml | 41 +++++++++++++++++++ .../fedramp-external-constraints.xml | 5 +++ ...thorization-has-authorized-users-FAIL.yaml | 8 ++++ ...thorization-has-authorized-users-PASS.yaml | 9 ++++ 6 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 src/validations/constraints/content/ssp-leveraged-authorization-has-authorized-users-INVALID.xml create mode 100644 src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-FAIL.yaml create mode 100644 src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-PASS.yaml diff --git a/features/fedramp_extensions.feature b/features/fedramp_extensions.feature index a7016432d9..aeebbc6f41 100644 --- a/features/fedramp_extensions.feature +++ b/features/fedramp_extensions.feature @@ -171,6 +171,8 @@ Examples: | inventory-item-public-PASS.yaml | | inventory-item-virtual-FAIL.yaml | | inventory-item-virtual-PASS.yaml | + | leveraged-authorization-has-authorized-users-FAIL.yaml | + | leveraged-authorization-has-authorized-users-PASS.yaml | | leveraged-authorization-has-component-FAIL.yaml | | leveraged-authorization-has-component-PASS.yaml | | leveraged-authorization-has-implementation-point-FAIL.yaml | @@ -326,6 +328,7 @@ Examples: | inventory-item-allows-authenticated-scan | | inventory-item-public | | inventory-item-virtual | + | leveraged-authorization-has-authorized-users | | leveraged-authorization-has-component | | leveraged-authorization-has-implementation-point | | leveraged-authorization-has-information-type | diff --git a/src/validations/constraints/content/ssp-all-VALID.xml b/src/validations/constraints/content/ssp-all-VALID.xml index 806eb3b9aa..e1126685b1 100644 --- a/src/validations/constraints/content/ssp-all-VALID.xml +++ b/src/validations/constraints/content/ssp-all-VALID.xml @@ -320,11 +320,17 @@ - - + + + + 6b286b5d-8f07-4fa7-8847-1dd0d88f73fb + +

Using responsible-role to represent the CSPs "authorized users" who have access the leveraged authorization service.

+
+
@@ -337,6 +343,12 @@ + + 6b286b5d-8f07-4fa7-8847-1dd0d88f73fb + +

Using responsible-role to represent the CSPs "authorized users" who have access the leveraged authorization service.

+
+
diff --git a/src/validations/constraints/content/ssp-leveraged-authorization-has-authorized-users-INVALID.xml b/src/validations/constraints/content/ssp-leveraged-authorization-has-authorized-users-INVALID.xml new file mode 100644 index 0000000000..a3a9446fbf --- /dev/null +++ b/src/validations/constraints/content/ssp-leveraged-authorization-has-authorized-users-INVALID.xml @@ -0,0 +1,41 @@ + + + + + + Name of Underlying System + + + + + + + 11111111-0000-4000-9000-000000000003 + 2019-01-01 + +

Sample leveraged authorization (e.g., underlying IaaS).

+
+
+ + + + Name of Leveraged System + +

Briefly describe leveraged system.

+
+ + + + + +
+ +
+ +
\ 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 a7ebf26dd1..3a70eb4138 100644 --- a/src/validations/constraints/fedramp-external-constraints.xml +++ b/src/validations/constraints/fedramp-external-constraints.xml @@ -543,6 +543,11 @@ Each leveraged authorization system component MUST have exactly one implementation point property. The leveraged authorization with uuid '{ $leveraged-authorization-uuid }' has a "system" component with { count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/prop[@name='implementation-point' and @value='external']) } defined "implementation-point" props. + + Leveraged Authorization Has System Component + + Each leveraged authorization system component SHOULD have at least one role for authorized users. The leveraged authorization with uuid '{ $leveraged-authorization-uuid }' has a "system" component with { count(../component[@type='system'][prop[@name='leveraged-authorization-uuid' and @value=$leveraged-authorization-uuid]]/responsible-role/@role-id) } roles specified. + diff --git a/src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-FAIL.yaml b/src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-FAIL.yaml new file mode 100644 index 0000000000..e98bcd6dbe --- /dev/null +++ b/src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-FAIL.yaml @@ -0,0 +1,8 @@ +test-case: + name: Negative Test for leveraged-authorization-has-authorized-users + description: >- + This test case validates the behavior of constraint leveraged-authorization-has-authorized-users + content: ../content/ssp-leveraged-authorization-has-authorized-users-INVALID.xml + expectations: + - constraint-id: leveraged-authorization-has-authorized-users + result: fail diff --git a/src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-PASS.yaml b/src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-PASS.yaml new file mode 100644 index 0000000000..8a61e93a5f --- /dev/null +++ b/src/validations/constraints/unit-tests/leveraged-authorization-has-authorized-users-PASS.yaml @@ -0,0 +1,9 @@ +test-case: + name: Positive Test for leveraged-authorization-has-authorized-users + description: >- + This test case validates the behavior of constraint + leveraged-authorization-has-authorized-users + content: ../content/ssp-all-VALID.xml + expectations: + - constraint-id: leveraged-authorization-has-authorized-users + result: pass