CMP-3806: Check resultserver uses a separate service account with correct security context#1184
Conversation
…ity context settings Retries if pod hasn't appeared yet after scan reaches RUNNING
|
@taimurhafeez: This pull request references CMP-3806 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: taimurhafeez The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
🤖 To deploy this PR, run the following command: |
|
/test e2e-aws-parallel |
1 similar comment
|
/test e2e-aws-parallel |
|
@taimurhafeez: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Supersedes: PR-1033
The test validates that the resultserver pod is created with the correct service account and security context settings.
FSGroup (file system group ID)
SELinux options (specifically the security level)
Creates a ComplianceSuite with a moderate profile scan targeting master nodes
Waits for the scan to start running, then finds the resultserver pod
Verifies the resultserver pod has the correct ServiceAccount:
Expected:
resultserver(notdefault)5. Verifies all security context fields match the operator's values:
FSGroup: Must match operator's FSGroup
RunAsNonRoot: Must be
trueRunAsUser: Must equal the FSGroup value (run as that user ID)
SELinuxOptions.Level: Must match operator's SELinux level
SeccompProfile.Type: Must be
RuntimeDefault6. Waits for the scan to complete successfully
Tested on OCP 4.22:
make e2e-parallel E2E_GO_TEST_FLAGS="-v -run TestResultServerSAAndSecurityContext"--- PASS: TestResultServerSAAndSecurityContext (150.76s)